Records a neutral discriminator for exit reasons - #76
Merged
Conversation
ADR-0015, at Status proposed. session.terminated's reason is inspect/1
of the Elixir exit reason (subscriber.ex:598), so ":killed" and
"{:bad, 1}" put Elixir syntax on a wire ADR-0005 calls language-neutral
- the one place that happens, with session.halted's closed lowercase
set produced directly beside it.
The record decides the shape rather than shipping it: one additive
kind field carrying a structurally derived lowercase token, with
reason left byte-identical as the human overflow. That keeps the
change purely additive, where mapping the closed set in place would
be a changed value under an existing key, and it answers the bead's
ask for a way to tell a known reason from an opaque one without
string-sniffing.
Consistent with ADR-0014 by construction: the same kind derivation and
the same inspect/1-beside-a-token split, closing the coupling that
record left open. kind is never projected and reason keeps its
existing unconditional redaction, so a projected stream gains an
outcome it could not previously be told.
Two findings are recorded in it. The OTP crash shape {exception,
stacktrace} classifies as "unknown", so the most interesting failure
gets the least specific token. And the bead's first acceptance
criterion selects the option this record rejects, so flipping the
Status also re-scopes it.
No code, no docs/wire-format.md edit, no changelog fragment, and no
implementing bead: all four follow the operator's flip. sui-4lr and
sui-v8o are cross-referenced as sibling wire decisions.
Refs: sui-2s4
Member
Author
|
Direction-agent verdict (campaign 027): UNQUALIFIED, 0 findings - merges AS PROPOSED; the accept flip is the operator's. Scope 503 added / 0 removed plus one index row; shape matches ADR-0014; Status proposed; the ADR-0005 and ADR-0014 consistency claims verified; every cite resolves; terminology scan exit 1 with a positive control. For the flip: the record openly rejects the bead's first acceptance criterion (Option A, mapping in place) in favour of an additive kind key (Option B), so accepting it also re-scopes that criterion. Non-qualifying tidy-ups: the 'eight lines below' cite gap is sixteen; 'verbatim' should read 'identical in effect'. |
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.
Records ADR-0015 at Status proposed.
sui-2s4asked whethersession.terminated'sreasonshould stop being bareinspect/1output.This PR answers it as a decision record and ships nothing else: no code, no
docs/wire-format.mdedit, no changelog fragment, no implementing bead.Provenance
origin/mainat2071776, the squash-merge of sui PR Records a wire vocabulary for error reasons #74(
sui-4lr, ADR-0014). ADR-0014 and its README index row were already onmainwhen this branch was created, so the ADR-0014 row is inheritedrather than merged around, and no rebase-over-sibling resolution was
needed. This record is ADR-0015;
ls docs/adrand the open-PR listwere both checked for a number collision.
lib/,assets/, andmix.exsforsui-wqr. This branch touches none of them.Touched files
docs/adr/0015-a-neutral-discriminator-for-exit-reasons.mddocs/adr/README.mdgit diff origin/main -- docs/adr/shows zero removed lines.What the record decides
Add one field,
kind, carrying a language-neutral lowercase token for theexit reason's class, and leave
reasonbyte-identical as the human overflow.format version stays
1, and the projection position table does not move.The rejected alternative - mapping
:normal/:shutdown/{:shutdown, _}/:killedto bare strings in place - is a changedvalue under an existing key, which ADR-0005's must-ignore rule does not
cover; the record says so explicitly rather than waving at "additive".
test/support/trace/two_state.jsonlcontains zero
session.terminatedmessages (verified, not assumed).kindis never projected;reasonkeeps its existing unconditionalredaction. A projected stream therefore gains an outcome it cannot be
told today.
Consistency with ADR-0014
Stated as its own decision section, with a side-by-side table. There is no
divergence to declare: ADR-0014 kept
inspect/1as a fallback field on theexplicit condition that a neutral token sit beside it, and cited this bead's
third acceptance criterion as the shape it was satisfying. ADR-0015 adopts
the same
kindderivation rule verbatim and the sameinspect/1-beside-a-token split for the field ADR-0014 took the precedentfrom, which closes that record's open coupling rather than opening a new one.
The only asymmetry is ADR-0014's
classkey, absent here becausesession.terminatedhas one payload shape rather than two.Two things flagged rather than buried
{exception, stacktrace}classifies as"unknown"under the shared derivation rule, so the most informative failure gets the
least specific token. Recorded as the record's weakest point, with the
additive escape hatch named.
rejects.
sui-2s4was written in 2026-08 as an implementation bead andasks for bare lowercase strings under
reasonitself. Flipping thisrecord's Status also re-scopes that criterion, and the record's Notes say
so.
A named alternative the operator may prefer (a curated OTP-reason allowlist
with an
"other"token, so{:bad, 1}does not read as a recognised reason)is recorded in the Notes and argued against rather than omitted.
Verification
/wurk:verify --unattendedfound an empty backlog (no plan stage ran), sothe substitute pass applies: every claim was machine-checked by a script.
file:linecites in the record resolve against this branch's HEAD;two were wrong on the first draft and were corrected.
proposed; the record contains noStatus: accepted.docs/adr/and against the open-PR list (empty).deferred to the implementing bead, which is filed on acceptance and not
before.
Gate: not run - docs-only.
gate.rbreportsapplicable: false("no changes under
lib/,test/,config/,mix.exs,mix.lock,assets/,docs/wire-format.md"). CI replays the full gate on the PR.Status: proposed - the flip is the operator's, and follows as its own
docs-only PR under the same review gate.
Refs: sui-2s4