Skip to content

Pins the delayed send and cancel re-entries - #266

Merged
johnnyt merged 1 commit into
mainfrom
sp-0mc0-pin-error-communication-delayed-cancel
Oct 11, 2026
Merged

johnnyt merged 1 commit into
mainfrom
sp-0mc0-pin-error-communication-delayed-cancel

Conversation

@johnnyt

@johnnyt johnnyt commented Oct 11, 2026

Copy link
Copy Markdown
Member

Pins what the error.communication re-entry carries when the executor fails a :send_delayed or a :cancel. Refs sp-0mc0. No lib/ answer changes.

What changes

  • test/statifier_persistence/executions_test.exs, in the "error re-entry (ADR-0004 decision 4)" group, gains two tests:
    • "a failed :send_delayed re-enters as error.communication carrying its sendid": the :reentered telemetry event carries the name "error.communication", the origin {:content, c_index, owner} of the failed effect, and options exactly [sendid: "due-reminder"]; the chart routes on _event.sendid, and the persisted position is the state the matching transition enters.
    • "a failed :cancel re-enters as error.communication with no sendid": the same event carries the <cancel>'s {:content, c_index, owner} origin and options exactly []; the chart's transition on the cancelled send's id is not taken, and the persisted position is the fallback's state.
    • Each test attaches its own telemetry handler under a unique execution id, because the suite is async and the handler is global.
  • docs/adr/0004-run-lifecycle-executor-seam-and-serialization.md gains a dated foot Note (2026-10-11) naming the two tests: the 2026-10-04 Note's sentence that no test fails a :send_delayed or a :cancel no longer holds. Appending it was decided by the conductor under a standing consent, 2026-10-11.

No changelog fragment: tests and a record, which changelog.d/README.md lists as needing none.

Sabotage

Each check mutated reentry_origin/1 in lib/statifier_persistence/executions.ex, ran the file's tests, and restored the file byte-equal from a copy before the next:

  • the :send_delayed clause re-enters with no options: red, the :send_delayed test's :reentered payload assertion;
  • the :cancel clause re-enters with [sendid: send_id]: red, the :cancel test's payload assertion;
  • the :send_delayed clause answers :observational: red, the :send_delayed test's payload assertion;
  • the :cancel clause answers :observational: red, the :cancel test's payload assertion.

Direction check of the record text

The Note removes no line (git diff origin/main -- docs/adr/ shows 32 added, 0 removed) and is appended after the last Note at the foot. Its claims, checked: the quoted sentence is verbatim from the 2026-10-04 Note; reentry_origin/1 answers [sendid: payload.send_id] for :send_delayed and [] for :cancel on main at 47193cd, the SHA the Note cites; the group name and both test names match the test file on this branch, cited by name; the :reentered event carries name, origin and opts (execution_step_reentered/1 in lib/statifier_persistence/telemetry.ex); neither test reads the event's data, as the Note says.

Gate

Full mix quality green on this tree: every stage that ran passed, 1,432 of 1,432 tests, 96.0% coverage (Doctor, Gettext and Sobelow skipped as not installed). The Postgres the suite used is a local server on 5432.

Two tests fail a :send_delayed and a :cancel through the executor
and read the error.communication re-entry each one opens: the
delayed send's carries its sendid, the cancel's carries none, and
both name the failed element's content origin. Each chart routes on
_event.sendid, so the persisted position shows what the chart read.

ADR-0004 gains a dated foot Note naming the two tests; the earlier
Note's sentence that no test fails either effect no longer holds.
No lib/ answer changes and no fragment is due (tests and a record).

Refs: sp-0mc0
@johnnyt
johnnyt merged commit 1d1c167 into main Oct 11, 2026
1 check passed
@johnnyt
johnnyt deleted the sp-0mc0-pin-error-communication-delayed-cancel branch October 11, 2026 07:59
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