patch feat/sec-kn-4a-delegation-principal-binding-freeze #3 / 9
aaronrene · 42 days ago · Jul 26, 2026 · Diff

SEC-KN-4b: fix build-verification round-1 findings (4 MINOR)

BV1 governance: the handover's known-gaps block omitted that full npm test is not green, which frozen section 7.2 requires. Now disclosed with the proof that the 13 failures predate this build: the 4 real ones are stale resolveHostedActorRole source-shape assertions left by SEC-KN-3 (asserted-on source and test files are sha256-identical before and after the 4b commit, and they reproduce with no SEC-KN-4 module loaded). Opened roadmap row SEC-KN-3a.

BV2 test honesty: assert.notEqual on two compile-time constants proved nothing. Replaced with a real check that a refused apply returns no record and never persists the partition owner's derived principal.

BV3 rule fidelity: R5 is worded on the body's principal_ref OR owner_ref. The implementation scoped each ref to one record kind, which is equivalent only because the per-kind validators ignore the other field. Now checks both refs for every kind, with a cross-kind test (consent body smuggling org_ref in owner_ref).

BV4 coverage: the performance tier asserted wall-clock only. Added a read-counting test — every filesystem read during precheck is one of the policy or the two delegation stores, and a refusal never reads more than an accepted apply.

Also, two claims corrected with measurement rather than assumption: - Motoko compile is VERIFIED, not unverified. The reported dfx panic was terminal-colour detection; NO_COLOR=1 TERM=dumb dfx build --check hub succeeds with only pre-existing M0155 warnings. This also discharges the forward reference to isAsciiSpace that BV could not check statically. - The freeze's hedged repeat-deploy consequence is now measured: the first upgrade is accepted (moc --stable-compatible exit 0) and a repeat deploy is REFUSED with Compatibility error M0216. So there is no silent authorship erasure, but the canister is un-upgradeable until T4 restores the identity hook. R1.4 and gate T4 carry the measurement; SEC-KN-4c states it as the reason it is required.

SEC-KN-4 tests 31/31; delegation suites 31/31; canister:verify-migration exit 0. Governance sync (SD-17): ROADMAP + OVERSEER-HANDOVER in this commit. Not DONE — awaiting build verification round 2. No merge, no deploy.

sha256:3c8fff616c4f314ae3095734b9b6e92380446f0e7857f0e4ab7703f55760e9ae sha
+4 ~17 −2 symbols
sha256:17d4d0b0cdc5ead05379b9f31a9f8ab6d4c56199c8815b459ece1643d0ecc141 snapshot
+4
symbols added
~17
symbols modified
−2
symbols removed
0
dead code introduced
Semantic Changes 23 symbols
~ docs/OVERSEER-HANDOVER.md .md 3 symbols added, 2 symbols removed, 8 symbols modified
NEXT SESSION — SEC-KN-4b build verification (PRIMARY) section NEXT SESSION — SEC-KN-4b build verification (PRIMARY) L20–51
code[text] variable variable code[text] L29–40
+ NEXT SESSION — SEC-KN-4b build verification round 2 (PRIMARY) section NEXT SESSION — SEC-KN-4b build verification round 2 (PRIMARY) L20–81
+ code[text] variable variable code[text] L62–70
+ table section table L32–38
~ table
~ table
~ docs/ROADMAP.md .md 3 symbols modified
+ countReads function function countReads L728–740

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:3c8fff616c4f314ae3095734b9b6e92380446f0e7857f0e4ab7703f55760e9ae --body "your comment"