diff --git a/docs/plans/evidence/grpc-data-ext/H3.md b/docs/plans/evidence/grpc-data-ext/H3.md index 08bec4998..f1954802c 100644 --- a/docs/plans/evidence/grpc-data-ext/H3.md +++ b/docs/plans/evidence/grpc-data-ext/H3.md @@ -141,6 +141,27 @@ authority lapses with its 15 s `MetadataLeaseMilliseconds`; any read after that HistoryRead (reproduced in the Runtime harness) — and a re-browse served from the still-cached browse page does not renew it (live: the H06 rebuild leg denied right after a re-browse). The gate now starts each held leg right after a deploy + re-browse. +## Review round 3 (approve-with-changes) — fixes + +Review of `37cbeff48` + `7aaa98751`. Every finding verified before fixing; none skipped. Red/green by reverting the fix (mutation) +and re-running its test, unless noted. Commits `34e72de3d` (S4), `9c2d6273a` (S1/S2/S3/S6/a), `30d66fdc7` (S5), `f1b23abcb` (b/c/d). + +| # | Finding | Resolution | Red/green | +|---|---|---|---| +| S1 | `ServeSplitAsync`: an escape (caller cancel, fault) in sub-batch k>0 stranded earlier sub-batches' answers (continuations never released, samples never disposed) | any escape disposes the collected answers and releases their new continuations on the endpoint (`Abandon`) | client test: cancel during sub-batch 2 ⇒ both sub-batch-1 page tokens released — red on revert | +| S2 | later sub-batches sent with `MaxBytes = left` could break the origin's `count <= MaxBytes/256` admission ⇒ RpcException ⇒ `RecordFailure` + `BadNoCommunication`, claimed cursors lost | each sub-batch trimmed to `left / MinimumBytesPerItem` (shared constant 256); the rest `BadTooManyOperations` with `ConsumerBudgetRefused`, unsent; an unsent resumed item's origin token released (still live there) | client test, fake origin enforcing the rule: `[2, 1]`, rest consumer-refused, next read Good (no backoff) — red on revert (`[2, 2]`, `BadNoCommunication`) | +| S3 | an assembly overflow inside a sub-batch left `used` below `MaxBytes`, so further sub-batches were still sent | any consumer budget refusal latches `spent`; the rest answered unsent | client test: calls `[2, 2]` (was `[2, 2, 1, 1]`) — red on revert | +| S4 | budget stop keyed on `Diagnostic.Contains("budget")`, which matched the ORIGIN's "remainder budget is full" and refused later nodes, incl. Good ones | internal `DataHistoryReadResult.ConsumerBudgetRefused` (never on the wire), set only by the connection's own assembly / split refusal; `ProjectedHistoryAccess` keys on it | wire test: origin refuses A ⇒ B still read (two runs sent) — red on revert | +| S5 | `RpcException(Cancelled)` without a caller cancel ⇒ `BadTimeout` even when the channel-retired / scope / shutdown token fired; the access's outer catch read any escaped OCE as a timeout | that case ⇒ `BadNoCommunication` (resumed `BadContinuationPointInvalid`), chunk tokens released, no further sub-batches; outer catch: `BadTimeout` only for the caller's cancel or the deadline, else `FailCancelled` classification | client test: scope moved mid-call ⇒ fresh `BadNoCommunication`, resumed `BadContinuationPointInvalid` — red on revert. Outer catch: no dedicated test (nothing reachable throws past `ReadGroupAsync`'s own catch) | +| S6 | a Verify failure / item mismatch on a follow-up chunk released nothing but samples; `ServeSplitAsync` swallowed later sub-batch faults silently | the assembly's catch releases finished nodes' continuations (`final[]`), held chunk tokens and the rejected response's tokens; a later sub-batch's endpoint fault is `RecordFailure`d | client test: n0 done on call 1, call 2 malformed ⇒ n0's page token and n1's chunk token released — red on revert | +| a | after a sub-batch endpoint failure further sub-batches were still sent | `ServeAsync` reports `EndpointFailed`; nothing more is sent, rest `BadNoCommunication` / resumed `BadContinuationPointInvalid` | client test: calls `[2, 2]` (was `[2, 2, 1]`) — red on revert | +| b | a Bad answer to a resumed node left the prior origin cursor open (refused unsent) | `ReleaseOrigin()` on the prior cursor for any Bad answer (and a mismatched one); idempotent | wire test: resume answered Bad unsent ⇒ origin open continuations 1 ⇒ 0 — red on revert | +| c | lease dropped an in-flight answer on a scope move without releasing its new continuations; resumed items `BadNoCommunication` | dropped answers' continuations released (best effort); resumed `BadContinuationPointInvalid` | `GrpcDataDeployedHistoryLeaseTests` — red on revert | +| d | a throw from `SaveRemoteContinuation` / `FromClr` for outcome i stranded outcomes i+1.. | the loop's catch releases outcome i's cursor unless the store owns it, and every later outcome's | `ProjectedHistoryReadTests` (unconvertible value on outcome 0 ⇒ outcome 1's cursor released once, outcome 0's left to the store) — red on revert | + +**Gates after round 3** (HEAD `f1b23abcb`): build 0/0; `run-unit-phase.py` H3, H2, H1, X0 passed (H3 107 + 144); OI `Feature=GrpcData` ++ history 87 passed (2 AVEVA skips); OpcUaServer 1419 (+1 skip), Runtime 1903 (+3 skips) (`Category!=E2E&Category!=LiveIntegration`); no `GrpcDataConfiguredDiscoveryWireTests` (#920) flake this run. Live rig not re-run in this round. + ## Not verified / substitutions - **H05**: the rig builds no pinned v1 image, so "v1 origin" is substituted by an origin that does not advertise history for the