Migrate os-backlog remote reads to OsGit and fold in #853 #1594
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#1594
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
os-backlog reads the git remote through
ShellRunnerininspector/command.rbandproject_index/registration.rb. Open ticket #853 covers the same sites (it names thegitgem) and a defect: an origin read in the process working directory instead of the repository root stores the wrong remote in the project index.Design:
docs/os-git/use-cases-and-domain.md(design) anddocs/os-git/call-site-checklist.md(call sites). Settled decisions are in design section 1 (docs/os-git/use-cases-and-domain.md): the gem lives inplugins/os-gitwith apath:source;git-contextandos:worktreemerge intoos-git; old wrappers go only after all references are updated; design order is use-cases, objects, interfaces;os-contextandos-vaultbecome Ruby; ticket tracking stays out ofos-git.Reproduce
n/a: migration of existing call sites; behavior stays the same unless a criterion says otherwise.
Approach
Group A-06. Replace each remote read with
Repository#remote("origin")and#remotes. Open the repository at the repository root, never at the process working directory. Searchplugins/os-backlog/libfor any otherremotecall (the line numbers in #853 may have moved) and replace those too. After the ticket ships, close #853 as folded into this ticket, with a comment. TheghCLI calls in os-backlog belong to #857, not to this ticket.Mark every row in the checklist from the
Donecolumn as it is replaced. Mark the matching test rows in the same change. Runbin/refresh-pluginsafter changes toSKILL.md, hooks, or CLIs.Required work: none beyond the acceptance criteria.
Acceptance criteria
originis a Forgejo URL, when inspect runs on it, then the findings report the same tracker as before.OsGit::Testing::ScratchRepoand pass.- [x]withReplaced byfilled in, or marked out of scope with a reason, indocs/os-git/call-site-checklist.md.Open3,system(,%x, backticks, andgitargv, then no git call remains outsideOsGitadapters, except sites marked out of scope with a reason.Owner sketch
OsGit::Repositoryowns the remote read:#remote("origin")and#remotes, which exist since #1588.Backlog::Inspector::CommandandBacklog::ProjectIndex::Registrationown the choice of which repository to read: each opens the repository at the root it was given, never at the process working directory. Each keeps its present reply shape;Inspector::RemoteOutputParserkeeps parsing a URL if the callers still need it. os-backlog loads OsGit through its Gemfile with a sibling-firstpath:source, asplugins/os-sdlc/Gemfiledoes; a session hook must not load the full gem.Non-goals
The
ghtooctokitport (#857).Blocking edges
Blocked by the core ticket (#1588).
Origin
Port slice #1621 waits for this ticket, because both touch project_index.
Work started on branch ticket-1594.
Resolution
Done: Inspector::Command and ProjectIndex::Registration read remotes through OsGit at the given root. os-backlog loads OsGit by path source. #853 folded in.
Evidence: main
177518ea. os-backlog 469 runs, 0 failures; changed files clean in rubocop; design audit: no blockers. Rows G-043, G-044, G-176 to G-181 marked. Hand-finished after run 251 escalated on one test defect; ruling 75 answers the audit minors.Follow-ups: #1630 now also covers the CLI exit with no os-git link. Inspect keeps first-remote; registration uses origin (old behavior, ruling 75).