reviews: Astra slice 1 plan round 3 (NOT READY, budget spent)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/reviews/CODEX-FINDINGS-SELF-SERVE-SLICE-1-R3.md+58 −0
CI failed — run details
Intent
<task-notification> <task-id>a491867be65834ac9</task-id> <tool-use-id>toolu_018JPgkiZojvYf4qB2xjRY6P</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/96a09f74-e398-48ed-a97f-140bd1f7e255/tasks/a491867be65834ac9.output</output-file> <status>completed</status> <summary>Agent "Resolve #413 merge with main" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>The merge is finished and pushed. All targeted tests pass, and the census overlay is re-frozen on top of main. **How each conflict was resolved:** - **`approved_moves_copy_test.go`:** the ID list has MV-O194, then MV-O200, O202, O203 and O204. - **Copy deck:** the MV-O194 section stays, followed by main's #339 section. All rows are approved as they were. - **E2E (`internal/host/movesoffline_e2e_test.go`):** this branch had its own loop writing a bare status report per box; I dropped it and used main's `reportStatus()`, which writes reports the way the real status loop does. I changed `reportStatus()` to go over `w.boxes()` instead of just ie and uk, so #413's pool box sends its report too. Both subtests are kept and pass, and neither is skipped: `a_pool_box_beside_the_target` and `stage_and_start_refuse_a_stale_live_link_on_the_target`. On the console side, #339's refusal check only looks at boxes that can hold the instance, so the two changes don't clash. - **Census chain:** main's three new lines come first (#339, fleet-tunnel-tls-state, replica-console-account), then this branch's line. Main's chain actually ends with replica-console-account, not #339. **Tests:** build, `go vet` and `gofmt` are clean. The root, console, host and provision census test runs all pass. **Census:** I re-ran `census-propose` with the branch's existing claim (`armOffline`, body change, `internal/host` re-pinned). The seal is now `87e151a5` → `f79b455e`. **Commits:** merge `a5815113`, census re-freeze `128c09e3`. The push moved the remote branch from `dad923b5` to `128c09e3`, so it also carried two earlier local commits (`e18f4f3c`, `e89c968e`) that weren't on the remote yet. Scratch files are deleted.</result> <usage><subagent_tokens>72673</subagent_tokens><tool_uses>26</tool_uses><duration_ms>491257</duration_ms></usage> </task-notification>
<task-notification> <task-id>bbcj0o0ic</task-id> <tool-use-id>toolu_013Umt3cMwch8TLjDCLaiz9c</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/96a09f74-e398-48ed-a97f-140bd1f7e255/tasks/bbcj0o0ic.output</output-file> <status>completed</status> <summary>Background command "Brief and run Astra check on #413 merge" completed (exit code 0)</summary> </task-notification>
Attributed to this commit: 32.3 g CO₂e (4,241,466 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on plan-tito-nesting-moves, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-SELF-SERVE-SLICE-1-R3.md b/docs/superpowers/reviews/CODEX-FINDINGS-SELF-SERVE-SLICE-1-R3.md| new file mode 100644 |
| index 000000000..e90988f55 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-FINDINGS-SELF-SERVE-SLICE-1-R3.md |
| @@ -0,0 +1,58 @@ |
| +R2 P1-1 — **Partly resolved:** hand-move adoption is removed and live jobs exclude hand doors, but release can leave an outstanding job write; finding 2. |
| +R2 P1-2 — **Resolved:** hand-flip reconciliation and the observation-time filter are removed. |
| +R2 P1-3 — **Resolved:** the driver now sets box clocks, reasserts reports and drains serial-driven work before assertions. |
| +R2 P2-4 — **Partly resolved:** ordinary downtime forces restaging, but recovery of a pending restage can make old evidence appear fresh; finding 4. |
| +R2 P2-5 — **Resolved:** the watcher covers terminal outcomes and unexpected states. |
| +R2 P2-6 — **Resolved:** the `/tmp` fallback is removed. |
| +R2 P2-7 — **Resolved:** round history and the remaining code reviews follow the stated ruling. |
| + |
| +Reviewed [the plan](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/plan-tito-nesting-moves/docs/superpowers/plans/2026-11-13-self-serve-moves-slice-1-one-command.md) at `d4fd5941`. HEAD is `3c4a6f8e`, which adds the brief. Code references below are from `origin/main` at `0ac757663bbef0733c09b33e8470421e84525c9d`, read with `git show`. No edits, subagents or tests. |
| + |
| +1. **P1 — Initial admission has no recovery path for its completed stage write.** |
| + |
| + **Invariant/fault family:** I2 — recovery must distinguish an intended transition from a completed and announced one. |
| + |
| + **Evidence:** plan:272 inserts a live row with no intent and saves `StageAsked` only after `offlineBeginMove` returns successfully. Bind at plan:411–414 merely recognizes the move; settlement at plan:417–429 handles no initial-stage intent. Staging at plan:451 requires `StageAsked == Move.StagedAt`. Existing admission writes the record before bumping the serial (`internal/console/apiinstancemove_offline.go:752–768`). |
| + |
| + **Failure:** the stage write commits, then the console crashes before saving `StageAsked`. Recovery binds the correct move but retains a zero `StageAsked`, so even a successful stager report cannot match. The job eventually aborts a healthy stage. A crash before the serial bump also leaves that notification unrecovered. `TestOfflineJobWaitsOutAnUncertainAdmission` cannot satisfy its promise to carry on from stage under these rules. |
| + |
| + **Fix:** give initial admission an explicit recoverable settlement boundary: restore its request identity and successfully announce the committed stage before normal decisions. Alternatively, cut automatic recovery for incomplete admission and report it explicitly. Cover crashes before the bump and before the final SQL save. |
| + |
| +2. **P1 — Abort and release discard unsettled transitions.** |
| + |
| + **Invariant/fault family:** I0/I2 — control requests must preserve outstanding effects and notifications until ownership can safely change. |
| + |
| + **Evidence:** plan:268 releases ownership and clears the intent without settling it; plan:269 overwrites any running intent with `abort`. Plan:416 closes an open record unless its intent remains `open`. Plan:431 explicitly allows an earlier write to land late. The record writer checks the move and record state, but no SQL job ownership (`internal/provision/provision.go:1186–1204`; `internal/provision/offline_move.go:374–387`). |
| + |
| + **Failure scenarios:** |
| + |
| + - An `open` write commits but returns an error before its serial bump. Before recovery, `run --abort` replaces the `open` intent. The next tick finds the record open and closes the job `stopped`, without recovering the bump. The target can remain held until ordinary reconciliation; the job has abandoned its notification. |
| + - A write returns an uncertain failure and remains outstanding remotely. `run --release` clears its intent and enables hand doors. That earlier write can subsequently commit against the unchanged record. The mutex excludes a running Go call; it does not fence a request already sent to storage. Thus a job can still open the instance after release has promised to leave it unchanged. |
| + |
| + **Fix:** refuse release while a transition remains unresolved, and settle an existing intent before accepting an abort decision. An already committed open must retain its notification and close as opened. Any handover must establish that an outstanding write cannot still commit. Add interleaving tests beyond the existing blocked-call mutex test. |
| + |
| +3. **P1 — The simulation’s writer assertion rejects the intended successful path.** |
| + |
| + **Invariant/fault family:** tests must distinguish job authority from legitimate box transitions. |
| + |
| + **Evidence:** plan:580–588 requires every committed record write while the row is live to come from a tick. Yet plan:447 explicitly permits box transitions. The prescribed `sealed` fixture writes `OfflineSealedBy` itself (`internal/console/apiinstancemove_offline_test.go:377–383`); production landing likewise writes `OfflineLandedBy` (`internal/host/movesoffline_land.go:100`). |
| + |
| + **Failure:** a successful simulation reaches sealing, invokes the specified box helper, and fails I0 because that committed write did not come from a job tick. Admission itself also writes after inserting the live row. |
| + |
| + **Fix:** classify writes by actor and transition. Permit initial admission and the two specified box transitions; require subsequent operator transitions to come from the owning job. Continue asserting that hand doors cannot write while ownership is live. This preserves a guard that can fail for the actual ownership defect. |
| + |
| +4. **P2 — Restage recovery resets freshness to observation time.** |
| + |
| + **Invariant/fault family:** start must follow a recently completed staging round. |
| + |
| + **Evidence:** plan:421 sets `StageAskedAt = now` when recovering a restage; plan:453 uses that timestamp for freshness. The stager records completion time after copying (`internal/host/movesoffline_stage.go:94–96`) and does not repeat an already answered request (:91–92). |
| + |
| + **Failure:** a restage commits and finishes, but its intent remains unsettled when the console goes down for 45 minutes. Recovery sets `StageAskedAt` to the current time. On the following tick, the old matching report passes “fresh” and can authorize start. Conversely, a newly completed round that took over two minutes is treated as stale because normal settlement timestamped the request, not its completion. |
| + |
| + **Fix:** distinguish request timing from completion freshness. Recovery must not rejuvenate old evidence. Add pending-restage downtime and slow-successful-round cases; the existing downtime test covers only an already settled request. |
| + |
| +No P3 findings. The operator gate, service-role declaration and linked refusal policy match existing doors. The proposed extraction preserves the existing check boundaries. Census generation follows final source edits, and UX/copy ordering follows the stated delegation. Two-console safety remains conditional on the accepted single-console assumption. |
| + |
| +Findings 1 and 2 share the established recovery fault family; finding 3 is a separate test-contract error. Refusing handover with unresolved writes and cutting automatic recovery for ambiguous admission would remove those cases, provided pending notifications remain recoverable. Cutting all unattended execution would remove the operational risks but also the slice’s purpose. Under the stopping rules, these findings require Paul’s choice of cut; they do not authorize another incremental recovery-fix round. |
| + |
| +NOT READY |
| \ No newline at end of file |