carlos / platform Public

review: Plan 6 whole-branch R2 findings (READY)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev d2ad4bcf8e0cac94a3dd9baf281710df222d26a9 parent 3db30f4
1 file changed, +20 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-rootfs-apps-6-branch-R2.md +20 −0

CI failed — run details

Intent

Human

<task-notification> <task-id>a7099b6064086f5c2</task-id> <tool-use-id>toolu_01DzFDkcA5XsqEK4fZN8mfFK</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ba9fa944-a429-4788-9b3c-f2b2f42617f3/tasks/a7099b6064086f5c2.output</output-file> <status>completed</status> <summary>Agent "Plan 6 Task 10: console session door" 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 CI failure was the test's timing, not a leak in the door code, and the fix is pushed. **Root cause.** On a refused admission, the console sends the End frame first and drops the reservation a moment later. In `serveInteractive` the End goes out from `refuseSession`. The reservation is dropped by a deferred `release`, which runs when `serveInteractive` returns, just after. The test read the hub as soon as it had the End, so under CI load it sometimes saw the id still "reserved". **Evidence:** - **Not a leak.** That deferred `release` runs on every return where the session was never activated. There is no path where a refused admission keeps its reservation, so it can't block the host's next session. - **Ordering reproduced.** With a temporary 50 ms sleep before that release, the test failed 5 of 5 times with the exact CI message: `apiinteractive_lifetimes_test.go:158: the hub holds "tty_…" as "reserved"`. It didn't reproduce on an idle box in 400 runs (-count=200 -cpu=1,2). - **Fix holds under the widened window.** With the same 50 ms sleep in place, all three tests pass after the fix. - **A real leak is still caught.** With the release deleted, all three tests fail with "timed out waiting for the reservation's release". **Fix (test only).** The hub has a new test hook, `afterRelease`, beside `afterReserve`. Three tests read the hub right after a refused End: this one, `TestAFailedAdmissionReleasesItsReservation`, which had the same race, and `TestAFailedGrantPutReleasesWithinOpenWait`, which polled on a timer. All three now wait for the release before checking. No door behaviour changed. **Commit:** 3db30f44, pushed to origin `rootfs-apps-6-interactive` as a fast-forward from 8f656c94. The remote tip is 3db30f44. **-count=200 result:** pass. The run covered the C37 test and the failed-admission test at -cpu=1,2, 800 runs in total. The session-door and lifetimes tests also pass under `-race -count=2`. The census card is clean; its seal is now c86929d0 because the branch merged main, not because of this change. The darwin/arm64, windows/amd64 and linux/arm64 builds pass. **Concerns:** the untracked `docs/superpowers/reviews/CODEX-FINDINGS-rootfs-apps-6-branch-R2.md` in the worktree isn't mine, so I left it. During the push, git printed a credential-storage warning (read-only file system); the push itself landed.</result> <usage><subagent_tokens>450729</subagent_tokens><tool_uses>14</tool_uses><duration_ms>522576</duration_ms></usage> </task-notification>

Attributed to this commit: 28.7 g CO₂e (3,778,183 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on rootfs-apps-6-interactive, 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-rootfs-apps-6-branch-R2.md b/docs/superpowers/reviews/CODEX-FINDINGS-rootfs-apps-6-branch-R2.md
new file mode 100644
index 000000000..f1cd41244
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-rootfs-apps-6-branch-R2.md
@@ -0,0 +1,20 @@
+- **R1 P1 — resolved.** Expired-token replay is refused at [apirunsbox.go:226](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-6/internal/console/apirunsbox.go:226). Late pickup checks both the record and grant deadlines inside [RunPickBefore:253](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-6/internal/provision/run.go:253), so a retried CAS checks time again. Fault family: **grant expiry at the write-authority boundary**.
+- **R1 P2 — resolved.** The registered interactive route now journals service-credential refusals before returning the existing 403 at [authcli.go:497](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-6/internal/console/authcli.go:497). The journal remains limited per caller per minute at [apiinteractive.go:202](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-6/internal/console/apiinteractive.go:202). Fault family: **refusal observability across authentication layers**.
+
+Reviewed `3e60617e..45736122`, round **2 of 3**. HEAD `8f656c94eb514d8581b728d28c52eec1c032a4d0` adds only the review documents.
+
+**New findings:** no P1, P2 or P3.
+
+`RunPickBefore` adds no store requests. The bucket path still invokes the unchanged `RunPick`. Other CLI routes retain their existing role-first checks and 403 responses: `cliGate` delegates with a nil journal hook. The updated refusal witness exercises repeated service requests through the registered HTTP route.
+
+Targeted Go tests could not start: the read-only sandbox denied Go’s build-directory creation. No full suites ran. Read-only fingerprint checks matched all three re-pins; `git diff --check` passed. No files were edited or subagents spawned.
+
+**Census verdicts**
+
+| Scope | Verdict and evidence |
+|---|---|
+| `internal/provision` envelope | **APPROVE.** [run.go:253](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-6/internal/provision/run.go:253) adds an in-memory deadline refusal before the existing mutation. No root read or authority is added. The envelope hash matches all 41 production Go files. |
+| `Server.relayPickup` record-write re-pin | **APPROVE.** [apirunsbox.go:409](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-6/internal/console/apirunsbox.go:409) retains the same admitted `SetRecordRun` and record coordinates, with stricter pickup eligibility. The fingerprint matches. |
+| `Server.registerCLIRoutes` record-write re-pin | **APPROVE.** [authcli.go:826](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-6/internal/console/authcli.go:826) preserves the empty service-role set and adds the refusal journal hook. No record write is introduced. The fingerprint matches. |
+
+**READY**
\ No newline at end of file