feat(guardian): one rotation verdict and one status derivation behind a claim fence - #795
Open
WiktorStarczewski wants to merge 2 commits into
Open
feat(guardian): one rotation verdict and one status derivation behind a claim fence#795WiktorStarczewski wants to merge 2 commits into
WiktorStarczewski wants to merge 2 commits into
Conversation
…ations behind a claim fence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every user-facing claim about a guardian rotation or the guardian's live status now comes from one of two derivation modules, with a source-scan fence so no surface can reintroduce a local reading of the raw fields — closing the defect class behind six separate findings in #786's review (a surface certifying a rotation the wallet never confirmed).
lib/miden/guardian/rotation-verdict.ts— the only reader ofcommitUnconfirmed/registerFailed/endpointPersistFailed; rows map to a closed verdict union where "unconfirmed" is a variant, never a flag default.lib/miden/front/guardian-presentation.ts+useGuardianPresentation— the only derivation of pill / fault / last-sync / prompt;sendsBlockedis theassertGuardianInSyncpredicate imported, not restated.displayMessagesnapshot), dApp sync-status coarsening.guardian-claim-fence.test.ts— source-scan oversrc/with an explicit allowlist (interpreters, the one writer, transport plumbing); adding a raw read elsewhere fails CI.guardianSwitchUnconfirmedHeading's existing translations reused for the row title).Also closed in passing
isSwitchGuardianExtraInputsguard silenced all three flags on a row with a malformednewGuardianEndpoint; the verdict reads flags regardless, so such a row now shows its honest warning.Part 1 of 4 of the seam plan from #786's review (next: guardian-write CAS, attempt ledger, recovery dispatcher). No writes touched — pure derivation + surface migration; 604 suites / 9,991 tests, ts, lint, i18n all green.
Reviewers: the fence allowlist in
guardian-claim-fence.test.tsis the part worth your time — it is the claim that this list of raw-field readers is complete and correct.