Repository navigation
test(qa): record the ADR-0091 grant validity-window primitive in the authz conformance matrix - #9376
Merged
Conversation
…authz conformance matrix (#8811) The ADR-0056 D10 matrix states one row per authorization primitive in exactly one honest state, but carried no row for the ADR-0091 grant validity windows — the only mentions were incidental. Adds the `grant-validity-window` row as `enforced` with no `covers`, mirroring the ADR-0049/#8613 `active`-flag disposition, and refreshes the header counts the new row moves. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. ✅ What this run could not see
Coarse fallback — 2 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
os-zhuang
marked this pull request as ready for review
August 17, 2026 20:05
This was referenced Aug 17, 2026
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.
Fixes #8811
The ADR-0056 D10 matrix states "one row per authorization primitive, each in EXACTLY ONE honest state", but carried no row for the ADR-0091 grant validity windows. This adds it, mirroring the ADR-0049/#8613
active-flag disposition: anenforcedrow with nocovers, documented as a statement about the ratchet's reach rather than an assertion the ratchet checks.The row's
enforcedclaim was verified at the call sites, not taken from the filingThe card named
isGrantActiveat "three call sites" inresolve-authz-context.ts. Measured on the branch point, the raw count of 5 there decomposes as 1 import + 1 comment + 3 real call sites — so the count is right, but two of the card's other premises are not:1. The primitive's enforcement is much broader than one file.
isGrantActiveis applied at every seam that turns a window-carrying row into authority — 7 non-test files:resolve-authz-context.ts(steps 4 and 6),explain-engine.ts,position-graph.ts,delegated-admin-gate.ts,last-admin-guard.ts,approval-service.ts, andruntime/domains/keys.ts. The row names all of them.2. The card's description of call site 1 is wrong, and it matters. The card says the
sys_membercall happens "before the membership role projection". It does not: the predicate gates theaccessible_org_idsaccumulation, while the role projection beside it iterates the unfiltered array. That is exactly #8802.Why the honest state is still
enforcedrather than partialThe window columns are declared on exactly three objects —
sys_user_position,sys_user_permission_set,sys_approval_delegation— and on all three, every authorization-resolution seam applies the predicate.sys_membercarries no window columns at all, so both the filtered call and the unfiltered projection beside it are no-ops today; the asymmetry is latent, not live. That reading is corroborated in-repo bylast-admin-guard.ts, which already records that "ADR-0091 windows are not columns onsys_membertoday" and that the resolver "is where the two halves have to be reconciled first" if they ever land.The second unfiltered read,
plugin-approvals' ownexpandPositionUsers, is a ruled-intentional divergence (#8710) because approval routing is not grant resolution — its own note explicitly forbids "fixing" it with a filter.Both carve-outs are stated in the row's note, since stating what is and is not mechanically checked is this file's own convention for honesty. #8802 is not addressed here and remains open: it is a defect in the enforcement, not in the ledger, and closing it leaves this row exactly as owed.
Header counts refreshed
The header's measured numbers move with the new row and were recomputed rather than incremented: 43 of 50 becomes 44 of 51 rows with no
covers(7 rows / 9 keys unchanged), and 37 of 43 becomes 38 of 44 enforced rows in the in-resolver shape.No interaction with #9083
checkTransportWiredAdmissioniteratescoversentries only. This row declares none, so the TRANSPORT-WIRED admission rule is untouched — confirmed by reading the function and by the "the real matrix declares no TRANSPORT-WIRED key today" non-vacuity test staying green.Verification — all at
08f4bd5Reverse-verified rather than assumed green: removing the
enforcementstring from the new row turns the gate red across 6 tests, naming the row by id (grant-validity-window: enforced but names no enforcement site). Restored from the commit, byte-identical.authz-conformance.test.ts(targeted)@objectstack/dogfoodsuite@objectstack/dogfood typecheckcheck:empty-state,check:liveness,check:strictness-ledger,check:variant-docscheck:test-source-alias,check:type-source-resolutioncheck-affected-docs.mjscheck:nul-bytesGate set derived by re-running
node scripts/pm/dispatch-gates.mjsagainst the actual changed path; the derivation named 7 families and all were run.No changeset —
skip-changesetThe diff is one test-only file inside
@objectstack/dogfood, which isprivate: true. It publishes nothing and changes no runtime behaviour, so there is no user-visible change to describe.Generated by Claude Code