bin/evidence: a new file resolves to an unrelated file with the same basename #1760
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#1760
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 collectresolves a path that does not exist to an unrelated file with the same basename.TokenResolution#file_pathdoes this in its fallbackDir.glob(root/**/basename).first.The fallback runs before
--expect-newis applied, so a new file in a design gets the lookups of an unrelated file.The takedown final check then runs past its timeout and the takedown writes no design.
Observed
The takedown final check (
Takedown::EvidenceCheck,plugins/os-sdlc/eval/ticket-takedown/lib/takedown/command/evidence_check.rb,TIMEOUT = 600) runsbin/evidence collect --root <scratch repo> <paths> --expect-new <paths>on the files of the final design.The scratch repo is an export of the base commit. The same result occurs from the main checkout.
For a path that does not exist,
TokenResolution#file_pathfalls back toDir.glob(root/**/basename).first.A new file therefore resolves to an unrelated file with the same basename, and the tool traces each method of that file through the language server.
The run on 2026-11-13 was the takedown of #1748. Its run directory is
docs/takedown/1748-20261113-150953/, in the worktree.claude/worktrees/ticket-1742.The last line of the run was
FAILED final-check: evidence timed out after 600s.The design had 16 paths. 14 of them were new.
Six new files resolved to unrelated files:
concept_cycle_check/kinds.rbresolved todocs/research/lint-lessons/2026-11-13-concept-cycle-kinds/simulation/kinds.rb(574 lookups).graph.rbresolved toplugins/os-adr/lib/adr/record/matches/graph.rb(30 lookups).kinds/record.rbresolved toplugins/os-adr/lib/adr/record.rb(22 lookups).kinds/report.rb,kinds/ledger.rb, andkinds/report_test.rbresolved to files underdocs/system-design-format/proof/(17, 8, and 3 lookups).The total was 721 lookups. 654 of them were about unrelated files.
One existing file,
references.rb, took 78 s for 39 lookups. This is about 2 s for each lookup. 721 lookups need about 24 minutes.The run wrote no
final-design.jsonand an emptyfinal-evidence.txt. The implementation phase cannot start from the takedown.A larger timeout would give evidence about unrelated files.
A related defect is on the same code path.
units_in_filemakes one unit for each class in a file, and each unit traces all methods of the file.The lookups of a file therefore multiply by its class count. The two existing files had 28 and 39 lookups in place of 14 and 13.
Reproduce
docs/research/lint-lessons/2026-11-13-concept-cycle-kinds/simulation/kinds.rbwithgit archiveinto an empty directory<export>.kinds.rb. It does not return in 100 s.Origin
docs/takedown/1748-20261113-150953/in the worktree.claude/worktrees/ticket-1742), which ended withFAILED final-check: evidence timed out after 600sbin/evidence collecttimes out ← a new file resolves to an unrelated file with the same basename ← DESIGN: the fallback inplugins/os-sdlc/lib/os_sdlc/evidence/resolution/token_resolution.rb(TokenResolution#file_path) runs before--expect-newTokenResolution#file_path)VERDICT: CREATE - measured tool defect that blocked a pipeline run (hard floor); open #1678 covers a different fault.
Resolution
Done: A path named in --expect-new no longer resolves to an unrelated file with the same basename; the basename fallback stays for other paths.
Evidence:
fdc97824amerged to main51a5613db; test_expected_new_path_does_not_resolve_to_a_same_basename_file; suite 5566 runs 0 failuresFollow-ups: units_in_file multiplies lookups by class count: pending capture with ticket-skeptic verdict
Follow-up resolved: the units_in_file per-class lookup multiplication is DROPPED by ticket-skeptic (2026-11-14): depth-2 follow-up, cost not failure now that the basename fallback is fixed; re-file only if a real run times out on per-class fan-out.