Commit 7a67ea0
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 559d954 commit 7a67ea0
71 files changed
Lines changed: 14064 additions & 434 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 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 5 | | |
9 | 6 | | |
10 | 7 | | |
| |||
Large diffs are not rendered by default.
0 commit comments