Commit Graph

1 Commits

Author SHA1 Message Date
Joseph Doherty 62d9504868 fix(grpc-data): maxAge=0 projected reads served from an awaited origin read; origin refusals are access denials; Write/CreateMonitoredItems renew lapsed leases (#938, #939, #940)
#938: OtOpcUaNodeManager implements IReadAsyncNodeManager. A projected Value read whose maxAge the
cache cannot satisfy (0 always: Part 4 "read the source"; ScadaBridge's DCL and the Client CLI send
0) is served from IProjectedDataAccess.ReadNowAsync in the same request — same unary admission,
authenticated freshness-checked read and cache publication as ScheduleRead, pumped through the
unary budget, at most 5 s / request deadline − 250 ms, no Lock, no blocked thread. A lapsed lease
is renewed first and read in the same request. Previously every maxAge=0 read answered
BadWaitingForInitialData forever.

#939: RemoteNamespaceResolver.RenewExactOutcomeAsync reports Renewed/Refused/Failed. Refused only
for the origin's verdict (PERMISSION_DENIED call, Denied item, Metadata not granted, operation not
granted / not writable) ⇒ BadUserAccessDenied, held 5 s per node+operation unsent; transport and
other failures stay retryable. HistoryRead follows it.

#940: RenewLapsed accepts Write (gated on the local write role) and Subscribe. WriteAsync awaits the
renewal (≤ 4 s, ≤ half the timeout hint) then dispatches, BadResourceUnavailable unsent otherwise.
CreateMonitoredItems awaits renewals once per request (ICreateMonitoredItemsAsyncNodeManager) and
classifies each projected item PER ITEM outside Lock (lapse ⇒ BadResourceUnavailable, refusal ⇒
BadUserAccessDenied) — a refusal thrown from the item manager used to fault the whole request.

Red/green: 15 wire tests in GrpcDataProjectedOriginAccessWireTests (12 red on the pre-fix source,
controls green both ways); 4 existing tests updated where the first read is now Good. Evidence:
docs/plans/evidence/grpc-data-ext/938-939-940-948.md.
2026-12-01 19:55:49 -05:00