Commit Graph

1610 Commits

Author SHA1 Message Date
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 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 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 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 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 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 73c9f974d7 test(grpc-data): A2b — X0 staging test's unknown bit moves off AlarmConfirm 2026-11-24 13:57:11 -05:00
Joseph Doherty 7dfe517ff6 test(grpc-data): A2b — pre-authorization bound to its own context (role-less local session denied); mutation-checked 2026-11-24 13:49:28 -05:00
Joseph Doherty 4e1d46fd65 test(grpc-data): A2b recorded-v1 gate (fake origin) — CallConditionMethod only with conditions; goldens unchanged 2026-11-24 13:46:50 -05:00
Joseph Doherty 92f51b8dbc test(grpc-data): A2b recorded-v1 gate (real origin) — method bits granted, header-less golden unchanged, CallConditionMethod FAILED_PRECONDITION without conditions 2026-11-24 13:45:41 -05:00
Joseph Doherty d8d5487b21 test(grpc-data): A2b P + tolerance — Galaxy opt-in rides the artifact; 'unknown' bits move off 128/256 2026-11-24 13:44:30 -05:00
Joseph Doherty a75d15ad5d test(grpc-data): A2b U — method bits authorable, shelve not, Galaxy opt-in default off 2026-11-24 13:43:28 -05:00
Joseph Doherty 11b94ff2b2 test(grpc-data): A2b Runtime — origin facade (Primary, Galaxy opt-in, UNS subject, join, audit) and consumer client (no retry, OutcomeUnknown) 2026-11-24 13:38:36 -05:00
Joseph Doherty dcb9f8ccbd test(grpc-data): A2b NM — remote ack once, revert on origin+stream, AddComment stored, Primary/standby, T3 marker 2026-11-24 13:35:39 -05:00
Joseph Doherty f6c9c9d7fe feat(grpc-data): A2b — consumer CallConditionMethodAsync (no retry, OutcomeUnknown after send), validator + AdminUI method bits, Galaxy opt-in checkbox, capacity warnings at the deploy gate 2026-11-24 13:33:36 -05:00
Joseph Doherty 45a3eee9c8 test(grpc-data): A2a — revocation test awaits the worker teardown; README conditions profile 2026-11-24 12:42:17 -05:00
Joseph Doherty 6572ee83bc test(grpc-data): A2a — rig --conditions overlay (AlarmSubscribe exports + ScalarHigh scripted alarm), probe conditions scenario, conditions_smoke.py; X0/H2 tests move the 'future' bit off 64 2026-11-24 12:29:19 -05:00
Joseph Doherty 06c8740f94 test(grpc-data): A2a — unit-phase manifest key A2; probe carries history,conditions; metadata never carries AlarmSubscribe 2026-11-24 12:21:18 -05:00
Joseph Doherty b24af31e1a test(grpc-data): A2a — recorded-v1-client gates: fake and real origins serve conditions; header-less stays golden and never sees arm 9 2026-11-24 12:19:17 -05:00
Joseph Doherty 14ab6be37f test(grpc-data): A2a — condition stream R tests (priority, overflow reset, hub reset, revocation, deploy deltas, total first, slice cut, UNS no RawPath); delivered-snapshot overflow rule 2026-11-24 12:15:02 -05:00
Joseph Doherty 6272c7cfa0 test(grpc-data): A2a artifact — condition limits ride entity JSON; pre-A2 artifact parses with defaults
New GrpcDataConditionArtifactReadTests: defaults on a pre-A2 artifact, authored values + AlarmSubscribe round-trip, an
out-of-range deployed limit fails the row closed, AllowGalaxyServiceAck without AlarmAcknowledge fails closed and with it
(newer central) is tolerated and inert. GrpcDataArtifactReadTests' X0 reserved-bit rows move from 64 to 128 now that
AlarmSubscribe is understood.
2026-11-24 12:12:53 -05:00
Joseph Doherty ee1556ac5e feat(grpc-data): A2a AdminUI AlarmSubscribe checkbox, condition limit fields, capacity warning
Connection/export/mapping editors offer AlarmSubscribe (DataOperationAuthoring; method bits stay unauthorable until A2b);
export MaxConditions and mapping MaxConditions / ConditionStale / ConditionMethod / ConditionSnapshot timeouts with the
validator's min/max; the X0 banner already shows for any post-v1 bit. The Mappings panel lists the validator's
non-blocking ConditionCapacityWarnings for this cluster's consumer nodes. AllowGalaxyServiceAck is not in the UI (A2b).
2026-11-24 12:11:18 -05:00
Joseph Doherty b2ad10c1f0 test(grpc-data): A1 — the live mark-order test awaits the log, not IsKnown (flaked under load: the fake's alarm write sets known) 2026-11-24 11:45:43 -05:00
Joseph Doherty 4a6c894268 fix(grpc-data): A1 review round 2 N1 + N2 — withdrawals are never dropped; a discarded mark re-arms F5
N1: the deferral keeps every withdrawal (Known: false) regardless of capacity; a known mark beyond capacity is
dropped (unknown is safe) and its source remembered.
N2: a G3-discarded (or overflowed) deferred mark is reported to its sender as OpcUaPublishActor.ConditionMarksDiscarded
(the scripted host is skipped); DriverHostActor puts those conditions back in the F5 window from now, so a driver
that does not re-signal gets the diagnostic.
2026-11-24 11:34:12 -05:00
Joseph Doherty 4d21ccafa1 fix(grpc-data): A1 review round 2 F1 + F2 — an ack-revert establishes nothing; every Good edge withdraws; Bad edge forgets unsignalable
F1: RevertNativeAlarmAck projected through WriteAlarmCondition, which re-marked a comms-withdrawn native condition
known; with the Good edge's conditional withdrawal skipped (GoodSinceUtc null) it read known-inactive-Good until the
replay. AlarmStateUpdate.EstablishesState (false for the revert) rides a new default sink overload
WriteAlarmCondition(..., establishesState) through the deferred and SDK sinks to the node manager, and every Good
edge now withdraws unconditionally.
F2: the Bad edge clears the unsignalable set, so a stale report cannot arm the backstop on the next Good edge.
The rig's CollectAlarmTraffic skips withdrawals (every edge now sends one).
2026-11-24 11:26:56 -05:00
Joseph Doherty 7489456843 test(grpc-data): A1 real-driver test fishes the known mark, not a withdrawal 2026-11-24 11:03:52 -05:00
Joseph Doherty 27a59716aa Merge A1 review round 1 fixes 2026-11-24 11:03:44 -05:00
Joseph Doherty 2fdf9d87c2 fix(grpc-data): A1 review nit — colliding condition placements are logged at Warning (locally)
DistinctPlacements still drops every placement of an address claimed twice (fail closed); Compile takes an
optional logger (the coordinator passes its own) and the drop is reported in the local log only.
2026-11-24 10:44:00 -05:00
Joseph Doherty 16166c21e5 fix(grpc-data): A1 review S3 + S4 + nits — snapshot start cursor, readiness cut with the snapshot, failed applies
- S3a: SnapshotConditions reads a start cursor under Lock before enumerating keys; every slice carries it, so a
  condition materialised and activated between the enumeration and slice 1's hold is covered by deltas after it.
- S3b: each hold captures the apply generation (bumped when a rebuild begins) and the complete flag; slices carry
  them and ConditionSnapshotSlice.IsCompleteSnapshot / ConditionStateHub.IsSnapshotCompleteFor detect a rebuild
  that straddles a multi-slice snapshot. An empty scope still takes one hold.
- S3c: maxConditionsPerHold is clamped to MaxConditionsPerHoldLimit (5,000).
- S4: CompleteAddressSpaceApply(bool succeeded) (new default sink member, forwarded by the deferred and SDK sinks);
  the publish actor passes !Degraded. A failed/degraded rebuild keeps readiness false and its pending removals,
  emitting no removal records; the next successful apply completes it.
- Nits: ConditionStateRecord.UnshelveTimeUtc (timed-shelve expiry); ConditionStateHub.Read has a bounded default.
2026-11-24 10:43:04 -05:00
Joseph Doherty 3b242f5839 docs(grpc-data): plan §5.2 condition_key formula matches ConditionKeys.Derive (realm byte, upper-cased cluster) + golden-vector test 2026-11-24 10:37:02 -05:00
Joseph Doherty f08ca7d9e3 fix(grpc-data): A1 review S2 + F5 re-arm + nits — native known is withdrawn on comms loss
- The Bad connectivity edge (and a Good edge with no Bad edge since the last Good one, or from a new child
  incarnation) sends MarkConditionsKnown(Known: false) for the driver's condition nodes, ahead of the quality
  annotation, so an alarm raised during an outage never reads known-inactive, Good after the reconnect. Stopping a
  child (a respawn) withdraws too.
- DriverInstanceActor stamps a connection epoch (bumped on every Connected entry) on the initial-state signal and
  on ConnectivityChanged(Connected); a signal raised under an earlier connection is dropped by the child and the host.
- G3 never discards a deferred withdrawal.
- F5 'still unknown' follows the node manager: a native transition takes its ref out of Pending.
- Re-arm F5 at the alarm-ref reindex for refs a deploy adds while connected (defensive: today such a deploy
  respawns the driver because its RawTags are folded into its config).
- Nits: signals/edges from a retired or non-current child never (re)create a tracker; the injected clock replaces
  DateTime.UtcNow.
- Primary demote/re-promote: checked, not a stale-known window — drivers and their condition writes run ungated on
  both pair members.
2026-11-24 10:37:02 -05:00
Joseph Doherty 141e4412d2 test(grpc-data): A1 — real-driver signal rig (StartRig over IDriver), FOCAS end-to-end; driver test classes in the A1 manifest 2026-11-24 10:25:47 -05:00
Joseph Doherty e9d82a6a5a fix(grpc-data): A1 review B1 — a scripted projection never marks its condition known
WriteAlarmCondition set _conditionStateKnown for every projection. Scripted Active is not persisted, so the
post-restart re-assert of a restored unacked/shelved/disabled alarm (or the re-projection of an operator ack
before the inputs arrived) produced a known=true, Active=false record no predicate decided (T2 case i).
Only native transitions are established states now; scripted known-ness comes only from MarkConditionsKnown.
2026-11-24 10:17:34 -05:00
Joseph Doherty eb688a4ee0 Merge A1 keys/placements/ids into A1 core 2026-11-24 10:02:34 -05:00
Joseph Doherty 0eb533991b test(grpc-data): A1 — a strict publish-probe test ignores the new input-establishment mark 2026-11-24 09:53:36 -05:00
Joseph Doherty a248616761 feat(grpc-data): A1 scripted OnInputsEstablished — engine flip queued last in pending, host holds flips during a load until after the re-assert, MarkConditionsKnown on the alarm chain 2026-11-24 09:38:51 -05:00
Joseph Doherty 47bf3a1cad test(grpc-data): A1 native initial-state signal through the real driver actors — known only on signal, F2 delayed ordering, F5, backstop, G5; reusable NativeAlarmSignalTestBase + FakeSignallingAlarmDriver 2026-11-24 09:35:05 -05:00
Joseph Doherty d64578b1c5 feat(grpc-data): A1 MarkConditionsKnown in OpcUaPublishActor — deferred beside alarm states, replayed after them (F2), discarded on a source's dropped/skipped projection (G3) 2026-11-24 09:27:53 -05:00
Joseph Doherty 923c2511a3 feat(grpc-data): A1 ConditionStateHub — bounded partitions, per-reader reset, snapshot_complete readiness, F5 diagnostic; wired to the node manager 2026-11-24 09:24:28 -05:00
Joseph Doherty 066372ce41 test(grpc-data): A1 — condition ids, condition_key (m-T6), secret validation, UNS-only no-RawPath property test; A1 manifest key 2026-11-24 09:23:06 -05:00
Joseph Doherty 6836efaeb9 feat(grpc-data): A1 origin condition state in the node manager — delta callback, state_known, activation marker, sliced snapshot, MarkConditionsKnown sink seam, IAlarmInitialStateSignal 2026-11-24 09:22:08 -05:00
Joseph Doherty 7498f1ce82 test(grpc-data): H4 review 7 — diagnostics snapshot round-trips on the cluster serializer; old-shape payloads decode
Round-trips NodeDiagnosticsSnapshot (OriginHistory, HistoryVariants and the other H4 members) through
the serializer Akka picks for the fleet-diagnostics reply, and decodes payloads stripped of the H4
members. The origin flag is renamed NoPeerTrafficYet (default false): Akka's JSON serializer fills a
missing constructor argument with the CLR default, so a payload without it must never claim it.
2026-11-24 08:41:52 -05:00
Joseph Doherty 2fba036176 fix(grpc-data): H4 review 5+6 — AdminUI display: 'unavailable' without handshake evidence; every bit rendered
HistoryServed reads 'unavailable' when neither features nor variants were reported. Features()
and DroppedBits() render every set bit across all 32 (bit 31 included), named when known and hex
otherwise, so an unknown bit is never hidden beside a known one (#919).
2026-11-24 08:39:46 -05:00