edge-roll-blip: Astra spec review round 1 findings (NOT READY, 2 P1)
1 file changed,
+63
−0
docs/superpowers/specs/CODEX-REVIEW-FINDINGS-edge-roll-blip-spec.md+63 −0
diff --git a/docs/superpowers/specs/CODEX-REVIEW-FINDINGS-edge-roll-blip-spec.md b/docs/superpowers/specs/CODEX-REVIEW-FINDINGS-edge-roll-blip-spec.md| new file mode 100644 |
| index 000000000..8381c5332 |
| --- /dev/null |
| +++ b/docs/superpowers/specs/CODEX-REVIEW-FINDINGS-edge-roll-blip-spec.md |
| @@ -0,0 +1,63 @@ |
| +Reviewed round 1 at `e0b2877a`. No files changed or test suites run. Amadan #434 was inaccessible from the sandbox; the committed binding brief supplied the scope. |
| + |
| +1. **P1 — §4 rows 6/8/9: recovery can leave an old binary behind an active socket indefinitely.** |
| + |
| + D4 checks the binary only when the socket starts. At boot, the socket can pass that check before recovery replaces the binary. `restoreFiles` then renames the old binary into place at [systemapply.go:1892](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/edge-roll-blip/internal/host/systemapply.go:1892), but can return on a directory-sync error or failed staging before reaching socket removal at line 1927. `recoverIfNeeded` returns immediately on that failure at line 2061. The recovery unit has no automatic retry. |
| + |
| + **Failure scenario:** interrupted first installation boots with the new binary and socket; recovery restores the old binary, then fails before disabling the socket. On an unguarded box, the old edge starts and fails with `EADDRINUSE`. D4 never reruns because the socket remains active. Row 8’s “active socket implies a socket-aware binary” claim is false. |
| + |
| + **Fix:** enforce socket release before replacing a socket-aware binary with an incompatible one. Require compatible apply/recovery machinery before enabling this feature; refuse activation on older paths unless an independent compatibility guard covers them. Test failures after the rename and before unit removal, including boot recovery. |
| + |
| + **Fault family:** rollback compatibility—an incompatible edge must never start while PID 1 holds its ports. |
| + |
| +2. **P1 — D10: probed local upstreams still fail requests during a restart.** |
| + |
| + D10 explicitly excludes `multiProxy`, although the binding brief requires local upstream restarts to become queued waits without 502/503. A valid `Health` configuration selects `multiProxy` at [edge.go:846](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/edge-roll-blip/internal/edge/edge.go:846). That proxy immediately rejects an empty live set at line 2838, ejects a refused upstream at line 2876, and returns 503 at line 2892. |
| + |
| + **Failure scenario:** a single probed loopback upstream restarts. Requests receive immediate 503 responses, even if it returns well within 13 seconds. This also leaves the console outcome dependent on an unverified route-shape assumption. |
| + |
| + **Fix:** define a bounded hold for probed local routes too, preserving health admission: wait for an eligible local upstream to return rather than dialing an ejected endpoint. Test both refusal-before-probe-update and already-empty-live-set cases. |
| + |
| + **Fault family:** restart admission—supported local route shapes must receive the promised bounded wait. |
| + |
| +3. **P2 — D5: closing an unmatched inherited listener does not guarantee successful fallback.** |
| + |
| + [Design lines 230–236](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/edge-roll-blip/docs/superpowers/specs/2026-10-27-edge-roll-blip-design.md:230) require IP matching, close unmatched descriptors, and claim malformed handoffs cost only a blip. But D6 correctly establishes that PID 1 retains its own socket reference. |
| + |
| + **Failure scenario:** the socket holds dual-stack wildcard port 80, while the service specifies `-http 127.0.0.1:80`. Rejecting the wildcard descriptor and closing the child’s copy leaves PID 1 holding the conflicting port. Fallback binding fails and the edge exits through the fatal listener path at [edge.go:3820](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/edge-roll-blip/internal/edge/edge.go:3820). |
| + |
| + **Fix:** distinguish absent listeners from incompatible inherited listeners. Define supported address compatibility, require matching socket overrides for restricted addresses, and reject conflicting configurations before activation. Remove the unconditional availability guarantee and test this collision. |
| + |
| + **Fault family:** listener ownership and configured bind scope. |
| + |
| +4. **P2 — §1.3: the asserted rollback version floor is incorrect and conditional.** |
| + |
| + [Design line 92](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/edge-roll-blip/docs/superpowers/specs/2026-10-27-edge-roll-blip-design.md:90) says the layout floor refuses everything below v0.24.2. The actual constant is **v0.25.0** at [layoutintent.go:211](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/edge-roll-blip/internal/release/layoutintent.go:211), and [systemapply.go:583](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/edge-roll-blip/internal/host/systemapply.go:583) refuses only when `layoutReversalReasons()` is nonempty. This is not an unconditional minimum updater version. |
| + |
| + **Failure scenario:** a flat box admits an older release that the compatibility argument incorrectly excludes. |
| + |
| + **Fix:** state the actual conditional floor and establish the supported applier/recovery baseline independently. I verified that **v0.18.0** records `UnitsAdded` at `internal/host/systemapply.go:353`, invokes `disable --now` at line 523, and passes `UnitsAdded` into restoration at line 797; those facts do not establish an unconditional installation floor. |
| + |
| + **Fault family:** compatibility eligibility—version exclusions must follow enforced checks. |
| + |
| +5. **P2 — §7 W2: the witness does not consistently select the binary it builds.** |
| + |
| + [W2 lines 376–379](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/edge-roll-blip/docs/superpowers/specs/2026-10-27-edge-roll-blip-design.md:376) retain D2’s socket lines except for listed overrides. Those overrides leave `ExecStartPre=/opt/carlos/carlos system edge-socket-check` intact, while the service uses bare `ExecStart=carlos edge …`. Neither selects the temporary build explicitly. `/opt/carlos/carlos` is absent on this machine. |
| + |
| + **Failure scenario:** the socket check fails before binding, or the service executes another installed binary; the witness cannot establish the proposed handoff. |
| + |
| + **Fix:** use the temporary build’s absolute path in both commands, remove both system-account directives for the user units, and assert socket activity and inherited-listener logs before measuring. |
| + |
| + **Fault family:** verification identity—the witness must exercise the built binary and intended activation path. |
| + |
| +6. **P2 — D1: the fd-store comparison omits the supported preservation setting.** |
| + |
| + [Design line 138](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/edge-roll-blip/docs/superpowers/specs/2026-10-27-edge-roll-blip-design.md:138) categorically says stop/start loses stored descriptors. Installed systemd 257 documentation, `systemd.service(5)`, `FileDescriptorStorePreserve=`—decompressed source lines 1568–1586—documents `yes`, which retains them until the inactive unit is unreferenced and unloaded. |
| + |
| + **Failure scenario:** the mechanism comparison rejects configured preservation using the default setting’s behavior. |
| + |
| + **Fix:** distinguish default `restart` preservation from `yes`, including its unit-retention condition. The lack of fresh-boot listeners and rollback incompatibility remain separate reasons to prefer socket units. |
| + |
| + **Fault family:** mechanism evidence—compare supported configurations accurately. |
| + |
| +**NOT READY** |
| \ No newline at end of file |