os-sdlc: extract_target! only strips first --target occurrence #231
Labels
No labels
P0
P1
P2
P3
bug
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
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#231
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?
extract_target! in plugins/os-sdlc/bin/os-sdlc only strips the first --target occurrence from ARGV; a duplicated flag leaks the second copy into subcommand parsing. Minor quirk found during the #229 --target plumbing review, confirmed by Codex second-opinion review. Low priority.
Agent Brief
Category: bug
Summary:
extract_target!should strip every--targetoccurrence from ARGV, not just the firstCurrent behavior:
The
os-sdlcCLI'sextract_target!removes only the first--target <value>(or--target=<value>) pair from the argument list. If the flag is passed twice, the second copy leaks through into subcommand argument parsing, where it is unrecognized.Desired behavior:
All
--targetoccurrences are stripped before dispatch. Which value wins (first or last) should match whatever the current single-occurrence semantics imply — pick one, assert it in a test, and keep it consistent with how the resolved target is threaded to subcommands (per the--targetplumbing shipped for #229's pipeline blocker).Key interfaces:
extract_target!in theos-sdlcCLI entrypoint — its contract becomes "ARGV contains no--targettokens after this call"Acceptance criteria:
--target X --target Yshows no--targetleaking into subcommand args--target vand--target=vspellings are covered--targetthreading regression tests stay greenOut of scope:
Starting work in worktree fix-231-extract-target.
Fix implemented in worktree fix-231-extract-target, commit
920487a: extract_target! now strips every --target occurrence (first value wins), 4 CLI regression tests cover both spellings + mixed + first-wins; existing threading tests green. A full /os-sdlc:fix-lints run followed (worklist + residual clear, suite 577 runs green). Awaiting merge sign-off.Merged to main in 762591f..dac4e13 (merge commit
dac4e13). Verified: full suite green in worktree before merge (577 runs, 1527 assertions, 0 failures), main..branch empty after merge, plugin cache refreshed. Closing.