Verified: Redundancy and retained state
Each claim the Redundancy and retained state page makes, with the tests that
prove it in the last green CI run: 12 of 27 verified, 4 with no test yet.
The claims live in docs/claims/redundancy.yaml.
Last green CI run 16 Oct 2026, 14:48 UTC on c7618d3 · all runtime claims
RED-001 partly verified
Retained values are applied before the first scan and win over the manifest's init seeds.
- pass
TestRetainedValueLoadsBeforeFirstScaninruntime
RED-002 verified
Every `role: setpoint` tag is saved to the retain store, whatever its shape: a scalar, a struct, an array of scalars, an array of structs, or a multi-dimensional array.
RED-003 verified
An integer-typed setpoint tag is restored with its retained value.
- pass
TestLoadRestoresIntegerKindinruntime
RED-004 verified
A struct-typed setpoint tag is saved and restored with its retained member values.
RED-005 verified
The source of an online-edited program is retained and run after a restart, still shows as modified so naut pull sees it, and a never-edited program is not persisted.
RED-029 verified
A deploy wins: an online edit is reloaded only by the same build it was made on; a build whose program for that task differs replaces the edit and names it in retainDiscardedEdits, keeping the last replaced source per task under discardedPrograms (never applied), and a build that already contains the edit clears it from the store.
RED-006 partly verified
Inputs, state and outputs are not retained, and the PID integral is not persisted (it warm-starts from live field values).
RED-007 partly verified
State is saved only when something changed, only by the leader, and a failed save is retried with the same content on the next tick; a standby never saves.
RED-008 partly verified
Store failures surface in diagnostics as retainErrors and lastRetainError.
- pass
TestSaverWritesOnChangeAndRetriesOnFailureinruntime
RED-010 partly verified
Outside a cluster, retained state is saved to the file named by retain.file and loads back from it.
- pass
TestFileStoreSaveLoadRoundTripinretain
RED-011 partly verified
In a cluster, retained state is saved to the named ConfigMap (created if absent) and loads back from it.
RED-012 no test yet
The defaults hold: retain file retain.json outside a cluster and configmap named after the project with -retain suffix in a cluster; and redundancy lease defaults to the project name.
RED-013 partly verified
The leader scans; a standby does nothing at all: no field I/O, no logic, no output writes.
RED-014 verified
Replicas elect exactly one leader through a Lease: the first replica acquires it, keeps it by renewing, and a standby takes it only once it expires; two replicas racing for an expired lease cannot both win.
RED-016 verified
Failover is bounded by the lease: a leader that cannot renew steps down once the lease duration elapses, not before.
- pass
TestStepDowninleader
RED-017 no test yet
Failover takes at most 4 s worst case, and a standby ticks every 1 s.
RED-018 partly verified
A clean shutdown (SIGTERM) hands the lease over so a standby takes it on its next tick rather than waiting out the lease.
- pass
TestReleaseinleader
RED-019 verified
On takeover the new leader re-reads the retain store (picking up retunes the old leader accepted) and resets program frames so warm-start logic runs against live values.
- pass
TestTakeoverReloadsAndResetsFramesinruntime
RED-020 no test yet
On takeover the scan clock is zeroed so the first dt is one scan, not the time spent standing by.
RED-021 partly verified
Outside a cluster redundancy degrades gracefully: the controller runs standalone and is always the leader.
- pass
TestStandaloneinleader
RED-022 partly verified
A standby reverse-proxies API traffic to the leader, whose address rides inside the Lease.
RED-023 verified
Every replica serves the dashboard itself, and a standby answers /api/cluster with its own view rather than the leader's.
- pass
TestStandbyAnswersClusterAndIndexLocallyinserver
RED-024 verified
GET /api/cluster reports each replica's own view: mode, leader and leader transitions.
RED-025 no test yet
Identity in /api/cluster comes from POD_NAME and the proxy target from POD_IP.
RED-026 partly verified
The Lease and ConfigMap are spoken to directly with only get, create and update verbs (no delete); a releasing leader expires its lease by writing an epoch renew time.
- pass
TestReleaseinleader
RED-027 verified
A different election scheme plugs in through runtime.Coordinator, which is the single method IsLeader.
RED-028 verified
A retained struct or array is restored onto the current tag: an array the project has since grown keeps its seeds for the new elements, and one it has shrunk keeps its seeds and reports the mismatch in lastRetainError.