runner: Task 15 review 1, register pack_incomplete with pending words
The instance recorded a hosted worker's pack_incomplete as unknown. wire.StepReasons now has it; work.reason.pack_incomplete is pending copy (listed in the slice 2 copy file); a chat test ingests the report and keeps cannot_run / pack_incomplete. Budget records raised.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 files changed,
+54
−3
.rastrillo/budgets.txt+3 −3docs/superpowers/plans/2026-11-30-hosted-slice-2-copy.json+9 −0docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md+1 −0docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md+10 −0internal/equipo/chat/hosted_pack_test.go+28 −0internal/equipo/copy.go+1 −0internal/wire/tasks.go+2 −0
CI failed — run details
CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/hosted-runners-2: Type Size Avail | ext4 96G 85G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type Size Avail | ext4 96G 85G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.5s
ci-box: codex: fetched and verified in 4.5s
ci-box: codex-code-mode-host: fetched and verified in 1.7s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.9s
ci-box: pi: installed and verified in 7.5s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.8s
ci-box: clone deepened in 5.1s
ci-box: file times set from content: 3873 files, 269 directories
ci-box: ready in 19.8s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
--- FAIL: TestReleaseCopyReviewed (0.09s)
task_pages_test.go:236: COPY REVIEW REQUIRED: copy-status.py verify found copy pending review or stale bookkeeping
FAIL
rastrillo-budget/v1 ran 93ms
FAIL amadan.net/oficina/equipo/internal/equipotest 0.252s
FAIL
make: *** [Makefile:273: copy-release-check] Error 1
amadan: step copy failed: exit status 2
amadan: job failed at step copy — its output is above, not at the tail of this log
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt| index 5bd4c329..811f2a44 100644 |
| --- a/.rastrillo/budgets.txt |
| +++ b/.rastrillo/budgets.txt |
| @@ -14,8 +14,8 @@ perf GET /* skip Unknown private paths render 404; this fallback contains no scr |
| time internal/equipo/team 60s Plan 3 loaded CI measured 45.985s; niced serial reruns measured 18.079s and 22.031s. Keep migration, recovery, accounting and concurrency assertions; 60s leaves 30 percent headroom above loaded CI. |
| time internal/equipotest 300s Final fix package rerun measured 187.035s (review 172.4s); 300s gives 60 percent headroom for HTTP, sandbox, authority and final regression coverage. |
| -size internal/equipo 24735 - Preview, retry, merges, kept work, check-db, notifications, places, GitHub routes, installer, abilities, lookups, Mac waits, slice F codes, D1, probe details, Design's copy, /api/team; measured 24735. |
| -size internal/wire 9860 - Protocols 31 to 35 (facts, diffs, evidence, CI units, files, places), abilities, 36 lookups, 37 Mac Engineering, 38 Design, unproven and probe detail codes, 39 hosted runners (hosted.go: placement, hosted_pack and deps transfer limits, enrolment types); measured 9848. Task 15 opened TransferHeader.Valid to hosted_pack (inbound, base then candidate) and added ReasonPackIncomplete; 9860. |
| +size internal/equipo 24736 - Preview, retry, merges, kept work, check-db, notifications, places, GitHub routes, installer, abilities, lookups, Mac waits, slice F codes, D1, probe details, Design's copy, /api/team; measured 24735. Hosted slice 2 Task 15 review 1: work.reason.pack_incomplete (pending); 24736. |
| +size internal/wire 9862 - Protocols 31 to 35 (facts, diffs, evidence, CI units, files, places), abilities, 36 lookups, 37 Mac Engineering, 38 Design, unproven and probe detail codes, 39 hosted runners (hosted.go: placement, hosted_pack and deps transfer limits, enrolment types); measured 9848. Task 15 opened TransferHeader.Valid to hosted_pack (inbound, base then candidate) and added ReasonPackIncomplete; 9860. Its review round 1 registered it in StepReasons; 9862. |
| size internal/equipotest - 12693 GitHub connect value search, lifecycle and sweep-log contracts; Task 21 migration fixtures, Rastrillo asset contract, renderer archive link; measured 0/12693 source/test lines. |
| time internal/runner/checks 90s CI worker measured 44.553s (44.6s rounded); |
| time internal/runner 330s Plan 3 CI repair measured 292.120s for the full package (controller CI 472.184s). |
| @@ -58,7 +58,7 @@ perf GET /api/v1/assistant/snapshot skip Assistant person API: bearer-only JSON |
| perf GET /api/v1/assistant/messages skip Assistant person API: bearer-only JSON for Base's chat, not a browser screen. |
| perf GET /api/v1/assistant/events skip Assistant event stream (Server-Sent Events), bearer-only and long-lived; not a screen. |
| perf GET /api/v1/assistant/abilities skip Assistant person API: bearer-only JSON for Base's Settings line, not a browser screen. |
| -size internal/equipo/chat 45105 18883 File facts/diffs, previews, merges, unfinished work, CI, receipts, Assistant files, places, abilities, lookups, go-aheads, Mac work, D1, Design specialists, grants, captures; 45093/18782. Hosted slice 2 Task 15: openHostedPack (the instance's send_pack for a hosted pack) and its test; 45105/18883. |
| +size internal/equipo/chat 45105 18911 File facts/diffs, previews, merges, unfinished work, CI, receipts, Assistant files, places, abilities, lookups, go-aheads, Mac work, D1, Design specialists, grants, captures; 45093/18782. Hosted slice 2 Task 15: openHostedPack (the instance's send_pack for a hosted pack) and its test; 45105/18883. Its review round 1 added the report-ingestion test for pack_incomplete; 45105/18911. |
| perf GET /api/v1/questions/{id} skip Thin v1 person API: bearer-only JSON for devices; the browser reads questions on /tasks/{id}. |
| perf GET /api/v1/steps/{id}/log skip Thin v1 person API: bearer-only JSON for devices; the browser shows the log tail on /tasks/{id}. |
| perf GET /api/v1/connections/preference skip Connections slice 1 person API: bearer-only JSON for devices; the browser shows the preference on /conversation/connections. |
diff --git a/docs/superpowers/plans/2026-11-30-hosted-slice-2-copy.json b/docs/superpowers/plans/2026-11-30-hosted-slice-2-copy.json| new file mode 100644 |
| index 00000000..4bdba38b |
| --- /dev/null |
| +++ b/docs/superpowers/plans/2026-11-30-hosted-slice-2-copy.json |
| @@ -0,0 +1,9 @@ |
| +[ |
| + { |
| + "key": "work.reason.pack_incomplete", |
| + "where": "Task view, why checks did not run: a hosted checks VM's pack lacked the base or the candidate commit (Task 15)", |
| + "draft": "the hosted machine did not receive both commits it needed", |
| + "paul_sees": true, |
| + "reviewed": "" |
| + } |
| +] |
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md| index fbd59ae2..6eb03cc3 100644 |
| --- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| +++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| @@ -7219,6 +7219,7 @@ records remain unchanged. |
| | `chat.card.build_note` | Which option should Equipo build? Say it in your own words. | Direction card (dynamic specialists slice 1, 2026-11-29) | COPY APPROVED (Paul, 2026-11-29, copy-review v4fsltihakfhehduzju7dgu47m, unchanged) | |
| | `api.direction_note` | Say which option to build. Open this card on the web to add your note. | Direction card (dynamic specialists slice 1, 2026-11-29) | COPY APPROVED (Paul, 2026-11-29, copy-review v4fsltihakfhehduzju7dgu47m, unchanged) | |
| | `work.explore.build_note` | %s said which option to build in their own words: %s | Build task brief (dynamic specialists slice 1, 2026-11-29) | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-29) | |
| +| `work.reason.pack_incomplete` | the hosted machine did not receive both commits it needed | Copy specialist | COPY REVIEW PENDING | |
| ## Task 21 |
diff --git a/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md b/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md| index 768eb076..2654bef4 100644 |
| --- a/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md |
| +++ b/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md |
| @@ -1151,3 +1151,13 @@ Mutation checks (exact unique string replaced by a script, `-count=1 -timeout 12 |
| 164. No header guard on the worker (`if !want.Valid()` → `if false`). Same test: FAIL `hosted_pack_test.go:192: hosted checks without a base: {... Checks:passed ...}`. Restored. |
| 165. `Valid` accepts a base equal to the candidate. `-run TestHostedPackHasBaseAndCandidate`: FAIL `hosted_pack_test.go:110: the base is the candidate: fork/exec /nonexistent/git: no such file or directory, want refused before git runs`. Restored. |
| 166. The instance opens a hosted pack without checking the header (`if !h.Valid()` → `if false` in `openHostedPack`). `-run TestHostedPackSendPackFromInstance`: FAIL `hosted_pack_test.go:94: hosted pack on base "": <nil>, want ErrInvalid`. Restored. |
| + |
| +### Task 15 review round 1 (t15-r1.md: one Important finding, fixed) |
| + |
| +`pack_incomplete` was emitted by the worker but not in `wire.StepReasons`, so `stepReport` recorded it as `unknown`. Now `ReasonPackIncomplete` is registered in `StepReasons`. Its words, `work.reason.pack_incomplete` = "the hosted machine did not receive both commits it needed", are in `internal/equipo/copy.go`, marked pending with `python3 scripts/copy-status.py pending` (stdin `{"candidate": <worktree>, "keys": ["work.reason.pack_incomplete"]}`; the inventory row in `CONTROLLER-REPORT-plan-3.md` says COPY REVIEW PENDING; not accepted) and listed in `docs/superpowers/plans/2026-11-30-hosted-slice-2-copy.json` (new). New test `TestHostedPackIncompleteReportKept` (chat) ingests a hosted worker's done / `cannot_run` / `pack_incomplete` report through `stepReport` and reads the step back. |
| + |
| +Red: `go test ./internal/equipo/chat -run TestHostedPackIncompleteReportKept -count=1` FAIL `hosted_pack_test.go:127: hosted pack_incomplete report kept as state "done" checks "cannot_run" reason "unknown"`. |
| + |
| +Green: that test ok. The brief's command: ok. `./internal/wire` whole package, `./internal/equipo -run 'TestStepReasons|Copy'` (`TestStepReasonsHaveWords` included), chat `-run 'TestHostedPack|TestTransfer|TestPlacement'`, thintest `-run 'TestContractTransfer|TestReview'`: ok. `make budget build vet`: exit 0 (records: internal/equipo 24736, wire 9862, chat 45105/18911, with reasons). gofmt and `git diff --check`: clean. `python3 scripts/copy-status.py verify` (stdin `{"candidate": <worktree>}`): `{"valid": false}` with the pending entry, by design (pending blocks release until Copy or Paul reviews it); `{"valid": true}` on the tree without this change. |
| + |
| +167. The registration removed (`ReasonPackIncomplete: true,` deleted from `StepReasons`). `-run TestHostedPackIncompleteReportKept`: FAIL `hosted_pack_test.go:127: hosted pack_incomplete report kept as state "done" checks "cannot_run" reason "unknown"`. Restored (checked with `cmp`). |
diff --git a/internal/equipo/chat/hosted_pack_test.go b/internal/equipo/chat/hosted_pack_test.go| index 60438102..186aabff 100644 |
| --- a/internal/equipo/chat/hosted_pack_test.go |
| +++ b/internal/equipo/chat/hosted_pack_test.go |
| @@ -99,3 +99,31 @@ func TestHostedPackSendPackFromInstance(t *testing.T) { |
| t.Fatalf("transfers %d %v, want 2", n, err) |
| } |
| } |
| + |
| +// A hosted worker's report that its pack lacked a commit keeps its |
| +// outcome through ingestion: checks cannot_run, reason pack_incomplete |
| +// (wire.StepReasons), never unknown. |
| +func TestHostedPackIncompleteReportKept(t *testing.T) { |
| + r := placementRig(t) |
| + r.s.authority.RunnerRole = func(*gorm.DB, string) (string, error) { return wire.RoleWorker, nil } |
| + st := stepRecord{ID: "s_pack", TaskID: "tk_move", Person: hkOwner, RunnerID: "RUNNER1", Specialist: wire.SpecialistChecks, State: wire.StepRunning, Attempt: 1, BaseSHA: strings.Repeat("a", 40), CandidateSHA: strings.Repeat("b", 40)} |
| + if err := r.s.db.G.Exec("CREATE TABLE runners (id text, person text, role text, label text, revoked_at datetime, removing_at datetime, tainted_at datetime)").Error; err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := r.s.db.G.Create(&st).Error; err != nil { |
| + t.Fatal(err) |
| + } |
| + rep := wire.StepReport{TaskID: "tk_move", StepID: "s_pack", Attempt: 1, State: wire.StepDone, Termination: true, BaseSHA: st.BaseSHA, CandidateSHA: st.CandidateSHA, Checks: wire.ChecksCannotRun, Reason: wire.ReasonPackIncomplete, Findings: []wire.Finding{}} |
| + if err := r.s.tx(context.Background(), func(tx *txn) error { |
| + return tx.stepReport(Lease{Runner: RunnerPrincipal{RunnerID: "RUNNER1", Person: hkOwner}, Protocol: wire.ProtocolCurrent}, &rep) |
| + }); err != nil { |
| + t.Fatal(err) |
| + } |
| + var got stepRecord |
| + if err := r.s.db.G.First(&got, "id = ?", "s_pack").Error; err != nil { |
| + t.Fatal(err) |
| + } |
| + if got.State != wire.StepDone || got.Checks != wire.ChecksCannotRun || got.Reason != wire.ReasonPackIncomplete { |
| + t.Fatalf("hosted pack_incomplete report kept as state %q checks %q reason %q", got.State, got.Checks, got.Reason) |
| + } |
| +} |
diff --git a/internal/equipo/copy.go b/internal/equipo/copy.go| index 6c245035..9c441243 100644 |
| --- a/internal/equipo/copy.go |
| +++ b/internal/equipo/copy.go |
| @@ -982,6 +982,7 @@ var pageCopy = map[string]string{ |
| "work.reason.checks_timeout": "the checks ran out of time", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| "work.reason.checks_unavailable": "this runner cannot run the checks", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| "work.reason.needs_network": "the checks need a network connection", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| + "work.reason.pack_incomplete": "the hosted machine did not receive both commits it needed", // COPY REVIEW PENDING |
| "work.reason.placement_refused": "no runner could take it", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| "work.reason.withdrawn": "it was withdrawn before it started", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| "work.reason.transfer_refused": "the work could not move between runners", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
diff --git a/internal/wire/tasks.go b/internal/wire/tasks.go| index 2508d8a0..fecbcfd3 100644 |
| --- a/internal/wire/tasks.go |
| +++ b/internal/wire/tasks.go |
| @@ -1125,6 +1125,8 @@ var StepReasons = map[string]bool{ |
| "preview_public_disabled": true, |
| "preview_host": true, |
| "needs_network": true, |
| + // A hosted worker's pack lacked the base or the candidate. |
| + ReasonPackIncomplete: true, |
| // Merge: the branch conflicts with the default branch; the branch is |
| // no longer at the judged SHA; the hub's own CI on the commit is not |
| // green (still running, or failed); the agent may not merge here; or |