Adds ADR-0074: delayed sends across a persisted resume - #349
Merged
Merged
Conversation
ADR-0074 at Status: proposed decides three points the resume record's decision 7, ADR-0054 and ADR-0069's 2026-09-23 Note leave to the durable host. The absolute fire time lives on the host's own timer row, computed by the host once when it is first handed the send, never in the position. A step's timer-store writes, a cancel included, commit in the transaction that saves that step's position. The host drops a stale fire by an atomic claim on the send's row under the cancellation key, plus ADR-0054's liveness check; the engine drops nothing, so no test pins a drop. Statifier.Send.Processor's moduledoc points at the record. No function, struct, effect field or position field changes. Refs: st-yamg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ADR-0074, at
Status: proposed, decides three points about delayed sends across a persisted resume that ADR-0060 decision 7, ADR-0054 and ADR-0069's 2026-09-23 Note leave to the durable host without stating them.Statifier.Send.Processor's moduledoc points at it.%SendDelayed{}(due_at = now + delay_ms). Re-arming after a resume reads that row and never recomputes fromdelay_ms. The position still carries no instant, so ADR-0060 decision 7 stands.{session scope, send_id}for a%Cancel{}. The record states what each order loses when the writes are split.{session scope, send_id}, and then runs ADR-0054 decision 4's liveness check. It does not check the session's configuration: a delayed send is not scoped to the state that armed it. The record gives the reasons the engine cannot make the check (no armed-send set in the position, no send identity on a fired event). Since the engine drops nothing, no test pins a drop, and the record lists what the host checks.No function, struct, effect field or position field changes. There is no changelog fragment, because
changelog.d/README.mdlists "documentation, ADRs, or plans" under "Do not write a fragment for".Record rule applied
From
docs/adr/README.md: "New ADRs: next number, same three-section format (Context, Decision, Consequences), drafted or reviewed at the direction level perdocs/workflow.md. Pick the number against a freshly fetched remote -git fetch origin && git ls-tree origin/main --name-only docs/adr/- so a branch does not start behind a record that has already landed". The number 0074 was picked after a fresh fetch. The highest record onorigin/mainwas 0073, and the one open request touches nodocs/adr/file. The README row is added atproposed.Direction check (in-turn review)
I re-read the diff against the bead's acceptance and checked every claim in the record on
mainateb114947, by anchor:Statifier.Effect.SendDelayed's struct carriesdelay_msand no instant.Statifier.MachineState'sdefstructhassend_counterandtimer_counterand no field naming an armed send.Statifier.Session'stimersandheld_sendsfields are session state.Statifier.Send.Event.build/3setssendidfromid_from_author?, and%Statifier.Event{}has noordinal.c:Statifier.Send.Processor.cancel/2exists.git diff origin/main -- docs/adr/shows zero removed lines: one new record file and one added README row.Provenance
%SendDelayed{}row, not only the cancel. The same crash window applies to it, and decision 1'sdue_atrides on that row.due_atat hand-off, committing timer rows with the step's position, and the atomic claim at fire time.Gate
mix qualityis green on the committed tree.mix quality --profile merge(the ADR judge) is green.Refs: st-yamg