perf(acl,grpc-data): #1053 alloc-free warm UNS ACL decisions; unresolvable configured refs back off; restart keeps the comms latch (decided)

U-8: a warm cached decision on a UNS node allocated 416-680 B/call ahead of the cache (live id-chain list, identifier
split, LINQ, segment array, string.Join key, DataCallerIdentity). Now 0 B: the live chain is cached per folder instance
(re-verified against the live ancestry every call), the generation hands out one segment array per path, the authorizer
keys its resolved cache keys on that array, reference variables key on their own identifier (scope = its split), and
the caller identity is built once per session identity.

R-25: ConfiguredProjectedInterestOwner re-ran discovery for an unresolvable configured reference every 1 s sweep forever;
a failed resolve now backs off 1 s doubling to 30 s (60 s unreachable: 61 discoveries -> 6). Publishing into the source hub
only for sources with interest is DECLINED: that cache answers a new subscription's first snapshot and projected Reads.

Restart comms latch (decided: keep): the nodes stay Bad across an operator Restart and the respawned incarnation must
re-publish them; the stopped child's PostStop announcement already re-latches and cancels the old audit. Pinned by test.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-12-03 15:30:07 -05:00
parent a24071405a
commit 6ea0f09614
11 changed files with 586 additions and 37 deletions
+9
View File
@@ -1148,6 +1148,15 @@ device folder asks once per child. Those seams go through a per-`(session, node,
decision cache (`SessionAclDecisionCache`), cleared wholesale whenever the authority generation
advances.
**A warm cached decision on a UNS node allocates nothing (#1053, review U-8).** The UNS placement still runs on
every call, ahead of the cache (it reads live topology), but its products are cached: the node manager keeps each UNS
folder's live id chain on the folder instance (re-verified against the live ancestry on every call, rebuilt on any
mismatch), the generation hands out one segment array per folder/equipment path, and the authorizer keys its resolved
cache keys on that array. A reference variable is keyed on its own identifier (its scope is its split, the same key a
Path-kind lookup uses), and the caller's `DataCallerIdentity` is built once per session identity. Measured warm per call:
equipment folder 416 → 0 B, folder-owned virtual tag 592 → 0 B, UNS reference variable 680 → 0 B
(`NodeManagerUnsDecisionAllocationTests`).
⚠️ **The cache holds the grant walk, not the decision.** Grants, principals and the trie are all fixed
for the life of a generation, so memoizing the walk is sound. A key's `ExpiresUtc` passes with the
*clock*, not with a deployment — so revocation and expiry are re-checked on every call, outside the