Skip to content

Amends ADR-0075: which callbacks receive opts - #357

Merged
johnnyt merged 1 commit into
mainfrom
st-mgxq-adr-0075-opts-amendment
Sep 30, 2026
Merged

johnnyt merged 1 commit into
mainfrom
st-mgxq-adr-0075-opts-amendment

Conversation

@johnnyt

@johnnyt johnnyt commented Sep 30, 2026

Copy link
Copy Markdown
Member

Adds a second Amendment to ADR-0075, at proposed. It amends decision 8 point b in part, and records which callbacks a {module, opts} registration's options reach in the code statifier 2.10.0 ships.

What changes

  • docs/adr/0075-basichttp-event-io-processor.md: one Amendment appended at the end of the file, in the shape of the Amendment above it (### Amendment 2026-09-30: ... with its own Status line, proposed (2026-09-30)). No line is removed.

The Amendment

Decision 8 point b says the options reach "the plan context a processor's callbacks receive, under an added :opts key". Statifier.Send.Processor has three callbacks that take its ctx(): deliver/3, cancel/2 and perform/2. The shipped code gives :opts to the first two only. The Amendment states that as the decision:

  • the options reach deliver/3's and cancel/2's context under :opts;
  • perform/2 receives the session's plan context without :opts, because a {:handler, module, payload} instruction does not name the registration it came from;
  • a processor that needs its configuration at perform time carries it in the payload deliver/3 plans, as Statifier.Send.BasicHTTP does with its transport.

It decides nothing beyond which callbacks receive :opts.

Direction check

Every claim in the Amendment was checked at c8894aea, the v2.10.0 tag and main:

  • Statifier.Session.Effects's private processor_for/2 puts the options under :opts only in the context deliver/3 and cancel/2 receive.
  • Statifier.Session's private perform_instruction/3 calls module.perform(payload, plan_context(state)), and plan_context/1 has no :opts key.
  • The Statifier.Send.Processor moduledoc, section "Registration options", names deliver/3 and cancel/2.
  • Statifier.Send.BasicHTTP's private post/2 puts the transport into the {:post, ...} payload that perform/2 reads.

The Amendment cites each by function anchor, not by line. It removes no line (git diff origin/main --numstat shows 32 added and 0 removed). Its Status line says what it amends and what stays unchanged. No ruling is cited: the Amendment records what the shipped code does.

Gate

Docs only: no Elixir code changes. mix adr.check and mix quality --profile merge ran green on this tree. The ADR judge skipped: no file in this diff is in one of its judged scopes.

Appends a second Amendment to ADR-0075, at proposed, amending decision
8 point b in part. A {module, opts} registration's options reach the
context deliver/3 and cancel/2 receive, under :opts. perform/2 receives
the session's plan context without :opts, because a handler instruction
does not name the registration it came from. A processor that needs its
configuration when it performs carries it in the instruction payload
deliver/3 plans, as Statifier.Send.BasicHTTP does with its transport.

This records what statifier 2.10.0 ships and decides nothing beyond
which callbacks receive :opts. No line is removed.

Docs only: no Elixir code is touched. mix adr.check and
mix quality --profile merge ran green on this tree.

Refs: st-mgxq
@johnnyt
johnnyt merged commit 3994282 into main Sep 30, 2026
1 check passed
@johnnyt
johnnyt deleted the st-mgxq-adr-0075-opts-amendment branch September 30, 2026 16:10
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