Repository navigation
fix(wake): probe an undeliverable recipient once per drain pass (#2812) - #2813
Conversation
The drain probed recipient readiness (org config load + Herdr pane list) once per pending group. Seats that collect mail by turn hook, or are offline, own one group per awaited fact or directive; on the live outbox 135 such groups made each pass take one to two minutes, so live seats' wakes waited behind them. Remember undeliverable statuses for the pass and seed the health pass with them; deliverable recipients are still probed per group because their state decides the batching hold.
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
…2812) Review round 1 of #2813: an offline or unresolved binding can clear between groups of one pass, so caching it delayed a wake and could send a false offline notice. Only unregistered, unseated, remote and runtime-kind reasons are remembered; the health pass receives the drain's map without a copy, and the regression test asserts the exact health result.
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
…g it (#2812) Review round 2 of #2813: a runtime-kind result can change between groups of one pass, and recording it for later groups wrote a stale reason that a sender notice could cite. Probe results now carry an explicit skipRestOfPass classification instead of an allowlist of reason text. A recipient's later groups reuse the first result but record nothing; after the group loop one fresh probe per recipient decides whether their deferral reason is recorded, so a stale result costs at most one pass of delay. Two probes per undeliverable recipient per pass, however many groups it owns.
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
Review round 3 of #2813: rows the closing probe finds deliverable record an empty reason for the pass, so the notice cannot fall back to a reason an earlier pass stored. Each skipped recipient is confirmed with the readiness callback of the batch that observed it, and the fresh result, positive or negative, seeds the health pass.
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
Closes #2812.
Problem: live seats got message wakes 5–7 minutes late (jarvis 607168: 607144–607148). Every drain pass probed the recipient (config load + Herdr pane list, ~0.5–1 s) once per pending group. The live outbox has 135 groups belonging to seats that cannot take a wake (they collect mail by turn hook, or are offline), so each pass spent 1–2 minutes before live wakes went out. Full evidence is in #2812.
Fix (
internal/cli/reply_wake_outbox.go):classifyWakeOutboxObligations) is seeded with the same statuses. It already memoized per recipient, but only within itself.Tests
TestReplyWakeDrainProbesAnUndeliverableRecipientOncePerPass. It covers one undeliverable seat with 3 groups and one live seat.go test -run 'Wake|Message|OwnerGram|Directive|AwaitedFact|Uncertain|Mute|Requester|Deferral|Notice' ./internal/cli/passes.go vet ./internal/cli/is clean.Attribution gap: implemented in-session by the gitmoot seat; no implement job exists.
Deploy: daemon only (standard recipe). Live check after deploy: drain passes should claim within seconds of a row coming due. The gap between a live seat's
created_at(plus any working-recipient hold) andattempted_atinwake_outboxshould be seconds.