carlos / platform Public

review brief: same-box-edge-fence round 2 (#990)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
James Adam pushed by james@keymail.dev e467f44fecaf39bb8e865fd49557cfcede183880 parent cbf450c
1 file changed, +57 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-same-box-edge-fence-R2.md +57 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-same-box-edge-fence-R2.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-same-box-edge-fence-R2.md
new file mode 100644
index 000000000..fdceaa140
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-same-box-edge-fence-R2.md
@@ -0,0 +1,57 @@
+# Review brief: branch same-box-edge-fence (the edge fence, #990), round 2 of 3
+
+Repo carlos/platform, branch `same-box-edge-fence` on amadan.net.
+Under review: the diff `4f95eb302..<tip named in the prompt>`; the fixes
+since round 1 are `7aad44ce7..<tip>` (commit `cbf450cc3` and this brief).
+Authorities, plan and census card: as in round 1
+(`docs/superpowers/reviews/CODEX-REVIEW-BRIEF-same-box-edge-fence.md`);
+the census card is unchanged except the `internal/instancectl` envelope,
+re-pinned for the fixes.
+
+## Round 2
+
+Earlier rounds: round 1 (you, at `7aad44ce7`): NOT READY, P1
+"address-discovery failure leaves an unchecked exemption active"
+(family: fail-closed enforcement of the box-address boundary), P2
+"`not_needed` asserts connectivity that was never established" (family:
+status describes observed state); census: all units approved, the
+`internal/instancectl` envelope rejected for those two findings.
+
+First give one line per round-1 finding: resolved, partly, or not.
+Carry every unresolved or partly resolved finding forward at its
+current severity, then add new findings. The verdict covers everything
+outstanding.
+
+What changed:
+
+- `internal/instancectl/edgefence.go` `fenceWithoutAddresses`: with the
+ address read failing and the fence exempting, the remembered
+ addresses' fence must read back, or is reloaded, or the whole deny is
+ rebuilt (`lastDeny` plus the remembered addresses as /32 and /128)
+ and applied, and the fence is recorded off with reason
+ `fenceOffUnread` (retried every tick, since it is not a settled
+ reason).
+- `hardening.go`: `denyLocalAddrsLocked` calls it on an address-read
+ error (so RunProbe, the refresh and the pre-start check all do);
+ `denyLoopWith` now calls `denyLocalAddrsWith` on a read error while
+ the fence exempts (before, a read error skipped the tick).
+- `not_needed` is removed everywhere (report, status, CLI); a box with
+ no public address reports `off (no public address on this box)`.
+- Tests: `TestFenceIsCheckedWhenAddressesCannotBeRead` (reloaded, whole
+ deny over repeated ticks then recovery, before a start), mutation-
+ checked against the old tick.
+
+Also re-give the census verdict for the `internal/instancectl`
+envelope.
+
+Stopping rules: this is round 2. A P1 in the same family as round 1's
+P1 means rule 2 applies (two rounds in one family): say so, and say
+whether stating the invariant in one place and checking it with a
+guard test or a randomized simulation would remove it.
+
+## Severity, output
+
+As in round 1's brief: P1/P2/P3 with evidence and fault family, then
+the census verdict, then exactly one of READY, READY AFTER FIXES,
+NOT READY. Do not edit files (shared worktree); reply with findings.
+Targeted `go test -run` only.