You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(runner): isolate structured workflows in one-attempt Kubernetes Pods
A `workflow-run` no longer enters the shared-daemon job protocol. One exact
attempt owns one Pod and one capability Secret, and every state mutation is
fenced by run ID, attempt ID, owner ID, lease, and command receipt.
Runner side:
- Add `src/runner/` (entry, WebSocket client, workflow executor, output
sanitizer, token deadline, process boundary), replacing the deleted
`src/daemon/workflow-executor.ts`.
- Add `native/daemon-process-guard.c` and `src/daemon/process-boundary.ts` so
a worker cannot outlive its attempt.
- The runner deny set rejects App, PAT, database, Valkey, Kubernetes,
Context7, global GitHub, and daemon-auth credentials.
Controller side:
- Add `src/orchestrator/workflow-runner-*.ts` (controller, dispatch, payload,
store, result, reconciler, resources, capability, output) and
`src/k8s/workflow-runner-spawner.ts`, which owns the per-attempt Secret.
- Add `src/shared/workflow-runner-messages.ts`: a separate protocol from the
shared-daemon schema, deliberately not shared with it.
- Add migration `017_workflow_run_leases.sql`, which introduces the
`attempt_id` / `offer_id` columns that `src/orchestrator/history.ts` and the
daemon-disconnect fencing path query.
- The RPC output scanner is stricter than the general one: disablement,
failure, or timeout rejects a command and converts a result to a fixed safe
failure rather than failing open.
Also in this change:
- Orchestrator resilience: liveness reaper, queue worker, ws-server split into
`ws-connection.ts`, dispatch outbox, completion reconciler, expiry notifier.
- The remaining `src/config.ts` surface, including the runner capability
secret and namespace validation that only applies once the runner exists.
- Workflow handler and ship-rail updates that consume the Gate-2 policy.
- Move the last colocated `src/**/*.test.ts` files under `test/` and tighten
`check:test-globs` to reject tests in production source.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KUPpJPtxAaHWrBsjytRGyM
0 commit comments