Record final HA branch fix evidence
Record all five fix commits, RED and GREEN evidence, corrected mutation counts, passing local gates, and the final-tip review and CI work retained by the controller.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+69
−0
.superpowers/sdd/2026-11-03-region-ha-p1b3b-duties/branch-fix-report.md+69 −0
CI cancelled — superseded by a newer push — run details
diff --git a/.superpowers/sdd/2026-11-03-region-ha-p1b3b-duties/branch-fix-report.md b/.superpowers/sdd/2026-11-03-region-ha-p1b3b-duties/branch-fix-report.md| new file mode 100644 |
| index 000000000..ae7f96199 |
| --- /dev/null |
| +++ b/.superpowers/sdd/2026-11-03-region-ha-p1b3b-duties/branch-fix-report.md |
| @@ -0,0 +1,69 @@ |
| +# Final branch fix wave: P1b-3b slice T |
| + |
| +Status: DONE_WITH_CONCERNS. All five assigned items are implemented and committed locally on region-ha-p1b3b-duties. No push, subagents, infrastructure operations, amadan operations, live drill, or new review round. Starting tip: 160a85e8. Implementation tip: 59981797. This report is for the controller. |
| + |
| +## Item results and commits |
| + |
| +| Item | Commit | Result | |
| +|---|---|---| |
| +| P2-1, P22 | 1947902e | Unbound or unverifiable owner identities fall back to the original live EC2 callback. Classified owner, strict expiry and lifetime checks remain; lifetime is checked again after confirmation. Bound identities retain durable proof reads and persistence. Adapter failures and negative live answers reach the rate-limited takeover alarm with visitor or departure-finalize cause. | |
| +| P2-2 | e6f0edc0 | Initial identity loads and replacement loads share per-ref coalescing and negative caching. Unverified loads retry at 30/60/120/300 seconds, holding at 300. Edge ETag or configured binding changes reset initial refusals. Walks share the observation cache. Initial refusals are excluded from replacement-only paging. | |
| +| P2-3 | 45a98973 | mutate.sh labels nine self-reporting checks MODEL-ONLY, maps them to unit witnesses, and excludes them from CAUGHT totals. A deterministic script-output test verifies the distinction. The local controller B5 report has the corrected count and annotated historical extract. | |
| +| Census P3-4 | f7116c22 | Allow CARLOS_HA_FIXED_BOX_IDENTITIES through host.env; CARLOS_TERMINATION_QUEUE_URL was already allowed. Render only the validated binding map as single-quoted JSON. Preserve owner-only directory checks and 0600 file permissions. | |
| +| Census P3-1 | 59981797 | Empty timer registrations on claim-owned routes again return ErrClaimOwnership atomically. Only ImportHAOrdinaryWake opts into filling legacy registrations. Generic ImportWake preserves empty legacy registrations; strict adoption validation remains unchanged. | |
| + |
| +The production callback c.confirmed also needed the P22 change: it now skips enrollment for an unbound/unverifiable peer instead of overriding a successful live EC2 answer with an identity error. Bound enrollment failures still propagate. The armed-host witness uses the real confirmer, signed-but-unbound fixed peer record, identity repository and lease fixture, with CARLOS_HA_FIXED_BOX_IDENTITIES absent. |
| + |
| +The existing CAS witness previously returned true for every fallback iid. It now confirms only the original departed iid and checks that the changed owner is separately queried and refused. The positive durable-proof, persistence, restart, host-lifetime mismatch, equality, unexpired-lock and enrollment-failure witnesses remain covered. |
| + |
| +## RED then GREEN |
| + |
| +All logs are beside this report. Tests used TMPDIR=/home/paulca/t, nice -n 19 and the default Go cache. |
| + |
| +| Item | RED evidence | GREEN evidence | |
| +|---|---|---| |
| +| 1 | branch-fix-1-red.log: unbound takeover refused, visitor/due/finalizer fallback never called, lifetime/adapter failures silent. | branch-fix-1-green-final.log: activator, lease and host targeted tests pass. Includes expiry/equality, live fallback, armed fixed peer, bound proof, persistence/restart, request budget, telemetry and existing P1b-1 tests. | |
| +| 2 | branch-fix-2-red.log: duplicate initial GET from observation plus walk; missing identity read again at second 29. | branch-fix-2-green.log: unbound, malformed and missing records have no GET within backoff, exactly 12 GETs in a saturated hour, and reset on ETag or binding change. Existing replacement/history tests pass. | |
| +| 3 | branch-fix-3-red.log: all nine model-only rules counted as CAUGHT. | branch-fix-3-green.log: script reports nine MODEL-ONLY and one independent CAUGHT in the deterministic reporting fixture. bash -n passes. | |
| +| 4 | branch-fix-4-red.log and branch-fix-4-json-red.log: binding map refused first by the allowlist, then by bare-value rendering. | branch-fix-4-green.log: seed/fetch/render/parse/write round-trip, actual shell sourcing, 0600 and process ownership, unsafe binding refusal, and existing directory/allowlist tests pass. Production ownership remains root; the local writer test uses the existing owner seam. | |
| +| 5 | branch-fix-5-red.log: claim import succeeds incorrectly and generic legacy import mints a registration. | branch-fix-5-green.log: both importer entry points refuse missing claim registrations without changing rows or route metadata; explicit claim registrations remain attributed correctly; ordinary HA legacy restore still fills its registration. | |
| + |
| +Intermediate failures are retained. The first item-1 GREEN attempt exposed the outdated all-iid fallback in the CAS test; the final GREEN log is authoritative. The first item-3 harness draft listed fake rules on one line and was corrected before the recorded RED run. Census proposal retries removed claims for functions the scanner does not classify as read units; their source remains covered by package envelopes. These were local implementation checks, not additional review rounds. |
| + |
| +## Mutation evidence correction |
| + |
| +The historical B5 35-rule result is 26 invariant/executable catches and 9 model-only self-reporting checks. The startup source-overlay catch is included in the 26. The mutation sweep was not repeated. The reporting fixture tests classification only; it is not additional mutation sensitivity evidence. No production mutation switch was added. |
| + |
| +| Model-only mutation | Separate production unit coverage | |
| +|---|---| |
| +| delete-before-import | internal/host: TestDepartureNoEarlyDelete | |
| +| ack-before-import | internal/host: TestDepartureCompletionRescan | |
| +| ack-with-dead-releaser | internal/host: TestDepartureCompletionRescan | |
| +| proof-wrong-lifetime | internal/termfence: TestTerminationProofBinding; internal/lease: TestTerminationProofAcquireOnly | |
| +| finalizer-counts-as-visitor | internal/activator: TestDepartureFinalizeTelemetry | |
| +| delete-denied-is-complete | internal/host: TestDepartureDeleteDenied | |
| +| reuse-staged-rows-without-manifest-digest | internal/activator: TestHAAdoptManifestBoundary | |
| +| null-is-home | internal/host: TestDepartureIdentityWithoutEdges and TestDepartureCoverageIsolation | |
| +| started-waits-for-inventory | internal/hadeparture: TestTerminationConsumerStartupBound | |
| + |
| +## Final checks |
| + |
| +- One 3000-seed simulation: PASS, 0 failed, 18.029s. branch-fix-sim.log. |
| +- One focused race run across activator, lease, host, hostfiles, registry, hostenv and regionha simulation: all PASS. branch-fix-race.log. This also covers HA adoption replay, races, atomicity, remote parity, receipt migration and route recreation. |
| +- Cumulative census-propose NAME=region-ha-p1b3b-t refreshed after production items. Claims remain in docs/superpowers/notes/census-region-ha-p1b3b-t-claims.md. Final proposal log: branch-fix-5-census.log. |
| +- TestPlan14RootReadCensus, TestCensusScopeIsTheRootBinary and TestPlan9B8RecordWriteCensus: PASS, 14.387s. branch-fix-census-check.log. No record-write re-pin needed. |
| +- go vet ./...: PASS. branch-fix-vet.log. |
| +- Whole-tree gofmt -l: empty; git diff --check: clean. branch-fix-gofmt.log. |
| +- GOOS=darwin GOARCH=arm64 go build ./...: PASS. branch-fix-darwin.log. |
| +- GOOS=windows GOARCH=amd64 go build ./...: PASS. branch-fix-windows.log. |
| +- GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags '-s -w': PASS. Binary 56,492,194 bytes, ceiling 64,000,000. branch-fix-arm64.log. |
| + |
| +## Concerns and handoff |
| + |
| +Whole-branch R1 at 160a85e8 was READY AFTER FIXES, with no P1 and three P2. That review remains closed; no second whole-branch round was opened. The census approval at 160a85e8 predates these changes. The controller still owns the same-budget final census/security-path check, recording its verdict on #280, pushing, tip CI and landing. This report claims no independent approval or CI result for the final tip. Existing ledger P8/P11/P19/P21 limitations are unchanged; no full package suite or make test was run. |
| + |
| +Unbound fixed peers retain the pre-N-HA16 EC2-retention limit under P22. The binding map remains optional and operator-controlled. Its new renderer accepts a single-line JSON object with valid box labels and EC2 iid strings; shell syntax, apostrophes, backslashes and multiline input are refused. No general host.env quoting exception was introduced. Existing operator prose is reused; new takeover fields are structured logs. |
| + |
| +The B5 controller report was updated in its existing ignored location. This final report is committed explicitly as requested and includes the corrected evidence so it travels with the branch. Raw logs remain local beside it. |
| + |
| +Cleanup: the ARM64 binary and its exact task scratch directory were removed by the command trap. Test temporary directories were cleaned by their test harnesses. No shared cache, other user's files or shared packed-refs.lock was changed. Git printed that shared lock warning on commits, but git log confirmed each commit. No task process or server remains. Safe to close. |