Commit 2cf6463
feat(runner): isolate structured workflows in one-attempt Kubernetes Pods
Stack 3 of 3, base `feat/workflow-rail-outbox`.
Stack 2 leased structured workflow attempts in the database and removed the
shared-daemon executor. This adds the executor that claims those leases: one
bare Kubernetes Pod and one capability Secret per attempt, for exactly one
attempt.
- `src/runner/`: the Pod-side process. One attempt, its own RPC client, its
own output sanitizer, a token deadline, and a process boundary.
- `src/orchestrator/workflow-runner-*`: payload preparation, per-attempt
capability minting, dispatch, result settlement, reconciliation and
resource teardown, each fenced by run id, attempt id, owner id, lease and
command receipt.
- `src/k8s/workflow-runner-spawner.ts`: creates the Pod, then makes the
Secret a Kubernetes-owned dependent of that exact Pod UID.
- `src/shared/workflow-runner-messages.ts` is a separate schema from
`ws-messages.ts`, not a superset, so a workflow-run can never enter the
shared-daemon protocol by accident.
- Runner RPC output scanning is fail-CLOSED, unlike `safePostToGitHub`:
scanner disablement, failure or timeout rejects the command. The Pod holds
a repo-scoped write token and handles attacker-influenced content, so
degrading to regex-only there is not an acceptable trade.
- New `admission-policy` CI job validates the runner admission spec against
Kubernetes 1.30 via `bun run test:admission`.
Structured dispatch fails closed in PAT mode: a PAT cannot be narrowed to a
single repository.
Verified: typecheck, lint, format, all check gates, 213/213 test files
against live Postgres 17 + Valkey. The resulting tree is byte-identical to
the pre-split single-PR branch.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KUPpJPtxAaHWrBsjytRGyM1 parent a7f5231 commit 2cf6463
76 files changed
Lines changed: 14136 additions & 449 deletions
File tree
- .github/workflows
- docs
- build
- operate
- runbooks
- use
- workflows
- examples
- scripts
- src
- k8s
- orchestrator
- runner
- test
- fixtures
- integration
- k8s
- orchestrator
- runner
- webhook/events
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
117 | | - | |
| 115 | + | |
| 116 | + | |
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
| |||
190 | 189 | | |
191 | 190 | | |
192 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
185 | 188 | | |
186 | 189 | | |
187 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
188 | 207 | | |
189 | 208 | | |
190 | 209 | | |
| |||
256 | 275 | | |
257 | 276 | | |
258 | 277 | | |
| 278 | + | |
259 | 279 | | |
260 | 280 | | |
261 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
122 | 151 | | |
123 | 152 | | |
124 | 153 | | |
| |||
184 | 213 | | |
185 | 214 | | |
186 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
187 | 221 | | |
188 | 222 | | |
189 | 223 | | |
| |||
0 commit comments