Git::Repo#changed_paths mixes repo-relative and cwd-relative paths; nested targets get doubled paths in lint and diff-test #615
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#615
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?
Git::Repo#changed_paths mixes repo-relative and cwd-relative paths; nested targets get doubled paths in lint and diff-test [capture]
Context
This came up during the #612 pipeline run, on target
plugins/os-backlog.The lint gate failed on every programmer and repair attempt.
Observed
git diff --name-onlyprints paths relative to the repository top level.git ls-files --others --exclude-standardprints paths relative to the current working directory.Adapter::Git::Repo#changed_pathsconcatenates both lists without normalizing the base.For a target that is a subdirectory of the repo, this mixes two different path bases in one list.
On the #612 run, the rubocop command built from this list doubled the target prefix.
This happened on all 8 programmer gate attempts and 3 repair rounds. The bound exhausted and the ticket was hand-finished.
A second effect: tracked changed test files arrive repo-relative, so they never match
project.test.include?, which expects thetests/prefix.The diff-test gate silently drops these files. Only the untracked new test file ran, shown as "4 runs".
One diff-test attempt in implementation 1 showed the same doubled path with
require_relative.os-sdlc's own runs, with target
plugins/os-sdlc, are exposed to the same mismatch.Reproduce
Compare the output path base against:
The first is repo-relative; the second is cwd-relative.
Expected
Origin
Slice
Fix
Adapter::Git::Repo#changed_pathsso both source lists share one path base, relative to the caller's cwd.Acceptance criteria
changed_pathsreturns paths relative to the same base for both tracked and untracked files.plugins/) resolves to a path the lint gate can pass to rubocop without doubling the target prefix.Non-goals
This ticket does not change
test_pathdefaults. See the companion ticket onProject::Test.Owner sketch
Cases
Skeptic verdict
VERDICT: CREATE
REASON: Root-cause design bug in Adapter::Git::Repo#changed_paths (mixed repo-relative/cwd-relative path bases), reproduced and observed across a full bound-exhausted #612 pipeline run with a clean Origin chain ending in DESIGN, not improvisation.
## Retired testsand## Approach#612Work started on branch ticket-615 in a worktree.
Resolution
Done: Git::Repo#changed_paths passes --relative to git diff --name-only so tracked and untracked paths share the cwd base for nested targets.
Evidence: Merged to main from branch ticket-615 (commit
3f4e34bf). os-sdlc suite 1346 runs, 0 failures. rubocop clean. New test test_changed_paths_shares_one_path_base_for_a_nested_target was red on the doubled path, green after. The #611 pipeline run on target plugins/os-sdlc is the live check.Follow-ups: none