Review the dispatch_refusing_bad_switches effect added by #860 #920

Open
opened 2026-10-03 12:41:36 +00:00 by jared · 1 comment
Owner

Problem

Ticket #860 added an effect that its acceptance criteria did not require. Onboarding.start calls dispatch_refusing_bad_switches. That method runs Thor start with config.merge(debug: true) and rescues Thor::Error into LoudFailure (exit 3). No test covers a Thor error other than an unknown switch. The user asks why the effect exists, what purpose it serves, and whether it weakens or hardens the code.

Reproduce

n/a: design review of existing code; read Onboarding.start in plugins/os-sdlc/lib/os_sdlc/controller/project/onboarding.rb.

Approach

Answer three questions: why was the effect created, what purpose does it serve, does it weaken or harden the code. Check the effect of debug: true on other Thor failures (missing arguments, bad option values). Then either replace it with a better solution, or add tests that confirm the current one.

Required work: none beyond the acceptance criteria.

Acceptance criteria

  1. Given the ticket is done, when read, then it records the reason, purpose, and weaken-or-harden verdict for dispatch_refusing_bad_switches.
  2. Given a Thor error that is not an unknown switch, when Onboarding.start runs, then a test pins the observed result and exit code.

Origin

  • Trigger: review of closed ticket #860 with Jared, 2026-10-03.
  • Improvised this session: none.
  • Chain: untested effect ← #860 added dispatch_refusing_bad_switches ← DESIGN (plugins/os-sdlc/lib/os_sdlc/controller/project/onboarding.rb, commit 5d0a1cd6).
  • Root candidate: none.
  • Where: OsSdlc::Project::Onboarding.dispatch_refusing_bad_switches
  • Session: a0dbd5c4-ce77-4eaa-bb8a-9517044ae3ad (capture session; the review session ID was not available)
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/a0dbd5c4-ce77-4eaa-bb8a-9517044ae3ad.jsonl
## Problem Ticket #860 added an effect that its acceptance criteria did not require. `Onboarding.start` calls `dispatch_refusing_bad_switches`. That method runs Thor `start` with `config.merge(debug: true)` and rescues `Thor::Error` into `LoudFailure` (exit 3). No test covers a Thor error other than an unknown switch. The user asks why the effect exists, what purpose it serves, and whether it weakens or hardens the code. ## Reproduce n/a: design review of existing code; read `Onboarding.start` in plugins/os-sdlc/lib/os_sdlc/controller/project/onboarding.rb. ## Approach Answer three questions: why was the effect created, what purpose does it serve, does it weaken or harden the code. Check the effect of `debug: true` on other Thor failures (missing arguments, bad option values). Then either replace it with a better solution, or add tests that confirm the current one. Required work: none beyond the acceptance criteria. ## Acceptance criteria 1. Given the ticket is done, when read, then it records the reason, purpose, and weaken-or-harden verdict for `dispatch_refusing_bad_switches`. 2. Given a Thor error that is not an unknown switch, when `Onboarding.start` runs, then a test pins the observed result and exit code. ## Origin - Trigger: review of closed ticket #860 with Jared, 2026-10-03. - Improvised this session: none. - Chain: untested effect ← #860 added `dispatch_refusing_bad_switches` ← DESIGN (plugins/os-sdlc/lib/os_sdlc/controller/project/onboarding.rb, commit 5d0a1cd6). - Root candidate: none. - Where: OsSdlc::Project::Onboarding.dispatch_refusing_bad_switches - Session: a0dbd5c4-ce77-4eaa-bb8a-9517044ae3ad (capture session; the review session ID was not available) - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/a0dbd5c4-ce77-4eaa-bb8a-9517044ae3ad.jsonl
Author
Owner

Related finding, recorded 2026-10-03 so that it is not lost. The unknown-switch error line reads os-sdlc-Unknown switches "--bogus" (exit 3). LoudFailure#stderr_line adds the os-sdlc- prefix, and the line does not name the command. A separate ticket for this got a ticket-skeptic verdict of DROP, because the line comes from the same code path that this ticket reviews. Include the wording of this line in the review. Jared called the current text "a really bad name".

Related finding, recorded 2026-10-03 so that it is not lost. The unknown-switch error line reads `os-sdlc-Unknown switches "--bogus"` (exit 3). `LoudFailure#stderr_line` adds the `os-sdlc-` prefix, and the line does not name the command. A separate ticket for this got a ticket-skeptic verdict of DROP, because the line comes from the same code path that this ticket reviews. Include the wording of this line in the review. Jared called the current text "a really bad name".
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#920
No description provided.