finish_command.rb sweep names the os-sdlc-runner path it tried (#635b) #703
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#703
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
finish_command.rb's worktree-removal sweep reports only a boolean. It cannot distinguish "binary not found" from "binary found but exited nonzero." The fix must keep the existing sweep-failure test green: it asserts the message containsos-sdlc-runnerin stderr and that the process still exits 0.Observed
Verified on main today (2026-09-24).
plugins/os/lib/worktree/finish_command.rb:124-126system('os-sdlc-runner', ...) || warn(...)reports only a boolean; it cannot distinguish "binary not found" from "binary found but exited nonzero." Pinned byplugins/os/tests/worktree/finish_command_sweep_failure_does_not_block_removal_test.rb, which asserts/os-sdlc-runner/appears in stderr and that the process exits 0.Reproduce
Approach
Add a
Worktree::BinaryLocator(or reuse a shared one) and use it infinish_command.rbforos-sdlc-runner, replacing the boolean-onlysystem(...) ||. When the binary is missing, warn with "os-sdlc-runner not found on PATH (tried: ...), usage not swept"; when it is found but exits nonzero, warn with the resolved path and the exit status. Sweep failure never blocks worktree removal either way.Required work:
Worktree::BinaryLocator(or reuse a shared one) and use it infinish_command.rbforos-sdlc-runner, replacing the boolean-onlysystem(...) ||— check:plugins/os/tests/worktree/finish_command_sweep_failure_does_not_block_removal_test.rbstill asserts/os-sdlc-runner/in stderr and exit 0, unchanged.Rejected: an ENV variable override for the binary path (forbidden by ADR-0213's neighboring boundary rule; keep resolution to PATH plus named fallback). Merging plugin load paths (a deliberate process boundary, not an accident to fix by removing it).
Non-goals: changing what happens when the sweep legitimately fails for a reason other than a missing binary. No ADR change.
Constraint:
plugins/os/tests/worktree/finish_command_sweep_failure_does_not_block_removal_test.rbmust stay green (message still contains "os-sdlc-runner", exit 0).VERDICT: CREATE
Acceptance criteria
finish_command.rbruns its sweep, then it warns "os-sdlc-runner not found on PATH (tried: ...), usage not swept" and does not block worktree removal.finish_command.rbruns its sweep, then it warns with the resolved path and the exit status, and still does not block worktree removal.Owner sketch
Non-goals
Origin
system(...) ||instead of a resolved, injectable path ← DESIGN, plugins are separate load paths by design (not a bug to fix by merging them).Work started in session 082c3e8b on branch ticket-703 via /os-sdlc:implement.
Implementation 32 failed at seam-designer (verdict:error): the change-auditor dispatch 347 produced a handoff for ticket #702 (BodyFetch, os-sdlc) instead of #703 (finish_command.rb, os). Reopening a fresh implementation.
Resolution
Done: Worktree::UsageSweep owns the sweep; Worktree::BinaryLocator resolves os-sdlc-runner on PATH. Missing binary warns 'os-sdlc-runner not found on PATH (tried: ...), usage not swept'; a nonzero exit warns with the resolved path and exit status. Worktree removal proceeds in both cases.
Evidence: Pipeline implementation 33 (11 dispatches, implementation_complete; implementation 32 failed on a wrong-ticket change-auditor handoff, captured as #706). New test plugins/os/tests/worktree/finish_command_sweep_binary_resolution_test.rb (2 cases); existing finish_command_sweep_failure_does_not_block_removal_test.rb stays green. os suite 24 runs 0 failures. Commit on branch ticket-703.
Follow-ups: #706 captured (change-auditor audited previous ticket, VERDICT: CREATE). Dropped: Style/Documentation offenses on the two new classes match existing plugin practice (Removal has the same offense) and the repo forbids what-it-does comments.