Migrate pb-mirror and decision-model git calls to OsGit #1599
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#1599
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
ruby-gems/pb-mirror/lib/pb_mirror/gitignore_manager.rbrunsrev-parse --is-inside-work-treeandcheck-ignore -q(with a fallback that parses.gitignorewhen not in a repository).ruby-gems/decision-model/lib/decision/model/evals/git_revision.rbrunsrev-parse HEADand returnsnilon failure. These files are in theruby-gemsrepository, not in cc-os.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-14. Add
os-gitto each gem by apath:source (the user's ruling: path sources now, on one machine). UseRepository#ignored?andRepository.findfor pb-mirror. UseRepository#resolve("HEAD")for decision-model; it returnsnilfor an unresolvable HEAD. Commit in theruby-gemsrepository with explicit paths.airtable-api/tools/commit_context(G-072) belongs to the git-context ticket (#1591).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
.gitignore, when pb-mirror checks it, then it reports ignored, and when the directory is not a repository, then the fallback still parses.gitignore.GitRevisionreads HEAD, then it returns the sha; given no repository, then it returnsnil.- [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.Blocking edges
Blocked by the core ticket (#1588).
Origin
Resolution
Done: pb-mirror GitignoreManager uses Repository.find and #ignored?, keeping the .gitignore fallback. decision-model GitRevision uses Repository.find and #resolve. Both gems take os_git by path source; each gemspec lists it. os-me lock updated.
Evidence: pb-mirror dcfaf10: 57 runs, 0 failures, 1 skip. decision-model b4090d1: 318 runs, 0 failures. os-me suite 438 runs, 0 failures. Grep for Open3, system(, %x, backticks in the touched code is clean.
Follow-ups: none: neither gem was pushed; os_git is not published, so a consumer outside this machine needs its own path source, as the user's path-source ruling accepts