Skip to content

dispatcher: subscribe before the opening rows, and ADR-0058's retired rule (#374 #367) - #429

Merged
iot49 merged 1 commit into
mainfrom
review-followup/dispatcher-order
Sep 5, 2026
Merged

dispatcher: subscribe before the opening rows, and ADR-0058's retired rule (#374 #367)#429
iot49 merged 1 commit into
mainfrom
review-followup/dispatcher-order

Conversation

@iot49

@iot49 iot49 commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Two live findings from the whole-range review of 1fd42cf..05e22c7 — the 48
commits of the first two ADR-0059 batches, which merged on per-issue audits
alone because both runs died on a quota limit before their own review ran.

The dispatcher publishes before it subscribes

The same defect that failed CI twice on #425 and was fixed for the scheduler,
in the one app nobody caught. state/run is what a client waits for to learn
the dispatcher is up, so a gesture can arrive the instant after it, and an
event is not retained.

The layout interface and the simulator had the same order and were fixed while
#394 landed. The dispatcher was missed by every per-issue audit, by that fix,
and by me when I wrote the ruling saying the order applies to every app.

Recording and its assertion move to tests/harness.py rather than being
copied into a second suite. The new test fails without the fix.

ADR-0058 states a retired rule as current

#367 retired "an address names its system as its first level". ADR-0043 and
ADR-0022 got amendment banners; ADR-0058 said it under a heading reading "What
ADR-0043 already settles, and this does not touch", and #368 sends readers
there. Now states the rule that holds, with its own note.

Not in this PR

Four findings filed as issues instead — the six-way duplication across the app
command lines, cold start as vocabulary the glossary tells you to avoid, the
startup order that contradicts its own docstring, and the missing check between
CONTEXT.md and the inventory.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NNNTTEXDua7ZG2M7fvTLjk

The same defect fixed for the scheduler in #373's follow-up, in the one app
that still had it. `Dispatcher.__init__` published its standing locks, run,
aspects, allocation and disputed rows and subscribed afterwards. `state/run`
is what a client waits for to learn the dispatcher is up, so a request, a
hold or a placement can arrive the instant after it, and an event is not
retained: nothing replays what lands in the gap. Over a broker a publish is
asynchronous where a subscribe waits to be acknowledged, so the gap is a
round trip wide; in one process it had no width and the order never showed.

Safe to subscribe first because `_on_dispatch` already ignores this app's own
announcements coming back past it, and nothing on `tc49/layout/#` is
published from this constructor.

Found by the whole-range review of 1fd42cf..05e22c7, which is the first look
anything has taken at those 48 commits together. The layout interface and the
simulator had the same order and were fixed while #394 landed; the dispatcher
was missed by every per-issue audit and by that fix.

`Recording` and the assertion move from `tests/scheduler/test_scheduler.py` to
`tests/harness.py`, so the second app to want them does not copy them. Both
apps now assert the order on the in-process bus rather than waiting for a slow
broker to expose it.

ADR-0058 stated the rule #367 retired as current fact, under a heading saying
it was settled and untouched, and #368 sends readers there for the fold. Its
existing banner covered only `tc49 live --station`. The section now states the
rule that holds and carries its own amendment note.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NNNTTEXDua7ZG2M7fvTLjk
@iot49
iot49 merged commit 4138354 into main Sep 5, 2026
1 check passed
@iot49
iot49 deleted the review-followup/dispatcher-order branch September 5, 2026 06: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