Separate heartbeat state and scheduler status

This commit is contained in:
Meta Vens 2026-07-13 17:03:35 +01:00
commit 22b343202f
6 changed files with 45 additions and 2 deletions

View file

@ -1449,3 +1449,18 @@ cost ref or unavailable reason, review duration, and review-event count.
Fields are optional on the stored v0 shape so older receipts remain readable,
but missing legacy dimensions make `receiptProof=incomplete`. Receipt IDs and a
free-text metrics summary can no longer counterfeit measurement completeness.
## Readable heartbeat state is not scheduler readiness
The heartbeat status projection returned `status=ready` whenever the state
document could be loaded. That proved storage presence and deserialization, not
that any participant was configured, active, or free of a non-running pending
turn. The cache had quietly inherited the scheduler's authority.
The projection now reports `status=loaded` for readable state and exposes a
separate `schedulerStatus`. Missing state is `missing`; an empty participant set
is `unconfigured`; active participants whose pending turns are running are
`active`; all other loaded physiology is `attention`. The native heartbeat
smoke asserts the distinction at the emitted projection layer. State loading
owns readability. Participant physiology derives scheduler status. Presence
alone owns no readiness verdict.

View file

@ -547,3 +547,11 @@ four typed dimensions; old receipts deserialize with absent optional fields but
remain incomplete. A negative projection test proves a receipt with IDs and
summary but no token evidence cannot report complete proof. Continue with
scheduler/cache projections that derive consequential status from presence.
The first scheduler substitution is cut. `heartbeat_status_projection` no
longer translates a readable state document into `status=ready`. It reports
store state as `missing` or `loaded` and derives separate scheduler physiology
as `unconfigured`, `active`, or `attention` from participants and pending-turn
state. The focused library suite, all-bin check, and native heartbeat smoke pass.
Continue through cache/freshness projections; do not let existence, successful
decode, or a latest mirror impersonate current consequence authority.