Record the OsGit public interface as an ADR #1585
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#1585
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
Many plugins will call the
OsGitinterface. A change to it breaks all of them, so it is a one-way door. No ADR records it. Two existing records also conflict with the code: ADR-0240 is Accepted but the code ignores it, and a claim that "ADR-0174 puts all git calls inOsSdlc::Git::Repo" has no file behind it.Design:
docs/os-git/use-cases-and-domain.md(design) anddocs/os-git/call-site-checklist.md(call sites).Settled by the user on 2026-11-06. Do not reopen these:
plugins/os-gitin cc-os now. Plugins load it by apath:source. It moves toruby-gemslater. No remote-gem work now.git-context(ruby-gems/git-contextandcc-plugins/git-context) andos:worktree(plugins/os) merge intoos-git.os-contextandos-vaultwill be Ruby. Their Python git sites are replaced by the Ruby port, not by a Python shim.os-git. It stays inforgejo-apiandoctokit.Observed
docs/adr/0174-*does not exist. The claim comes from ticket-takedown oracle text. Treat it as not binding.worktree-before-removecommands) is Accepted.plugins/os/lib/worktree/finish_command.rbhas no such step.plugins/os/tests/worktree/finish_command_ignores_before_remove_config_test.rbasserts that the step does not run.plugins/os/skills/worktree/SKILL.mdgive exit code 6 the meaning "primary checkout dirty".path:source is correct now.Reproduce
n/a: this is a decision record, nothing runs.
Approach
Required work: none beyond the acceptance criteria.
Orchestrator work: run
/os-adr:findonplugins/os,plugins/os-sdlc,ruby-gems/git-context, andplugins/os-git. Propose the decision through/os-adr:createand accept its verdict. Never write the ADR by hand.The ADR records only the public interface of design sections 4.3 and 6: the namespace
OsGit; the objectsRepository,Branch,ChangeSet,Span,Worktree,Integration,Commit::Plan,Commit,History,Remote,Sync; and the error rule (raiseOsGit::Errorwhen git fails, returnnil,[], orfalsewhen git answers "nothing there"). It does not record theBackendadapters. The adapter choice is a two-way door.Inputs to settle in the same ADR step:
commit --only -- <paths>only (ADR-0171).commit-applytakes path arguments./os-adr:create. Keep exit code 6 as "primary checkout dirty". If the feature is alive, port it as aWorktree::Finishstep and fix the code.path:source: record the user's ruling as a habit, not as an ADR change, unless/os-adr:createrules otherwise.Rejected: write one ADR for the adapters too — the choice between
CliandRubyGitis reversible and no caller sees it.Acceptance criteria
docs/adr/README.mdis read, then it lists an Accepted ADR for theOsGitpublic interface.OsGitstates that the feature is alive and names the fix.OsGitas the namespace and lists no adapter class.Blocking edges
None. The spike (#1586) can run in parallel. Scaffold (#1587) waits for this ticket.
Origin
Work started by the #1610 orchestrator, session 5b14a4ef-91b2-45c0-a729-baa17682a39a. Branch: ticket-1585.
Resolution
Done: ADR-0305 records the OsGit public interface. ADR-0306 supersedes ADR-0240. Design section 8 records Q4 and Q5.
Evidence:
b430ce73; docs/adr/README.md lists both as Accepted; ADR-0305 names no adapter class. ADR-0240 dead: finish_command.rb has no step, test asserts it does not run, 0 of 27 .cc-os/config files have the key,6cd75d59(#842) deleted it on a user ruling. Judge verdict: trim on both.Follow-ups: commit-apply flag shape (--path versus positional) goes to #1591. ADR-0253 citation of retired ADR-0252 dropped: history text, no effect.