Commit 86cbe37
* feat(core): cross-request grants cache — #11633 leg B, coarse invalidation, TTL=0 default, expiry-boundary rule, ruled bypass list
The UserAuthzGrants envelope resolveUserAuthzGrants produces can now be
cached across requests, governed by OS_AUTHZ_GRANTS_CACHE_TTL_MS (default
0 = off, a real path with zero engine footprint). When enabled: coarse
invalidation on any engine write to a watched authorization object
(sys_session deliberately excluded — the measured keying trap), wholesale
retirement on non-write epoch reasons (metadata/remote/manual), entry
expiry at min(ttl, nextValidityBoundary) because ADR-0091 windows flip
with no write anywhere, seeds in the cache key (measured: seeding is NOT
a pure prepend — posture and the suppressed sys_user read both depend on
seeds), and clones served so callers cannot poison entries. The explain
engine and runAs:'user' automation runs take the ruled force-fresh path.
Pins: identity over the 11-fixture matrix (zero reads on a hit),
read-after-write revocation/grant with no clock advance, the sys_session
trap, validity boundaries in both directions, peer-membership coarse
retirement, seed isolation, TTL=0 bit-identity, and the two-node bus/TTL
convergence pair. The batch-equivalence harness moved to a .testkit.ts so
the identity pins reuse the fixtures without re-registering that suite.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012WkdHQwHr2KQmaX7P1BHzi
* test(core): pin the seam double's write verbs to the engine dispatch contract
check:engine-double-contract flagged makeSeamQl — its update()/delete()
accepted calls the real ObjectQL refuses. Both verbs now open with the
producer's own predicates (assertEngineUpdateDispatch /
assertEngineDeleteDispatch from @objectstack/metadata-core — the
non-cycle edge for a package objectql depends on), the pins spell their
writes legally (multi delete carries multi:true, the session-activity
update is by-id), and the RETAINED ledger records the new pinned double.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012WkdHQwHr2KQmaX7P1BHzi
* fix(core): classify the batch-equivalence testkit as test code by path — census population restored to baseline
CI's check:system-context-census (landed on main after this branch was cut,
outside the path-derived gate set) went red on the harness extraction: the
recording double's isSystem-recording line, excluded from the census for as
long as it lived in a .test.ts file, entered the population when it moved to
a sibling .testkit.ts — the census classifies test code BY PATH (.test. /
.spec. / tests/ / __tests__/ / qa/) and the .testkit.ts suffix is not in
that rule. The file is test scaffolding (consumed only by suites, extracted
from one), so the honest repair is classification, not a hand-written page
row: it now lives under security/__tests__/, inside the census's own
published exclusion, and the population returns to its 109-site / 45-file
baseline — page, counts, and the #4707 ruling's quoted premise all
untouched. Whether .testkit.ts should join the census's path rule generally
is the gate owner's call and is reported on the card, not taken here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012WkdHQwHr2KQmaX7P1BHzi
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 89448a5 commit 86cbe37
12 files changed
Lines changed: 1455 additions & 321 deletions
File tree
- .changeset
- content/docs/deployment
- packages
- core/src/security
- __tests__
- plugins/plugin-security/src
- services/service-automation/src
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
0 commit comments