Skip to content

feat(wish): the door reads the tender's heartbeat before planting - #75

Merged
cherusk merged 3 commits into
mainfrom
feat/wish-door-liveness
Sep 23, 2026
Merged

cherusk merged 3 commits into
mainfrom
feat/wish-door-liveness

Conversation

@godon-robot

@godon-robot godon-robot Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

The door reads the tender's heartbeat before planting.

The assignment plant refuses loudly when the named sender's state row is stale (no beat within GODON_HEARTBEAT_TTL_SECS, default 300s) or the tender is unknown. Flight 9 stamped 'assigned' while writing into a torn-down cell's db — the note vanished, nobody adopted, and the failure surfaced only as archaeology. Now: dead address, loud refusal on the wish, with the reason.

The heartbeat age is computed by the tender's own archive db clock and read over the same connection the delivery uses. Registry stays the existence check; the heartbeat is the breath.

Tests: TestSenderLivenessAtTheDoor (4 new), full unit suite 156 passed.

@cherusk

The assignment plant refuses loudly when the named sender's state row
is stale or the tender is unknown. Flight 9 stamped 'assigned' while
writing into a torn-down cell's db — the note vanished, nobody adopted,
and the failure surfaced only as archaeology. Now: dead address, loud
refusal on the wish, with the reason.

The stale window derives from the tender's DECLARED cadence (the
beater writes its interval into the row): alive iff age <= 3 x
interval, falling back to a fixed 300s only before the second beat.
The heartbeat age is computed by the tender's own archive db clock and
read over the same connection the delivery uses. Registry stays the
existence check; the heartbeat is the breath.

Tests: TestSenderLivenessAtTheDoor (6), unit suite 158 passed.

Co-authored-by: cherusk <10729954+cherusk@users.noreply.github.com>
@godon-robot
godon-robot Bot force-pushed the feat/wish-door-liveness branch from b056ec0 to 2006548 Compare September 23, 2026 07:36
godon-robot Bot and others added 2 commits September 23, 2026 08:01
read_heartbeat falls back to an age-only read when the state row
predates the interval column (rollout-order independent); the fallback
birth window tightens 300s -> 60s (it only serves a tender's first
seconds, before its second beat reports the interval).

Tests: age-only fallback + cadence-derived window + fallback window.

Co-authored-by: cherusk <10729954+cherusk@users.noreply.github.com>
The previous commit accidentally excluded the test-file edits: the
fallback-window values (59/61 against the 60s birth fallback) and the
age-only-fallback test for pre-column state rows.

Co-authored-by: cherusk <10729954+cherusk@users.noreply.github.com>
@cherusk
cherusk self-requested a review September 23, 2026 08:12
@cherusk
cherusk merged commit 5489ff5 into main Sep 23, 2026
2 checks passed
@cherusk
cherusk deleted the feat/wish-door-liveness branch September 23, 2026 08:13
@godon-robot
godon-robot Bot restored the feat/wish-door-liveness branch September 23, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant