Review 2026-12-02 W3: gRPC data / projected path scaling + correctness #994

Open
opened 2026-12-02 16:06:28 -05:00 by dohertj2 · 0 comments
Owner

From the 2026-12-02 full code review (master 708a4889c). Plan: docs/superpowers/plans/2026-12-02-review-remediation.md §W3. Summary: docs/reviews/2026-12-02/00-SUMMARY.md.

Findings

  • R-2 (High) Projected cohort sends one command per item; the origin kills the stream at 128 commands/s — docs/reviews/2026-12-02/01-runtime.md
  • R-3 (High) A session scans at most 32 partition changes per tick; a quiet stream on a busy node resets forever — docs/reviews/2026-12-02/01-runtime.md
  • R-7 (Medium) A full cohort event channel turns one item removal into teardown of every sibling demand — docs/reviews/2026-12-02/01-runtime.md
  • R-8 (Medium) QueryAsync treats caller cancellation and per-call faults as endpoint failure → connection-wide backoff — docs/reviews/2026-12-02/01-runtime.md
  • R-9 (Medium) Any single source's invalidation resets every stream on its partition; lock contention is a trigger — docs/reviews/2026-12-02/01-runtime.md
  • R-10 (Medium) Publisher capacity refusal is handled as evidence invalidation and retires the source route — docs/reviews/2026-12-02/01-runtime.md
  • R-12 (Medium) Each delivered value frame runs the full authorization walk 3–4 times, once under the session lock — docs/reviews/2026-12-02/01-runtime.md
  • R-13 (Medium) RemoteSubscription copies whole handle tables per frame and per ack; O(N²) on open — docs/reviews/2026-12-02/01-runtime.md
  • R-21 (Low) WriteOperationRegistry.Prune() copies and scans the whole table under the lock on every claim — docs/reviews/2026-12-02/01-runtime.md
  • R-22 (Low) History remainder bytes leak when a session is cleared while one of its requests is in flight — docs/reviews/2026-12-02/01-runtime.md
  • R-23 (Low) The command barrier can be armed after the only event that releases it — docs/reviews/2026-12-02/01-runtime.md
  • R-24 (Low) Condition stream teardown can mask its real failure with NotSupportedException — docs/reviews/2026-12-02/01-runtime.md
  • U-10 (Medium) IProjectedValueSink.TryPublish snapshots and scans every live monitored item once per published value, under Lock — docs/reviews/2026-12-02/02-opcuaserver.md
  • U-11 (Medium) Removing a projected anchor leaves its MonitoredNode2 behind; event items on the re-created anchor bind to the dead folder — docs/reviews/2026-12-02/02-opcuaserver.md
  • U-12 (Medium) Quadratic eviction scan in ReserveProjectedNode once the projected-node cap is reached — docs/reviews/2026-12-02/02-opcuaserver.md
  • U-13 (Low) Removing an imported condition scans the whole verdict cache under Lock — docs/reviews/2026-12-02/02-opcuaserver.md

Notes

Single owner (shared files). Related: #969. Record before/after perf numbers (10k-item cohort, 1k values/s).

Each finding in the slice report carries file:line, failure scenario, suggested fix and the test to add. Most are from code reading: reproduce in a failing test first; close as not-a-defect with evidence if it doesn't reproduce.

From the 2026-12-02 full code review (master `708a4889c`). Plan: `docs/superpowers/plans/2026-12-02-review-remediation.md` §W3. Summary: `docs/reviews/2026-12-02/00-SUMMARY.md`. ## Findings - **R-2** (High) Projected cohort sends one command per item; the origin kills the stream at 128 commands/s — `docs/reviews/2026-12-02/01-runtime.md` - **R-3** (High) A session scans at most 32 partition changes per tick; a quiet stream on a busy node resets forever — `docs/reviews/2026-12-02/01-runtime.md` - **R-7** (Medium) A full cohort event channel turns one item removal into teardown of every sibling demand — `docs/reviews/2026-12-02/01-runtime.md` - **R-8** (Medium) `QueryAsync` treats caller cancellation and per-call faults as endpoint failure → connection-wide backoff — `docs/reviews/2026-12-02/01-runtime.md` - **R-9** (Medium) Any single source's invalidation resets every stream on its partition; lock contention is a trigger — `docs/reviews/2026-12-02/01-runtime.md` - **R-10** (Medium) Publisher capacity refusal is handled as evidence invalidation and retires the source route — `docs/reviews/2026-12-02/01-runtime.md` - **R-12** (Medium) Each delivered value frame runs the full authorization walk 3–4 times, once under the session lock — `docs/reviews/2026-12-02/01-runtime.md` - **R-13** (Medium) `RemoteSubscription` copies whole handle tables per frame and per ack; O(N²) on open — `docs/reviews/2026-12-02/01-runtime.md` - **R-21** (Low) `WriteOperationRegistry.Prune()` copies and scans the whole table under the lock on every claim — `docs/reviews/2026-12-02/01-runtime.md` - **R-22** (Low) History remainder bytes leak when a session is cleared while one of its requests is in flight — `docs/reviews/2026-12-02/01-runtime.md` - **R-23** (Low) The command barrier can be armed after the only event that releases it — `docs/reviews/2026-12-02/01-runtime.md` - **R-24** (Low) Condition stream teardown can mask its real failure with `NotSupportedException` — `docs/reviews/2026-12-02/01-runtime.md` - **U-10** (Medium) `IProjectedValueSink.TryPublish` snapshots and scans every live monitored item once per published value, under `Lock` — `docs/reviews/2026-12-02/02-opcuaserver.md` - **U-11** (Medium) Removing a projected anchor leaves its `MonitoredNode2` behind; event items on the re-created anchor bind to the dead folder — `docs/reviews/2026-12-02/02-opcuaserver.md` - **U-12** (Medium) Quadratic eviction scan in `ReserveProjectedNode` once the projected-node cap is reached — `docs/reviews/2026-12-02/02-opcuaserver.md` - **U-13** (Low) Removing an imported condition scans the whole verdict cache under `Lock` — `docs/reviews/2026-12-02/02-opcuaserver.md` ## Notes Single owner (shared files). Related: #969. Record before/after perf numbers (10k-item cohort, 1k values/s). Each finding in the slice report carries file:line, failure scenario, suggested fix and the test to add. Most are from code reading: reproduce in a failing test first; close as not-a-defect with evidence if it doesn't reproduce.
dohertj2 added the type:review-findingpriority:p1 labels 2026-12-02 16:06:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#994