oficina / equipo Public

RUNNERS-PROGRESS: slices A and B, the composer merge, M8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 6751fcbf532dda9af6d764fa28b5b329e74f9b98 parent 921918c
1 file changed, +97 −2
  • docs/superpowers/plans/RUNNERS-PROGRESS.md +97 −2

CI failed — run details

diff --git a/docs/superpowers/plans/RUNNERS-PROGRESS.md b/docs/superpowers/plans/RUNNERS-PROGRESS.md
index b2d92b62..6c5a5fd8 100644
--- a/docs/superpowers/plans/RUNNERS-PROGRESS.md
+++ b/docs/superpowers/plans/RUNNERS-PROGRESS.md
@@ -1,7 +1,9 @@
# Runners progress: Mac runners groundwork (slices A and B)
Branch `thin-v1-runners` from `thin-v1-slice4c` (2d1edaf), with
-`design-mac-runner` (b5f7259) merged so the spec is on the branch. Spec:
+`design-mac-runner` (b5f7259) merged so the spec is on the branch, then
+`thin-v1-composer` (0797ad0: connections slice 1, inner screens,
+housekeeping slice 1, attachments) merged at 23b0b31. Spec:
`docs/superpowers/specs/2026-11-07-equipo-mac-runners.md` rev 4
(accepted), slices A and B, Linux only. No Darwin code and no Mac probe:
those need tito-studio and a person (slice C onwards). Conventions and
@@ -36,6 +38,83 @@ scripts as in `SLICE1-PROGRESS.md` to `SLICE4C-PROGRESS.md`.
downgrade, and without the protocol 2 frame refusal, each failed a
test.
+2. Migration 0054 (renumbered from 0047 at the composer merge):
+ `runners.role`, `runner_commands.runner_id`, `chat_steps.runner_id`
+ (indexed), placement, publication and termination columns,
+ `chat_tasks.engineering_runner`, `runner_sessions.protocol`,
+ `runner_transfers`. In one transaction: every runner primary, every
+ command and step in every state bound to the person's primary (the
+ primaryRunner query, then fallbacks), runnerless open steps waiting.
+ `chat.UnboundSteps` is the schema check. Tests:
+ `TestRunnersMigrationBindsSlice4Rows` (SQL over an older database:
+ running, pending termination, queued, unacked commands);
+ `TestContractMigrationOverSlice4Work` (live work, schema stripped
+ back, restart migrates, the same runner carries on, Retry still
+ waits for termination).
+3. Per-runner scoping: Pending, ack, step reports and syncSteps by
+ runner; turns stay primary-only; a wrong-runner report is refused
+ without closing the connection (`ErrRefused`, acked, logged).
+ `TestContractWorkerScoping`; four mutations each failed it.
+4. Roles: first enrolment primary, later ones workers (replace a
+ primary by revoking it first); a connecting primary rebinds orphans
+ (no primary at write time, a revoked primary's). Negotiation: hello
+ offers protocol 2; the instance speaks the lower and encodes every
+ frame per connection; a protocol 1 worker is refused; the runner
+ falls back once on a strict-decode refusal and logs it; a worker
+ never does (`ErrInstanceTooOld`) and will not enrol with an instance
+ lacking `GET /api/runner/protocol`. `TestContractRunnerRoles`,
+ `TestLinkFallsBackToProtocol1`, `TestWorkerRefusesAnOlderInstance`,
+ `TestLinkSpeaksProtocol2`, `TestWorkerEnrolRefusesAnOlderInstance`.
+5. Capabilities (Linux probe; the test build's fixture Mac), cleaned
+ on the instance (out of bounds dropped, label one line). Index
+ reports `needs_macos` (gate) and `ios_simulator` (shared scheme);
+ Engineering reports `apple`.
+6. Placement (`chat/runners.go`): checks needing a Mac go to a worker
+ whose tags cover them (primary first, then fewest running steps,
+ enrolment order); offline fitting worker: waiting; after 30 minutes
+ checks resolve `cannot_run/runner_offline` and review goes on;
+ nobody fits or the primary is protocol 1: the primary judges as
+ before (`needs_macos`). The runner picks a connection among its own.
+ Engineering is pinned per task; questions go to the step's runner.
+ Start authorization (`lease{step_id, attempt}`) and withdrawal in
+ one serialised write: not started, the next attempt is placed at
+ once and the old one can never start; started, `cancel_step` and
+ the next attempt only after termination; a 2-minute grace before
+ withdrawing from a worker that dropped. `placement_refused`
+ re-places. `GET /api/v1/runners`, `snapshot.runners`, per-runner
+ events (the chat's offline line follows the primary only).
+ Contracts: `TestContractChecksPlacedOnTheWorker`,
+ `TestContractChecksWithoutAWorker`, `TestContractChecksWaitForTheWorker`,
+ `TestContractPlacementRefused`, `TestContractWithdrawal`, delayed
+ older-SHA checks and review cases in `TestContractReviewAndChecks`.
+7. Transfers: rows authorise every chunk (sender, open, header, current
+ attempt, bounds, order); blobs relay as commands; oversize ends
+ checks `checks_unavailable`; last ack closes; 24 h TTL.
+ `TestContractTransferAuthorization`, `TestContractTransferTooLarge`.
+ Worker side: header against its step row, digest, exactly the
+ candidate with a complete tree (`TestWorkerRefusesTamperedPacks`).
+8. Publication: only the primary's `published` sets Pushed for a
+ worker's commit; the primary indexes the pack beside its clone,
+ checks the parent is the base, confirms the publication right
+ before the push and pushes through forge (record then reconcile).
+ `TestContractPublication`, `TestContractCancelBeforePublication`,
+ `TestRelayRetryAfterPushFailure`, `TestRelayCrashes` (after
+ indexing; after the push), `TestRelayCancelledBeforePush`,
+ `TestRelayRefusesAWrongCommit`.
+9. Fake worker (`-tags testbuild` only): process group, no sandbox;
+ `make release-runner` runs `scripts/no-fake-worker.sh`;
+ `TestReleaseRunnerHasNoFakeWorker` fails if it is compiled in.
+ Headless `TestMacWorker`: M1, M5, M2 (and the 30-minute rule with a
+ fake clock), M4 (SIGKILL, process group proven gone, Retry).
+10. M8 `TestMixedVersions` against the staging line 0797ad0 built from
+ git history: older runner against this instance (protocol 1, task
+ done, every frame unchanged by `Encode(f, 1)`); this runner against
+ the older instance (one fallback, task done); a worker refused at
+ enrolment, nothing created.
+
+Mutations: about 25, each observed failing a test (listed in the
+commits); defence in depth noted where one survived first.
+
## Decisions
- New wire fields are `omitempty` rather than always present: the slice
@@ -49,10 +128,26 @@ scripts as in `SLICE1-PROGRESS.md` to `SLICE4C-PROGRESS.md`.
- Blob frames carry the whole transfer header, so the receiver checks
repository, task, step, attempt, base, candidate and direction against
its own step row on every chunk; `sha256` is the whole pack's digest.
-- The capability report keeps `accounts` where it is today, in `hello`.
+- The capability report keeps accounts where they are (hello's
+ connections since the composer merge).
+- Protocol 1 is the composer wire. M8 runs against 0797ad0 rather than
+ the spec's ca0a65c, whose wire predates 4b, 4c and connections.
+- Only checks are placed by needs in this release; Engineering, Review
+ and merges stay on the primary until slice F.
+- The worker's connections are not recorded yet (checks need none).
+- Blob transfers use their own row and blob commands rather than the
+ attachments' chunk frames: they bind to a step attempt and a
+ direction, which attachments do not need.
## Open issues
+- Revoking a worker with a started step leaves it unproven (Cancel
+ stays); a revoked primary's steps are rebound to the new primary.
+- `have`/thin packs are on the wire but packs are whole one-commit packs.
+- Copy for the runner lines (waiting, offline, Runners) is not written;
+ slice D/E, with Luna's pass.
+- 4c_rebase failed once in a loaded full headless run, passed alone.
+
## Blockers
None.