Cut Dispatch -> Boot: drop HookReading use in Admission and Settlement #1168

Closed
opened 2026-10-19 20:13:16 +00:00 by jared · 3 comments
Owner

Problem

The Dispatch concept calls into the Boot concept in two places. Dispatch::Admission.subagent_start calls Boot::HookReading.arrival(event) (dispatch/admission.rb:7). That method only calls event.arrival and rescues KeyError and Event::UnknownAgentError. Admission already has the same rescue with the same Loud::Exit message.

Dispatch::Settlement.subagent_stop_from_stdin parses stdin through Boot::HookReading (dispatch/settlement.rb:7). Only tests/dispatch/settlement_repo_test.rb calls it. Production goes Boot::Inputs.subagent_stop -> Dispatch::Completion -> Settlement.subagent_stop. The edge Dispatch -> Boot lies on 48 concept cycles.

Reproduce

n/a: structure-wave cut, nothing to reproduce

Approach

Required work:

  1. In plugins/os-sdlc/lib/os_sdlc/dispatch/admission.rb, call event.arrival directly: Dispatch::SubagentStart.call(event.cwd, event.arrival). Keep the existing rescue KeyError, Event::UnknownAgentError. The Loud::Exit text stays the same.
  2. In plugins/os-sdlc/lib/os_sdlc/dispatch/settlement.rb, delete Settlement.subagent_stop_from_stdin — check: absent Boot in plugins/os-sdlc/lib/os_sdlc/dispatch/**/*.rb
  3. In plugins/os-sdlc/tests/dispatch/settlement_repo_test.rb, call Dispatch::Settlement.subagent_stop(@dir, dispatch_id: id, content: ...) in place of subagent_stop_from_stdin.

Acceptance criteria

  1. Given the suite, when run after the change, then it passes with no new failures.
  2. Given the lib tree, when bin/crc-cycle-edges runs, then no edge Dispatch -> Boot lists dispatch/admission.rb:7. The same holds for dispatch/settlement.rb:7.
  3. Given a SubagentStart event with an unknown agent type, when Admission.subagent_start runs, then it exits loudly with subagent-start and the same message as before.
  4. Given a pending dispatch, when Settlement.subagent_stop receives its id and content, then the dispatch settles in the root's store.

Owner sketch

module OsSdlc::Dispatch::Admission
  def self.subagent_start(event)
    Dispatch::SubagentStart.call(event.cwd, event.arrival)
  rescue KeyError, Event::UnknownAgentError => e
    Loud::Exit.call("subagent-start #{e.message}")
  end
end

Boot::HookReading.arrival stays: Boot::Inputs (boot/inputs.rb:27) still calls it. Pinning tests: tests/pipeline/cli_subagent_start_test.rb, tests/controller/hook_envelope_bytes_test.rb, tests/dispatch/briefing_test.rb, tests/dispatch/completion_test.rb, tests/dispatch/settlement_repo_test.rb.

Non-goals

The tests are already in place on branch crc-os-sdlc-run-3: tests/dispatch/settlement_repo_test.rb calls Settlement.subagent_stop, and tests/dispatch/admission_test.rb pins the loud exit. Change no test.
S8 lands before S4. S8 and S4 share lib/os_sdlc/dispatch/settlement.rb. S2 lands only after S4.

Origin

  • Trigger: os-sdlc CRC run 3, structure-ruling wave step 1 (bin/crc-cycle-edges on main 049a7820)
  • Improvised this session: none
  • Chain: concept cycle Dispatch -> Boot (cycles_through 48) ← dispatch/admission.rb:7, dispatch/settlement.rb:7 ← DESIGN (docs/crc/os-sdlc/wave0/structure-rulings.tsv S4)
  • Root candidate: none found; searched HookReading, Admission, Settlement
  • Where: plugins/os-sdlc/lib/os_sdlc/dispatch/admission.rb
  • Ledger: docs/crc/os-sdlc/ledger.tsv
  • Rulings: docs/crc/os-sdlc/wave0/structure-rulings.tsv
  • Session: 2e167079-f404-4139-9cfa-6c0c937ce9f0
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/2e167079-f404-4139-9cfa-6c0c937ce9f0.jsonl

VERDICT: CREATE

