Evidence CLI silently ignores unknown Thor options like --path instead of erroring #484
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#484
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?
Context
During a code-probe run on ticket #473 in cc-os, an agent passed
--path <dir>to the evidence CLI (os-sdlc/lib/os_sdlc/evidence/cli.rb) expecting it to scope the search. The CLI only declares a--rootoption (cli.rb:10-13); Thor silently accepted--pathas an unrecognized switch and ignored it, sooptions[:root]stayed at its default"."for every call. Every "scoped" evidence-collect call therefore ranast-grepover the entire repo (resolver.rb:33-35,174-179; probe.rb:46-49,61-66), including noise undergraphify-out/cache/ast/. Multi-token calls took 9+ minutes; one hit a timeout with an IOError from a killed subprocess.Tasks
--pathas a real alias for--root.graphify-out/from the default ast-grep search root.Acceptance criteria
evidence collectproduces a clear error, not silent fallback to defaults.Origin
VERDICT: CREATE — Reproducible validation gap (silent fallback masking a real option typo, causing 9+ minute misscoped scans) with concrete file/line evidence and a stated fix; falls under the validation hard floor.
Resolution
Done: Both tasks resolved. (1) Evidence CLI now rejects unknown Thor options: check_unknown_options! added at lib/os_sdlc/evidence/cli.rb:9 in commit
8fcbd2a, so --path errors hard instead of silently scanning the full repo. (2) graphify-out/ exclusion handled via .gitignore rather than per-invocation --globs: root .gitignore line 13 ignores graphify-out/, and os-vault:onboard-project Step 4 enforces the entry on every onboarded project. ast-grep honors .gitignore by default (it has no ignore field in sgconfig.yml and no built-in dir list), so root-scoped evidence scans skip graphify-out/.Evidence: Verified 2026-08-23: ast-grep run --lang ruby -p 'def $M' . --json=compact from repo root returns zero result paths under graphify-out/ (11.8MB of cache present); explicit-path invocation still reads it, confirming gitignore-based skipping on root scans. cli.rb:9 contains check_unknown_options!.
Follow-ups: none