fix(runtime): #1113 document that a slow-connecting replacement reads BadWaitingForInitialData (accepted)

Item 5 (owner decision, docs only). DriverLifecycle.md: the respawn/Restart stamp
does not change while the replacement's initialise is still retrying - it has not
lost anything, it has not connected yet; the nodes go BadNoCommunication only if
the replacement connects and then loses its device. .claude/rules/drivers.md
summarises the #1113 changes.
This commit is contained in:
Joseph Doherty
2026-12-05 03:05:45 -05:00
parent 399deea32f
commit b9a98f0f59
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -154,6 +154,12 @@ non-`Healthy` state **and** its `LastSuccessfulRead` has been frozen for 90 s. T
an outage: no audit, no counter), and the retired child's late Bad no longer stamps value nodes while a replacement
exists — so a Restart now cancels the old audit itself (#1053 keeps the latch). Supervision restarts and deploy
removals/disables are unchanged. ScadaBridge sees the brief Bad. `DriverHostRespawnValueNodeGapTests`.
#1113: a config-change respawn KEEPS an outstanding comms latch like Restart, and every apply trims latches to the
refs still routed (`TrimCommsLatchesToIndex` — a dropped ref is never audited); the audit Warning names the nodes'
real status (`still BadWaitingForInitialData` after a respawn/Restart). A STUB child's value nodes go
`BadConfigurationError` (`StampStubbedDriverValueNodes`, after each apply's rebuild Tell + after a Restart into a
stub). A slow-connecting replacement stays `BadWaitingForInitialData` (accepted). The gRPC origin hub is covered by
the producer fence (`RetireCurrentDriver` at the stop), not the node stamp — `GrpcDataRespawnOriginGapTests`.
- **Every dedup on the recovery path is keyed on (value, status), not value.** A device that comes back
usually comes back holding the same reading, so a value-only dedup swallows the recovery and the node
stays Bad forever — the v3-gate trap, now closed in the Calculation driver, the virtual-tag actor and
+6
View File
@@ -649,6 +649,12 @@ supervision restart (same driver object — unchanged, still covered by that chi
disable (`RemovedInputStatus` + node removal). ScadaBridge sees a brief Bad per respawn/Restart — accepted.
Pinned by `DriverHostRespawnValueNodeGapTests` (both seams, both interleavings, no-latch with a positive control).
- **A slow-connecting replacement reads `BadWaitingForInitialData`, not `BadNoCommunication` — accepted (#1113, owner
decision).** The stamp says "a new driver object, no value yet"; it does not change while the replacement's initialise is
still retrying, because the replacement has not lost anything — it has not connected yet. The nodes go
`BadNoCommunication` only if the replacement connects and then loses its device (its own comms-loss stamp, latched and
audited as usual). An operator watching a node stuck at `BadWaitingForInitialData` after a respawn should check the
driver's status on `/hosts` (Connecting / Reconnecting), not the node.
- **A stub replacement reads `BadConfigurationError` (#1113).** When the replacement (or a freshly deployed driver) is a
STUB — no factory for its type on this node, the factory rejected its config, or the type is not allowed on the node's
roles — it never publishes, so `BadWaitingForInitialData` would be a promise that cannot be kept.