Make evidence collect skip git-ignored files #967
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#967
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
bin/evidence collectreads files that git ignores. The ruby-lsp probe indexes the whole--root, including the ignored takedown copies underdocs/takedown/*/scratch-*/. The collect run becomes 13 times slower, and the report gives evidence from copies that are not the project code.Observed
On 2026-10-07 the worktree held 47,695
.rbfiles underdocs/takedown, against about 1,540 tracked files. The same five tokens (IssueBody, IssueBody::Lines, FenceStack, TicketShape::Section, section_body) were collected twice on an idle machine:scratch-*docs/takedownThe collect run takes longer than the 120 s Bash timeout, so it moves to the background. In takedown runs #963 and #965, blast-radius agents then waited 11 to 29 minutes for the background notification.
Reproduce
Run it in a worktree that contains
docs/takedown/963/scratch-*.Approach
evidence collectand its LSP workspace use only files that git tracks or that git does not ignore (git ls-files --cached --others --exclude-standard). This fixes the whole class: any ignored copy, cache, or build output is out of scope, not only the takedown scratch copies.Rejected: exclude
docs/takedown/*/scratch-*by a fixed path — another ignored copy elsewhere causes the same defect.Rejected: move the scratch copies outside the repo — the #966 pipeline removes scratch builds, but the evidence CLI still reads other ignored files.
Origin
evidence collectexceeds the 120 s Bash timeout and runs in the background ← the ruby-lsp probe indexes ignored scratch copies (timed 208.8 s vs 16.1 s) ←evidence collecttakes the whole--rootwith no git filter. End: DESIGN (bin/evidence collect, os-sdlc).bin/evidence collectand its LSP workspace setupVERDICT: CREATE — measured 208.8 s vs 16.1 s, chain ends in DESIGN, causes 11-29 min idle in #963/#965.
Design note (session 87a712ed): os-sdlc already has one hardcoded exclusion list,
Codebase::EXCLUDED_SEGMENTS = %w[.sdlc vendor node_modules tmp](plugins/os-sdlc/lib/os_sdlc/model/project/codebase.rb:6).bin/evidencedoes not use it; it queries the ruby-lsp workspace throughLspRunner. Fix the class with one owner:Codebasedecides which files belong to the project (git-ignored files excluded), and both the LSP workspace and evidence collect ask it, so a second exclusion list does not appear. Note: the eval harness scratch repos live outside the repo at ~/.cache/cc-os/takedown-runs (locations.rb:5), so they do not trigger this defect; the in-repo copies came from the production skill's designers writing docs/takedown//scratch-.Close ruling still open (2026-10-09). Remaining cost: ruby-lsp textDocument/references globs the whole workspace regardless of excludedPatterns (64 s to 52 s at 38.6k ignored files). Options: symlinked workspace from Codebase, ast-grep for references, or upstream. Owner has not ruled. See docs/handoffs/2026-10-08-takedown-autoresearch.md.