Commit Graph

5383 Commits

Author SHA1 Message Date
Joseph Doherty c8b35d494f fix(grpc-data): A3 verification r2 — N1 runner predecessor chain dropped after hand-over + stopped runner clears its record sets; correct the SentMessageQueue clone comment and pin the EventFieldList MemberwiseClone dependency 2026-11-24 22:26:09 -05:00
Joseph Doherty 5bece2a5a5 docs(grpc-data): A3 round 2 — pooled EventFieldList root cause, L2 re-measured (PASS), gates, live a3r2-cond-1 PASS 2026-11-24 22:11:28 -05:00
Joseph Doherty b884db5fb1 perf(grpc-data): A3 r2 L2 — EventId window back to the plan's 8; measure the retained heap, not GC.GetTotalMemory
GC.GetTotalMemory on .NET 10 regions reported +92 or +218 MiB (bimodal) for the same
state; GCMemoryInfo heap size and a heap dump (136 MB of objects, eeheap allocated
136,318,696 / committed 236,208,128) show the extra was committed-but-free regions.
The harness now takes HeapSizeBytes-FragmentedBytes after a full blocking GC and the
settled working set, and asserts BOTH <= 200 MiB. Worst case (2 placements, 8 slots,
3 event items, Live+Buffer): heap +106.5 MiB, WS +151.3 MiB max of 3 runs.
BytesPerCondition 230,000 -> 160,000 (max WS/condition 158,629, rounded up);
MaxImportedConditionBytes default 160,000 x 2,500 = 400,000,000 B (~381 MiB).
2026-11-24 21:46:21 -05:00
Joseph Doherty 6be0b8dc4b fix(grpc-data): A3 r2 — a released marked EventFieldList never re-enters the SDK's process-wide pool
SDK 2.0.1 pools EventFieldList (PooledEncodeableType); SentMessageQueue Reuse()s every
list of an acknowledged message and the base ReuseCore returns it, whatever its runtime
type, to the shared stock pool. A recycled ProjectedEventFieldList was then rented by any
server's GetEventFields (an unrelated session's RefreshStart/RefreshEnd or local event)
still carrying an imported condition's marker, and ProjectedNotificationRewriter dropped it
when that marker's gate denied. Root cause of the intermittent OI ConditionRefresh failures
(#854/#855 classes). Mirrors ProjectedSdkNotification on the data path: override ReuseCore,
clear the marker, never return to the pool; a released (marker-less) list fails closed.
2026-11-24 21:36:47 -05:00
Joseph Doherty 159ce9d13d docs(grpc-data): A3b review r1 — live a3br1-cond-1 PASS 2026-11-24 20:45:32 -05:00
Joseph Doherty c82ea04e4d docs(grpc-data): A3b review round 1 — finding → resolution → test → red-on-revert, real-path L3, worst-case L2 (fails 200 MiB), OI refresh-failure investigation, gates 2026-11-24 20:38:24 -05:00
Joseph Doherty e5e0780f5e perf(grpc-data): A3b review S5 — BytesPerCondition from the worst-case L2 harness (max 228,353 B ⇒ 230,000; cap ≈ 548 MiB) 2026-11-24 20:05:26 -05:00
Joseph Doherty 72dece7f45 fix(grpc-data): A3b review r1 — per-item results after base.Call (S1), mapping timeout honoured + transport-known BadTimeout (S2), unsent vs OutcomeUnknown + origin failure status (S3), per-connection sub-limit + dispatch floor (S4), N1/N2/N3/N7/N8; tests: real-path L3, worst-case L2 harness, RefreshRequired over the wire, Confirm guards isolated, gate placements/realm, slots, standby, faults, principals 2026-11-24 19:59:21 -05:00
Joseph Doherty 01a4e8db9d docs(grpc-data): A3a review round 1 — finding → resolution → test → red-on-revert table, gates, live a3r1-cond-1 PASS 2026-11-24 19:24:54 -05:00
Joseph Doherty 14343bf086 fix(grpc-data): A3a review r1 — condition-bearing projected folders are event notifiers from materialisation (folder-only demand), null-safe revalidation log; NM tests: B3 revalidation + demand release, S1 rebuild, deviation 3/6/8, S2 verdict TTL, A3-SEC delivery gate isolated (DroppedOnPublish 0) 2026-11-24 18:46:11 -05:00
Joseph Doherty 69aeeb770b fix(grpc-data): A3a review r1 — buffered in-stream re-snapshots, late completion + stale-on-incomplete + bounded retry, Primary-pinned condition streams, node-wide host-cap ledger, runner hand-over after stop, metadata failure Unavailable; NM: revalidation through the imported gate, demand released first, rebuild unwires, instance-keyed promotion, incremental folder index, verdict TTL + expiry, removal RefreshRequired, chunked refresh/replay, folder-only demand
Runtime tests: B1 multi-frame + capacity re-snapshot, B2 late completion / stale-on-incomplete / refused retry, B4 cross-connection / reverse order / records>total / delta growth, S3/S4 hand-over, S6, deviation 9, S2 IsActive generation; absence assertions now follow must-arrive controls.
2026-11-24 18:38:07 -05:00
Joseph Doherty 3c941458f5 docs(grpc-data): A3b evidence — implementation, A3a live defects, tests + red-on-revert, L2/L3 numbers, live a3b-cond-3 PASS, deviations, gates 2026-11-24 18:14:57 -05:00
Joseph Doherty 82ecc1164c fix(grpc-data): A3 condition items carry the origin's canonical root view (metadata asked like the browse resolver) — live a3b-cond-2 found map-uns refused Denied 2026-11-24 17:48:16 -05:00
Joseph Doherty 404a664ca3 fix(grpc-data): A3 ProjectedConditionAccess logs through the host logger (was NullLogger in production) + stream/item/barrier diagnostics 2026-11-24 17:37:23 -05:00
Joseph Doherty 4e6535ee1d test(grpc-data): A3 live smoke — conditions profile makes the CONSUMER condition-bearing; conditions_a3_smoke.py acknowledges the imported ScalarHigh through the consumer 2026-11-24 17:25:31 -05:00
Joseph Doherty fecb178efa perf(grpc-data): A3 L2 in-process memory harness (1,000 imported conditions, one mapping) + MaxImportedConditionBytes from the measurement (205,665 B × 2,500) 2026-11-24 17:23:40 -05:00
Joseph Doherty 2d0147f9da test(grpc-data): A3b consumer method port runtime tests (per-caller gate with real policy, mapping bit + timeout, serving incarnation, connection down unsent, lease refusal) + A3 manifest 2026-11-24 17:20:50 -05:00
Joseph Doherty de51886d6a test(grpc-data): A3b over-the-wire imported-condition methods (once + join, child Call gate, EventId/native Confirm unsent, N6 re-binding, L3 lock-freedom, mixed base.Call batch, timeout/outcome mapping) 2026-11-24 17:18:35 -05:00
Joseph Doherty 28098a8d32 feat(grpc-data): A3b consumer method port — per-caller AlarmAcknowledge/AlarmConfirm gate, mapping timeout, stream serving incarnation, lease condition methods, host wiring 2026-11-24 17:11:05 -05:00
Joseph Doherty c1be5725b9 feat(grpc-data): A3b ICallAsyncNodeManager — claim imported-condition calls, base.Call unchanged for the rest, lock-free remote dispatch, EventId registry gate + N6 re-binding 2026-11-24 17:11:05 -05:00
Joseph Doherty b5ab6e7cde docs(grpc-data): A3a evidence — progress, implementation, tests, mutation record, deviations, gates 2026-11-24 17:00:02 -05:00
Joseph Doherty 762b0fa15d test(grpc-data): A3 unit-phase manifest entry 2026-11-24 16:43:22 -05:00
Joseph Doherty bdc29ac25a test(grpc-data): A3 extends the recorded-v1-client gate — fake origin emits begin/total, info record, snapshot_complete, removed delta 2026-11-24 16:42:13 -05:00
Joseph Doherty 855f725660 test(grpc-data): A3a classifier guard across authorizer entry points + publish-time event rewriter 2026-11-24 16:40:43 -05:00
Joseph Doherty 4b74ac9cc2 test(grpc-data): A3a ProjectedConditionAccess runtime tests (capacity, barrier, host caps, 2000 conditions, version rule, lifetime, timeout, primary placement, gate, linger) 2026-11-24 16:38:57 -05:00
Joseph Doherty de381157cf test(grpc-data): A3a over-the-wire imported-condition events (exactly-once, identity, A3-SEC, child Read, N4, N7, resync, T2) + OwnsNamespace covers mapped/conditions 2026-11-24 16:35:01 -05:00
Joseph Doherty 8d6c94a3b3 feat(host): wire A3 ProjectedConditionAccess (DI, node-manager sink, host condition caps) 2026-11-24 16:30:03 -05:00
Joseph Doherty 4f6e26dd4e feat(grpc-data): A3 ProjectedConditionAccess — per-connection demand, snapshot barrier, condition budget, version rule, re-snapshot lifetime, mapping gate 2026-11-24 16:28:45 -05:00
Joseph Doherty 1ff18caa79 feat(opcua): A3 ProjectedConditionRegistry — mapped/conditions namespace, lazy symmetric notifier wiring, gated marked delivery, publish-time re-gating, refresh replay 2026-11-24 16:25:17 -05:00
Joseph Doherty a75ea95e25 refactor(opcua): share condition node factory + state-apply/delta gate (A3 §5.3 prerequisites) 2026-11-24 16:19:24 -05:00
Joseph Doherty e15bd7c9f9 feat(grpc-data): A3 IProjectedConditionAccess / IProjectedConditionSink contracts 2026-11-24 16:18:25 -05:00
Joseph Doherty 83c7e5863c Merge A2: origin condition streaming + remote condition methods (CallConditionMethod), review + security fixes, live conditions_smoke PASS
v2-ci / unit-tests (push) Failing after 3h2m15s
2026-11-24 16:08:45 -05:00
Joseph Doherty 83e607d437 docs(grpc-data): A2b security review fixes — findings, resolutions, red/green, gates, live conditions_smoke a2s1-cond-1 PASS 2026-11-24 16:08:07 -05:00
Joseph Doherty 91f1f72971 fix(grpc-data): A2b security review — outcome-unknown after dispatch, per-principal registry cap, audit category + sanitising, monotonic activation sequence, bounded Lock wait, consumer cancel = OutcomeUnknown 2026-11-24 15:41:24 -05:00
Joseph Doherty 16ae92258f docs(grpc-data): A2 review round 1 — live conditions_smoke a2r1-cond-1 PASS 2026-11-24 15:29:49 -05:00
Joseph Doherty 5d91d886df docs(grpc-data): A2 review round 1 evidence — findings, resolutions, red/green, A1 root cause, gates 2026-11-24 15:21:57 -05:00
Joseph Doherty 0b827a3f81 docs(grpc-data): plan §5.1/§5.5 — readiness is withheld snapshot_complete; a deploy ends the condition stream; removal/begin bypass the version gate; A3 removes an over-total item 2026-11-24 14:59:39 -05:00
Joseph Doherty c709fbc1c4 test(grpc-data): A2 review N5 — the waiter test counts condition-queue waits only (red on revert: 19 vs ≤ 1) 2026-11-24 14:59:01 -05:00
Joseph Doherty 20bf937259 fix(grpc-data): A2 review S2/S3/S4/S5/N1/N2/N4/N5/N6 — bounded, effective-named, fair condition streams
S2: one condition item per (stream, root) (InvalidArgument + diagnostic), SubscriptionSessionLimits
    .MaxConditionItems (32) per stream (LimitExceeded), each snapshot's estimated bytes charged against
    the principal's snapshot memory budget until its last chunk is delivered (refused ⇒ retried).
S3: a native condition in a UNS listing is named by its placement's browse name (effective name);
    a raw-derived message (raw name, raw leaf, RawPath) is replaced by it.
S4: the item limit rides ConditionItemScope and is re-read with every listing.
S5: chunk budget = min(256 KiB, MaxPendingBytes, MaxMessageBytes) − frame overhead; an oversized
    record's free text is truncated (no split surrogate); one that cannot fit resets with a diagnostic.
N1: one queued v1 frame after every 8 condition frames.  N2: removal/snapshot-begin bypass rule documented.
N4: min(limit, DefaultMaxConditionsPerHold) per Lock hold.  N5: losing channel waits are reused.
N6: ConditionTestAssertions deleted; probe seams reduced to three primitives; class doc moved back.
S1 (tests): the fixture 'deploy' test renamed to what it is (a listing swap without an attempt);
    a real LocalCatalogCoordinator republish ends the stream.
2026-11-24 14:56:49 -05:00
Joseph Doherty 7694eb67b2 perf(grpc-data): A2 review N3 — a caught-up hub reader skips the partition scan
ConditionStateHub.Read scanned the whole partition under its gate on every tick even when the cursor
was at the tail. The partition now records its tail version; a reader at or past it returns empty.
2026-11-24 14:56:49 -05:00
Joseph Doherty 69014cc4f8 fix(grpc-data): A2 review B1 — a full condition queue back-pressures instead of resetting the stream
budget = Max(1, …) pulled a chunk on a full queue every 100 ms tick, TryWrite failed and the stream was
reset, so a backlog above MaxPendingFrames chunks never completed its snapshot. Max(0, …) produces
nothing until the consumer drains. Test: 25-chunk backlog, stalled sink, 20 ticks ⇒ no reset, snapshot
completes (red before).
2026-11-24 14:48:28 -05:00
Joseph Doherty fbf9f7b898 fix(grpc-data): a raised F5 diagnostic follows the pending set down after a late native transition
The A1 phase-run failure of A_native_transition_leaves_the_F5_pending_set was a real defect: when the
600 ms F5 window closed before the transition was processed (a loaded run), the diagnostic kept the
count from when it was raised (2) although the node manager held the condition established (1).
New deterministic test closes the window first; red before, green after.
2026-11-24 14:47:36 -05:00
Joseph Doherty 95d90c1933 docs(grpc-data): A2b live smoke a2b-cond-2 PASS (remote ack: one origin event, acked delta, audit), AdminUI editor driven live 2026-11-24 14:35:06 -05:00
Joseph Doherty 90db1e68b7 test(grpc-data): A2b smoke probe — a fresh operation id per run 2026-11-24 14:25:54 -05:00
Joseph Doherty 97c639b556 test(grpc-data): A2b smoke probe — scripted outcome is applied (2), method bits Primary-only, record comment/ClientUserId/marker 2026-11-24 14:25:45 -05:00
Joseph Doherty 3a2c426beb docs(grpc-data): A2b evidence — tests, mutation checks, gates 2026-11-24 14:18:21 -05:00
Joseph Doherty 73c9f974d7 test(grpc-data): A2b — X0 staging test's unknown bit moves off AlarmConfirm 2026-11-24 13:57:11 -05:00
Joseph Doherty d63884e624 test(grpc-data): A2b smoke — conditions profile grants the method bits; probe remote ack (+ duplicate, header-less, Secondary); origin CLI alarms watcher counts exactly one ack 2026-11-24 13:55:45 -05:00
Joseph Doherty e29d9559ad docs(grpc-data): A2b evidence — what changed, decisions, deviations 2026-11-24 13:53:49 -05:00
Joseph Doherty 84836dd5e2 test(grpc-data): A2b manifest — method tests, OpcUaServer NM tests, unknown-bit tolerance 2026-11-24 13:51:08 -05:00