carlos / platform Public

member backups: Astra 1b plan round 2 findings (#898)

Stopping rule 2 choices (controller, per Astra's recommendation): refuse lifecycle installation unless the replica namespace is disjoint from downloads/; one complete task-dependency pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 4904268a65c8fe4bc75283eef504ae93ec37ea8f parent 43452ac
1 file changed, +58 −0
  • docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-plan-1b-R2.md +58 −0

CI cancelled — superseded by a newer push — run details

Intent

Attributed to this commit: 31.7 g CO₂e (4,141,858 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-member-backups, 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/notes/reviews/member-backups/CODEX-FINDINGS-plan-1b-R2.md b/docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-plan-1b-R2.md
new file mode 100644
index 000000000..2315a21f7
--- /dev/null
+++ b/docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-plan-1b-R2.md
@@ -0,0 +1,58 @@
+| Round-one finding | Round-two assessment |
+|---|---|
+| CODEX P1-1: lifecycle verification | **Resolved:** retention fields and multipart cleanup are required, with adapter tests. |
+| CODEX P1-2: abandoned jobs block admission | **Resolved:** account jobs are reconciled before admission. |
+| CODEX P1-3: Task 3 depends on Task 6 | **Partly:** guards moved, but the changed constructor needs additional caller migrations; finding 2. |
+| CODEX P1-4: missing parity registration | **Resolved:** Task 9 registers the routes and runs parity checks. |
+| CODEX P1-5: inconsistent authorization refusals | **Resolved:** a dedicated gate replaces the redirecting helpers. |
+| CODEX P2-6: obsolete job reused after recreation | **Resolved:** full-binding comparison, atomic retirement and page filtering are specified. |
+| CODEX P2-7: ready jobs excluded from account cap | **Resolved:** unexpired ready jobs count. |
+| FABLE P1-1: idle home-box polling | **Resolved:** home agents list only on serial-move nudges, with a request-count test. |
+| FABLE P2-2: recreated instance blocked by old job | **Resolved:** retirement and fresh admission are specified. |
+| FABLE P2-3: export without audit | **Resolved:** publication follows successful audit insertion. |
+| FABLE P2-4: Task 3 not self-contained | **Partly:** authority checks moved, but caller migrations remain unspecified; finding 2. |
+| FABLE P2-5: lifecycle can delete replicas | **Partly:** runtime refusal was added, but lifecycle installation remains unconditional; finding 1. |
+| FABLE P3-6: unused regional export capability | **Resolved:** regional export configuration and capability are refused. |
+| FABLE P3-7: inconsistent 404s | **Resolved:** all three doors have uniform-refusal tests. |
+| FABLE P3-8: capability evidence ignores bucket | **Resolved:** download evidence filters by published `DataBucket`. |
+| FABLE P3-9: references and wording | **Resolved:** cited locations, deletion timing and startup-only verification were corrected. |
+
+Round 2 of 3: **3 P1, 1 P2**. Reviewed plan rev 2 at `79bac85c`, present at HEAD `735b4527`; the brief’s `d17d3e23` predates that revision. No files changed, tests run or reviewers spawned. `GOCACHE` remains unset.
+
+1. **P1 — The prefix refusal does not protect replicas from lifecycle deletion.**
+ **Fault family: lifecycle isolation from production replicas.**
+
+ [Task 1:72](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-12-member-backups-slice1b.md:72) installs expiration rules on `downloads/` without a namespace precondition. The new guards only withhold the uploader ([Task 6:185](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-12-member-backups-slice1b.md:185)) and disable console downloads ([Task 8:226](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-12-member-backups-slice1b.md:226)).
+
+ With `CARLOS_HIBERNATE_PREFIX=downloads`, existing replicas are already under that lifecycle prefix: [`HibernatePrefix`:166](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/internal/activator/activator.go:166) joins the configured prefix and host. Applying Task 1 therefore expires those replicas even with downloads disabled.
+
+ **Fix:** refuse lifecycle installation unless the replica namespace is verified disjoint from `downloads/`. Put the gate before the infrastructure mutation, with an operator report and tests proving unsafe configurations cannot install the rules. Runtime feature refusal alone cannot enforce this invariant.
+
+2. **P1 — The revised task boundaries still cannot pass their prescribed checks.**
+ **Fault family: executable task dependencies.**
+
+ [Task 3:118](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-12-member-backups-slice1b.md:118) makes `NewAgent` return an error, but its file list omits existing single-result callers in [`fixture_test.go`:248](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/internal/dbreads/fixture_test.go:248), [`dbreadstest.go`:61](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/internal/dbreads/dbreadstest/dbreadstest.go:61) and [`dbreads_rootrunner_linux_test.go`:623](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/internal/host/dbreads_rootrunner_linux_test.go:623). The latter also calls the capability helper being replaced at line 641. These packages cannot compile under the listed edits.
+
+ Separately, [Task 8:238](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-12-member-backups-slice1b.md:238) requires `TestVerifyDownloadsThroughAdapter` to pass using `NewS3DownloadObjects`, which is created in [Task 9:270](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-12-member-backups-slice1b.md:270).
+
+ **Fix:** include all constructor and capability-helper caller migrations in Task 3. Move the adapter test and its verification command into Task 9, or move the adapter into Task 8. Check the dependency order once across the complete task list.
+
+3. **P1 — Disconnecting after job insertion can prevent dispatch despite the required witness.**
+ **Fault family: durable dispatch after browser disconnection.**
+
+ [Task 8:230](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-12-member-backups-slice1b.md:230) inserts the job, writes its audit row, then calls `publishDBDownload`. Only that last function detaches from the browser context. Yet line 243 requires cancellation immediately after insertion to leave both request and queue published.
+
+ The audit helper calls [`withAutoAppSQL`](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/internal/console/claim_sql_auto.go:14), whose preliminary [`demoClaimMutationRefusal`:280](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/internal/console/demo_claim_target.go:280) executes `QueryRowContext` with that context. Cancellation therefore fails the audit before execution reaches the detached publisher; the planned failure path leaves an unpublished job.
+
+ **Fix:** after successful job insertion, use a bounded detached context for the entire audit-and-publication sequence, including failure-state writes. Keep audit success mandatory. Exercise the disconnect witness through the real activity helper.
+
+4. **P2 — Reloading without JavaScript does not reconcile the job.**
+ **Fault family: page state reflects durable job progress.**
+
+ [Task 9:265](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-12-member-backups-slice1b.md:265) defines `downloadJob` as a binding-checked database read. Task 10 uses that reader for the page; reconciliation is specified for the status endpoint, startup and new starts. Consequently, a completed job can remain displayed as preparing on every ordinary page reload, contradicting [Task 10:296](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-12-member-backups-slice1b.md:296).
+
+ **Fix:** after binding validation, reconcile on the instance-page request using the existing throttle. Add a test that publishes completion, performs only a page GET, and sees ready; cover expiry similarly. This adds no background polling.
+
+The replica-isolation and task-dependency families have now appeared in two consecutive rounds. Apply stopping rule 2 before another incremental fix. For replica isolation, I recommend the up-front installation refusal; the alternatives are cutting shared-bucket downloads or centralizing and testing the namespace invariant.
+
+**NOT READY**
\ No newline at end of file