Decide and migrate the os-doc-hygiene Python git classes #1597
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#1597
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-doc-hygieneruns git from Python in three separate classes:RealGitandRealGitStateinscripts/patch_applier.py, andRealGitStateProviderinscripts/report_builder.py(a copy of the second), plusscripts/scanner.py(log --follow).os-doc-hygieneis not on the list of plugins that will become Ruby. Ticket #1554 asks whether to port it.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-09. This ticket needs the Q7 ruling first (design section 8): port to Ruby or call an
os-gitCLI. The recommended ruling is: leave the Python classes untilos-doc-hygieneis ported to Ruby, then use the gem directly, because a CLI bridge adds a second interface for one plugin. The orchestrator makes the ruling with/os-me:predictand records it in the design doc. If the ruling is "defer", comment on this ticket, mark rows G-047 to G-050 and G-182 and G-183 as deferred with a reason and a link to #1554, and leave the ticket open. If the ruling is "call a CLI", replace the three classes with one Python wrapper that calls theos-gitCLI and merge the duplicate state classes into one.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
patch_applier.pyandreport_builder.pyrun their state checks, then both use one class and the results equal the results before the change.- [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.Non-goals
The skill text in
os-doc-hygiene(rows G-109 to G-116 are in the prompt-text ticket #1605). Thereset --hardrollback check (its own ticket #1609).Blocking edges
Blocked by the core ticket (#1588). Also depends on #1554 (whether os-doc-hygiene is ported to Ruby).
Origin
Skipped in the #1610 build: blocker #1554 is open. Rows G-047 to G-050, G-182, G-183 are marked deferred in docs/os-git/call-site-checklist.md. RealGit and RealGitState stay until the os-doc-hygiene Python code is ported.
Ruling (os-me predict, 84, ruling 96 confirms ruling 35): defer. The Python git classes stay until os-doc-hygiene is ported to Ruby (#1554). The port then calls the
os_gitgem directly. Noos-gitCLI verbs and no subprocess bridge, because that would add a second interface for one plugin, and the port removes it. Design section 8 already records Q7. Checklist rows G-047 to G-050, G-182, and G-183 are already marked deferred with a link to #1554. The ticket stays open,waitingon #1554.