os-backlog finds no tracker from a subdirectory of a normal checkout #1674
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#1674
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
The os-backlog CLI finds no tracker from any subdirectory of a normal checkout.
Backlog::ConfigLocator#locatereads.cc-os/configin the start directory. If that file is absent, it asksfind_owning_rootfor a second directory.find_owning_rootreturns the primary root only when the primary root differs from the repository root, which is true only inside a git worktree. In a normal checkout the two are equal, so the method returns nil and the CLI never reads the repository root's.cc-os/config. A session that starts inplugins/os-sdlcgets/os-backlog:capturepreloads with no scope labels and a prompt to run/os-backlog:route.Observed
The tracker is null from two subdirectories. One has a
.cc-os/folder with noconfigfile. The other has no.cc-os/folder.The same command from
/home/jared/dev/cc-osprintsforgejo:jared/cc-os.The code,
plugins/os-backlog/lib/backlog/config_locator.rblines 24 to 30:Reproduce
Approach
Not decided. The rule that
plugins/os-backlog/lib/backlog/project/session_note.rbstates is: a subdirectory's own.cc-os/configoverrides the repository root's. That rule needs a fallback to the repository root when the subdirectory has no config.locate_for_writeuses the same method, soos-backlog project configurefrom a subdirectory writes a new config there; decide if that stays.Required work: none beyond the acceptance criteria.
Acceptance criteria
.cc-os/confignames a tracker, and a subdirectory with no.cc-os/config, whenos-backlog project showruns in the subdirectory, then it prints the root's tracker..cc-os/confignames a tracker, whenos-backlog project showruns in the subdirectory, then it prints the subdirectory's tracker..cc-os/config, whenos-backlog project showruns in it, then it prints the primary checkout's tracker.Origin
/os-backlog:capturein a session started inplugins/os-sdlc/home/jared/dev/cc-osConfigLocator#locategets nil fromfind_owning_root(plugins/os-backlog/lib/backlog/config_locator.rb:10) ←find_owning_rootdrops the primary root when it equals the repository root (config_locator.rb:29),DESIGN(plugins/os-backlog/lib/backlog/config_locator.rb)Backlog::ConfigLocator#find_owning_root,plugins/os-backlog/lib/backlog/config_locator.rbVERDICT: CREATE — A real, reproducible fault in
Backlog::ConfigLocator#find_owning_root. The ticket is the root, and no open ticket covers it.