## Problem The Dispatch concept calls into the Boot concept in two places. `Dispatch::Admission.subagent_start` calls `Boot::HookReading.arrival(event)` (dispatch/admission.rb:7). That method only calls `event.arrival` and rescues `KeyError` and `Event::UnknownAgentError`. `Admission` already has the same rescue with the same `Loud::Exit` message. `Dispatch::Settlement.subagent_stop_from_stdin` parses stdin through `Boot::HookReading` (dispatch/settlement.rb:7). Only `tests/dispatch/settlement_repo_test.rb` calls it. Production goes `Boot::Inputs.subagent_stop` -> `Dispatch::Completion` -> `Settlement.subagent_stop`. The edge Dispatch -> Boot lies on 48 concept cycles. ## Reproduce n/a: structure-wave cut, nothing to reproduce ## Approach Required work: 1. In `plugins/os-sdlc/lib/os_sdlc/dispatch/admission.rb`, call `event.arrival` directly: `Dispatch::SubagentStart.call(event.cwd, event.arrival)`. Keep the existing `rescue KeyError, Event::UnknownAgentError`. The `Loud::Exit` text stays the same. 2. In `plugins/os-sdlc/lib/os_sdlc/dispatch/settlement.rb`, delete `Settlement.subagent_stop_from_stdin` — check: absent `Boot` in `plugins/os-sdlc/lib/os_sdlc/dispatch/**/*.rb` 3. In `plugins/os-sdlc/tests/dispatch/settlement_repo_test.rb`, call `Dispatch::Settlement.subagent_stop(@dir, dispatch_id: id, content: ...)` in place of `subagent_stop_from_stdin`. ## Acceptance criteria 1. Given the suite, when run after the change, then it passes with no new failures. 2. Given the lib tree, when `bin/crc-cycle-edges` runs, then no edge Dispatch -> Boot lists `dispatch/admission.rb:7`. The same holds for `dispatch/settlement.rb:7`. 3. Given a SubagentStart event with an unknown agent type, when `Admission.subagent_start` runs, then it exits loudly with `subagent-start` and the same message as before. 4. Given a pending dispatch, when `Settlement.subagent_stop` receives its id and content, then the dispatch settles in the root's store. ## Owner sketch ```ruby module OsSdlc::Dispatch::Admission def self.subagent_start(event) Dispatch::SubagentStart.call(event.cwd, event.arrival) rescue KeyError, Event::UnknownAgentError => e Loud::Exit.call("subagent-start #{e.message}") end end ``` `Boot::HookReading.arrival` stays: `Boot::Inputs` (boot/inputs.rb:27) still calls it. Pinning tests: `tests/pipeline/cli_subagent_start_test.rb`, `tests/controller/hook_envelope_bytes_test.rb`, `tests/dispatch/briefing_test.rb`, `tests/dispatch/completion_test.rb`, `tests/dispatch/settlement_repo_test.rb`. ## Non-goals The tests are already in place on branch crc-os-sdlc-run-3: `tests/dispatch/settlement_repo_test.rb` calls `Settlement.subagent_stop`, and `tests/dispatch/admission_test.rb` pins the loud exit. Change no test. S8 lands before S4. S8 and S4 share `lib/os_sdlc/dispatch/settlement.rb`. S2 lands only after S4. ## Origin - Trigger: os-sdlc CRC run 3, structure-ruling wave step 1 (bin/crc-cycle-edges on main 049a7820) - Improvised this session: none - Chain: concept cycle Dispatch -> Boot (cycles_through 48) ← dispatch/admission.rb:7, dispatch/settlement.rb:7 ← DESIGN (docs/crc/os-sdlc/wave0/structure-rulings.tsv S4) - Root candidate: none found; searched HookReading, Admission, Settlement - Where: plugins/os-sdlc/lib/os_sdlc/dispatch/admission.rb - Ledger: docs/crc/os-sdlc/ledger.tsv - Rulings: docs/crc/os-sdlc/wave0/structure-rulings.tsv - Session: 2e167079-f404-4139-9cfa-6c0c937ce9f0 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/2e167079-f404-4139-9cfa-6c0c937ce9f0.jsonl VERDICT: CREATE
Author
Owner

Work started on branch crc-os-sdlc-run-3 (os-sdlc CRC run 3, structure wave step 1).

Work started on branch crc-os-sdlc-run-3 (os-sdlc CRC run 3, structure wave step 1).
Author
Owner

Dropped follow-up (ticket-skeptic DROP): the structure-change unchanged gate failed 2248 -> 2249 runs because the orchestrator committed the green tests (8f4d1499) and rerouted. The escalation procedure says to hand-finish green work; that path avoids the defect. The orchestrator then hand-finished (03a37f8c) and abandoned implementation 85.

Dropped follow-up (ticket-skeptic DROP): the structure-change unchanged gate failed 2248 -> 2249 runs because the orchestrator committed the green tests (8f4d1499) and rerouted. The escalation procedure says to hand-finish green work; that path avoids the defect. The orchestrator then hand-finished (03a37f8c) and abandoned implementation 85.
Author
Owner

Resolution

Done: Cut the Dispatch -> Boot cycle edge: Admission calls event.arrival and keeps its rescue; Settlement.subagent_stop_from_stdin is deleted; settlement_repo_test calls Settlement.subagent_stop; admission_test pins the loud exit.

Evidence: 8f4d1499 (tests), 03a37f8c (change), merged to main; suite 2249 runs, 0 failures; eager load exit 0; rubocop on changed files clean; inward delta exit 1 only from the #1174 rename false positive, real change: the admission.rb Boot::HookReading offense is gone; cycle edges 11 -> 8. Hand-finished; implementation 85 abandoned after the unchanged gate counted the pre-committed test.

Follow-ups: none (unchanged-baseline follow-up dropped by ticket-skeptic; reason posted on this ticket)

## Resolution **Done:** Cut the Dispatch -> Boot cycle edge: Admission calls event.arrival and keeps its rescue; Settlement.subagent_stop_from_stdin is deleted; settlement_repo_test calls Settlement.subagent_stop; admission_test pins the loud exit. **Evidence:** 8f4d1499 (tests), 03a37f8c (change), merged to main; suite 2249 runs, 0 failures; eager load exit 0; rubocop on changed files clean; inward delta exit 1 only from the #1174 rename false positive, real change: the admission.rb Boot::HookReading offense is gone; cycle edges 11 -> 8. Hand-finished; implementation 85 abandoned after the unchanged gate counted the pre-committed test. **Follow-ups:** none (unchanged-baseline follow-up dropped by ticket-skeptic; reason posted on this ticket)
jared closed this issue 2026-10-19 21:41:50 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1168
No description provided.