Commit Graph

3112 Commits

Author SHA1 Message Date
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 8d5077c07d test(grpc-data): A2b F — method bits authorable, shelve reserved, Galaxy opt-in rule, deploy-gate capacity warning 2026-11-24 13:41:51 -05:00
Joseph Doherty 9444044540 test(grpc-data): A2b tolerance pins — method bits understood, AlarmShelve the only reserved bit 2026-11-24 13:40:23 -05:00
Joseph Doherty ef91b4d28f test(grpc-data): A2b codec pins — CallConditionMethod 8th RPC with §4.2 numbers, method codecs, method bits need field 17 2026-11-24 13:39:29 -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 6bb8fa6914 test(grpc-data): A2a — condition codecs pin 17/4/9 with their real types (replaces the X0 tripwire) 2026-11-24 12:15:52 -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 ac9455634d feat(grpc-data): A2a AddDataConnectionConditions schema; authoring accepts AlarmSubscribe
Migration per plan 6: DataExport.MaxConditions (1000), AllowGalaxyServiceAck (false); RemoteNamespaceMapping.MaxConditions
(1000), ConditionStaleTimeoutMilliseconds (30000), ConditionMethodTimeoutMilliseconds (5000),
ConditionSnapshotTimeoutMilliseconds (30000); NOT NULL with SQL defaults, check constraints widened. Validator known set
grows by AlarmSubscribe (method bits stay rejected); condition limits bounded (MaxConditions <= 5000 = the node manager's
per-hold clamp, timeouts <= 1 h); AllowGalaxyServiceAck only with AlarmAcknowledge; non-blocking
ConditionCapacityWarnings when a consumer node's alarm mappings' MaxConditions x 49 exceed MaxImportedConditionNodes.
2026-11-24 12:05:09 -05:00
Joseph Doherty a74a1aeef9 feat(grpc-data): A2a — AlarmSubscribe joins DataOperationSets.Understood; A2 progress log 2026-11-24 11:59:20 -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 d377e3775a fix(grpc-data): A1 review round 2 N3 — FOCAS does not signal a condition a truncated alarm list shows inactive
A list cut off at the per-read cap may hide the alarm a selector matches; a condition that matched nothing on such a
read stays unknown instead of being signalled known-inactive.
2026-11-24 11:35:01 -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 4c8539b897 fix(grpc-data): A1 review round 2 F4 — a Galaxy sentinel signals only a stream opened under the live subscription
The feed raises a new IGalaxyAlarmFeed.StreamOpened (default no-op accessors) before each stream's first message;
GalaxyDriver records the live subscription then, and its sentinel signals only if that is still the live one —
so refs whose snapshot entries arrived before (or without) the subscription are never signalled. The handle is
now added before the feed starts, so the first stream opens under it.
2026-11-24 11:30:30 -05:00
Joseph Doherty ea19c3ed4f fix(grpc-data): A1 review round 2 F3 — an MTConnect delta signals the conditions it touched
A condition Unavailable at baseline never became known: its later Normal is a quality-only emission and only full
emissions signalled. A delta emission now signals its touched conditions whose level is not Unavailable, after the
events and under the same lock (tracker baseline required). Sample_delta_does_not_signal… (which pinned the old
behaviour) is now Sample_delta_signals_its_touched_conditions_and_a_rebaseline_signals_all.
2026-11-24 11:28:14 -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 3c2cf96af2 test(grpc-data): A1 L4 — signal-latency LiveIntegration harness + measured evidence (OpcUaClient, FOCAS, MTConnect, AbCip; Galaxy/Heidenhain blocked) 2026-11-24 10:32:14 -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 9167ea2323 feat(grpc-data): A1 — MTConnect signals after each full condition emission over a /current baseline 2026-11-24 10:22:18 -05:00
Joseph Doherty add4bc81e0 feat(grpc-data): A1 — Heidenhain signals per control after each Good alarm walk 2026-11-24 10:19:35 -05:00
Joseph Doherty 6ba5185f10 fix(grpc-data): A1 review S1 — a scripted condition is established only by a completed predicate
NoteInputsEstablishment raised 'established' before AreInputsReady, the evidence check and the predicate, so a
pushed-but-Bad input (driver down), a runner that was not up or a predicate timeout produced a known-inactive
record though no predicate had completed. The flip is now raised after the first predicate evaluation that
completes since the load or a revert; reverting an input to never-pushed still withdraws it.
2026-11-24 10:19:03 -05:00
Joseph Doherty 8f1be25673 feat(grpc-data): A1 — AbCip signals per node at the end of each ALMD/ALMA poll tick 2026-11-24 10:18:29 -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 dbbc35e83d feat(grpc-data): A1 — FOCAS signals per device after each successful alarm read 2026-11-24 10:16:39 -05:00
Joseph Doherty 4e984b160e feat(grpc-data): A1 — OpcUaClient signals on RefreshEnd, sequential alarm publishing, Unsignalable without ConditionRefresh 2026-11-24 10:14:56 -05:00
Joseph Doherty b7f742efda feat(grpc-data): A1 — Galaxy raises InitialAlarmStateDelivered on every snapshot_complete sentinel 2026-11-24 10:10:30 -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