Read the origin remote in os-backlog through the git gem #853
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.
Depends on
Reference
jared/cc-os#853
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 in two places. Both start a
gitprocess and parse its text output.origin_remotealso has a defect. It runs in the process working directory, not in@repo_root. When config-write runs for a repository other than the working directory, it stores the wrong remote in the project index. It also creates its ownShellRunner, so no test can replace it.tests/cli_config_write_command_test.rbruns the realgitin the test's working directory.Reproduce
n/a: the working-directory defect needs a config-write call whose
repo_rootdiffers from the working directory. Acceptance criterion 2 is the observable check.Approach
Both call sites read the remote through the git gem. They use the same gem and the same dependency mechanism as the git gem work from session f531ed01.
Required work:
Rejected: keep
git remotethroughShellRunner— #845 moves all git commands to the git gem.Acceptance criteria
originis a Forgejo URL, when inspect runs on it, then the findings report the samegit_remotekind, owner, and repo as today.repo_rootthat is not the working directory, when it upserts the project index, then the storedremoteis theoriginURL ofrepo_root.originremote, when config-write runs, then the storedremoteis empty.gitprocess started for the remote lookup.Owner sketch
InspectCommandandConfigWriteCommanduseOriginRemote.new(@repo_root).Tracker.parse_remoteaccepts the URL, not thegit remote -vtext.Non-goals
Blocked by
Origin
origin_remoterunsgitin the process working directory with a hard-wiredShellRunner(config_write_command.rb:57) ← IMPROVISATION: no recorded reason.Blocked by #866 (Forgejo dependency recorded).
Related finding, recorded 2026-10-03 (session a0dbd5c4). os-sdlc has git calls outside its git adapter
Git::Repo:plugins/os-sdlc/lib/os_sdlc/adapter/mutation/check.rb:73runsgit applyas a shell string throughProjectShell.capture3, andplugins/os-sdlc/lib/os_sdlc/adapter/lint_changed/changed_files.rb:11,31rungitthrough their owncapture. No defect is known; an independent judge ranked the move as marginal, and a ticket-skeptic verdict of DROP stopped a separate ticket. Include these call sites when the git gem work is planned. See also #925.Resolution
Done: Folded into #1594: origin reads go through OsGit at the repository root, which fixes the wrong-directory defect.
Evidence: main
177518ea; #1594 tests pin a repository other than the process directory.Follow-ups: none. AC 4 (no git process) is superseded: the spike dropped the in-process adapter, rulings row 37.
Folded into #1594, merged as
177518ea: origin reads go through OsGit at the repository root, which fixes the wrong-directory defect. AC 4 (no git process) is superseded by the dropped in-process adapter (rulings row 37). The tracker refused to close this ticket because it depends on open #866. Remove that dependency or close after #866.