Skip to content

docs(adr)+fix(hooks): the session-mail channel is wired, and four places still called it a prototype (BACKLOG #1215) - #604

Merged
wshallwshall merged 14 commits into
mainfrom
claude/builder-1-1215-adr-wiring
Aug 26, 2026
Merged

docs(adr)+fix(hooks): the session-mail channel is wired, and four places still called it a prototype (BACKLOG #1215)#604
wshallwshall merged 14 commits into
mainfrom
claude/builder-1-1215-adr-wiring

Conversation

@wshallwshall

Copy link
Copy Markdown
Collaborator

ADR 0161 said the mail-drain code was "a prototype and is deliberately NOT WIRED." It is wired --
measured three ways that fail differently: the installer carries SessionStart and Stop rows; two
installed config roots carry the hook at both events; and the drain fired in the filing session and
reported on its inbox by path. The brief named two files; a census found the same false claim in
four, including the hook's own comment and the test module docstring.

Three things this deliberately does NOT do, each stated so the next reader doesn't assume otherwise:

  • Does not move the ADR off Proposed -- that is a disposition and the owner's to make.
  • Does not edit the tail decision box into agreement. It records "DECIDED 2026-08-06: NOT WIRED" for
    the urgent asyncRewake tier, and mail-watch.ps1 IS wired at Stop in both roots
    (install-coordination.ps1:305). The contradiction is recorded beside the decision and routed to
    the owner through the Dispatcher, not resolved here.
  • Does not touch SESSION-MAIL.md, which carries the same false claim about that same unsettled
    tier.

One review note: a grep for "not wired" over this change's territory also hits
tests/test_announce_wiring.py:266 -- that is the message of an assert whose condition asserts the
drain IS wired, reachable only when the assertion fails. That test was already correct and is
untouched here.

Verified: 138 passed across test_session_mail.py, test_announce_wiring.py and
test_announce_hook.py -- driven as subprocesses against throwaway repos, so it exercises the real
hook. ruff clean on the touched test.

Built by Builder1, opened by Lander.

🤖 Generated with Claude Code

wshallwshall and others added 2 commits August 25, 2026 17:18
…ces still called it a prototype (BACKLOG #1215)

ADR 0161's status line said the mail-drain code was "a prototype and is
deliberately NOT WIRED". It is wired. Measured three ways, each failing
differently:

  source        install-coordination.ps1 carries drain rows for SessionStart
                and Stop -- the same rows the ADR says "stay exactly as they
                are"
  installed     TWO installed config roots carry mail-drain.ps1, each at BOTH
                events, so a config root HAS been installed from them
  observed      the drain fired during a real session and reported on that
                session's own inbox by path

The brief named two files. A census found the same false claim in four,
one of them shipped code and one a test docstring -- neither reachable
from the two the brief named:

  docs/adr/0161  the status line and the "what gates wiring" section
  mail-drain.ps1:257  "this channel is deliberately not wired", inside the
                hook that is wired. Its ARGUMENT survives: the idiom is
                duplicated because announce-session.ps1 ends in exit 0 and
                cannot be dot-sourced. Only the reason given was false.
  test_session_mail.py:5  the module docstring a reader starts from

The ADR's false paragraph is CORRECTED IN PLACE rather than deleted. It was
true when written, the gating argument still stands, and a reader needs to
see what changed. What remains accurate is stated too: wiring was meant to
be a separate owner-approved step gated on #1028, and nothing records that
approval -- so the open question is not whether it is wired but whether it
was wired through the gate the ADR describes.

WHAT THIS COMMIT DOES NOT DO, deliberately.

It does not move the ADR off `Proposed`. That is a disposition, and an
owner's.

It does not edit the decision box at the tail into agreement with reality.
That box records "DECIDED 2026-08-06: NOT WIRED" for the urgent asyncRewake
tier -- and mail-watch.ps1 IS wired at Stop in both installed roots, with a
row at install-coordination.ps1:305. So SESSION-MAIL.md's sibling claim,
that the tier "is not wired and is not in the installer's wiring table", is
false on both halves. Either the decision changed and the record did not, or
the tier was wired without it. The contradiction is recorded beside the
decision and routed to the owner. A decision that flips as a side effect of
a docs fix is indistinguishable in the diff from one that was made.

It does not touch SESSION-MAIL.md. That is the operator-facing document, its
false claim is about the urgent tier rather than the drain, and correcting it
would bake in an answer to the question above.

ONE THING WORTH RECORDING FOR THE NEXT READER. A grep for "not wired" also
matches test_announce_wiring.py:266 -- which is the MESSAGE of an assert
whose condition asserts the drain IS wired. The string is only reachable
when the assertion fails, so its presence is evidence the suite checks the
opposite of what the grep implies. That test was already correct and was
left alone.

Verified: 138 passed across test_session_mail.py, test_announce_wiring.py and
test_announce_hook.py; ruff clean on the touched test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@wshallwshall
wshallwshall enabled auto-merge (squash) August 25, 2026 23:19
@wshallwshall
wshallwshall merged commit 871f146 into main Aug 26, 2026
39 of 40 checks passed
@wshallwshall
wshallwshall deleted the claude/builder-1-1215-adr-wiring branch August 26, 2026 14:06
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