review: Astra round 1 findings, store write credential phase 2 fixes
NOT READY: one P1 (a floor read failing at the swap poisons an untried promotion) and two P2s (guard misses helpers and aliases; witnesses lack no-floor controls).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+37
−0
docs/superpowers/reviews/REVIEW-FINDINGS-store-write-credential-phase2-fixes-R1.md+37 −0
diff --git a/docs/superpowers/reviews/REVIEW-FINDINGS-store-write-credential-phase2-fixes-R1.md b/docs/superpowers/reviews/REVIEW-FINDINGS-store-write-credential-phase2-fixes-R1.md| new file mode 100644 |
| index 000000000..3ce9dffcf |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/REVIEW-FINDINGS-store-write-credential-phase2-fixes-R1.md |
| @@ -0,0 +1,37 @@ |
| +Reviewed `2cadcb43..df903327bf8b2fd4b28bed39a3cce736a2a52ab9`, round 1 of 3. |
| + |
| +1. **P1 — Fix 1: A transient floor-read failure can permanently refuse an untried promotion.** |
| + |
| + **Evidence:** Active recovery checks the floor, captures a rollback attempt, then checks again through `PointLive`. If that second check fails, it returns without cancelling the attempt at [namedrecovery_active.go:190](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/store-write-credential-phase2-fixes/internal/host/namedrecovery_active.go:190). On resume, the still-running previous build causes `Recovering = true` at [roothistory_recovery.go:203](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/store-write-credential-phase2-fixes/internal/host/roothistory_recovery.go:203). That outcome subsequently blocks the target promotion through [namedrecovery.go:183](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/store-write-credential-phase2-fixes/internal/host/namedrecovery.go:183). |
| + |
| + **Failure scenario:** A valid writer-aware console passes the early check, but the listing at the swap times out. Nothing moves or restarts. Resuming the attempt while it remains valid records a recovery onto the unchanged previous build. Once storage recovers, the same promotion remains refused despite never having run. This can happen with phase 2 still off. |
| + |
| + **Fix:** Handle `ErrConsoleFloor` after capture as an aborted, unpublished attempt, without creating a failed/recovering release outcome. Preserve crash recovery for actual publication. Add a witness that fails only the second listing, resumes recovery, and successfully retries the same promotion. |
| + |
| + **Fault family:** Admission failures must remain retryable and must not poison unattempted releases. This is distinct from the two deferred security families. |
| + |
| +2. **P2 — Fix 1, guard: Helper-mediated repoints escape detection.** |
| + |
| + **Evidence:** [consolefloor_guard_test.go:126](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/store-write-credential-phase2-fixes/internal/release/consolefloor_guard_test.go:126) resets its state per function and requires both a recognized live-link name and a recognized writer in that function. It neither follows helpers nor resolves import aliases. |
| + |
| + **Failure scenario:** A caller passes `release.LiveLink(...)` into a helper that performs `os.Symlink` and `os.Rename`. The caller has no recognized writer; the helper has no recognized live-link name. Both pass the guard. The repository already uses this helper structure in [hardening.go:92](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/store-write-credential-phase2-fixes/internal/instancectl/hardening.go:92). |
| + |
| + **Fix:** Cover writing helpers and import aliases, or inventory primitive writers and enforce reviewed caller restrictions. Add negative fixtures for a helper-mediated repoint and an aliased `os` import. |
| + |
| + **Fault family:** Version changes must preserve credential retirement and storage enforcement—the first deferred family. The required regression guard does not yet establish its claimed boundary. |
| + |
| +3. **P2 — Fix 1, witnesses: D1 and held-stage coverage lacks the required controls.** |
| + |
| + **Evidence:** The D1 witness tests only refusal modes at [consolefloor_paths_test.go:181](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/store-write-credential-phase2-fixes/internal/release/consolefloor_paths_test.go:181), as does the held-stage witness at [consolefloor_paths_test.go:294](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/store-write-credential-phase2-fixes/internal/release/consolefloor_paths_test.go:294). Its restore case calls `restoreLive` directly at line 327 rather than reaching it through a failed second bind. |
| + |
| + **Failure scenario:** These witnesses do not establish that their console fixtures successfully repoint without the floor, or that held publication invokes the guarded restore on its actual failure path. |
| + |
| + **Fix:** Add no-floor controls using the same console fixtures, and exercise restoration through `publishHeld` after a failed second bind. Cover floor presence and listing failure there. |
| + |
| + **Fault family:** The first deferred family’s required per-path regression coverage. |
| + |
| +No additional finding in Fix 2. Static inspection confirms the AWS adapter sends its `NotAction` rendering; maximum documents calculate to 1,009 bytes for AWS and 1,082 for MinIO. The pinned SDK supplies 147 combined operation/documentation action names, including the previously omitted actions. Phase 2 remains off. |
| + |
| +Targeted Go tests could not start because the read-only sandbox refused Go’s work directory. `git diff --check` passed; no files changed, network services contacted, or subagents spawned. Census integration approval for `namedUnitRecovery.recover` and the host envelope is withheld pending finding 1. |
| + |
| +NOT READY |
| \ No newline at end of file |