Migrate delta-refinery git calls to OsGit and remove the stash handler #1601
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#1601
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
delta-refineryrunsgit diff HEAD,git stash list,git stash pop, andgit rev-parse HEADinlib/agents/programmer/post.rb,lib/agents/validator/pre.rb,bin/lint_fix, andlib/rdx_cache/key.rb.post.rbrunsstash popon its own when the stash count grew.bin/lint_fixsets its baseline withinstance_variable_set. These files are in thedelta-refineryrepository.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-16. Add
os-gitby apath:source. UseRepository#changesand#diff(paths:, against: "HEAD")for the diff reads, andRepository#resolve("HEAD")for the cache key (keep theno-gitfallback). Q8 ruling (made with/os-me:predict, recorded in the design doc): delete the stash handler (UC-28) and forbid agent stashing in the agent brief (ADR-0171 already bansstash). If a stash appears, report it and do not pop it. Commit in thedelta-refineryrepository with explicit paths.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
no-gitfallback.- [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
Work is done and committed on delta-refinery branch ticket-1601, in worktree .claude/worktrees/ticket-1601: 749 runs, 0 failures; rake test:rdx passes. worktree finish exits 6: the main checkout has uncommitted edits to .gitignore, CLAUDE.md, and two docs/dependencies files. They do not overlap the branch and are not from this build, so they stay untouched. To finish: commit or set aside those edits, then run worktree finish ticket-1601 from the delta-refinery main checkout. Rows G-079 to G-082 are marked after the merge. Deviation on G-081: OsGit has no stash list, so the baseline compares the refs/stash tip SHA. A new stash or a pop changes the tip; the count is not read.
Blocked on Jared: the delta-refinery main checkout has uncommitted edits from 2026-07-14 to
.gitignore,CLAUDE.md,docs/dependencies/claude-agent-sdk-ruby/authority-and-scope.md, andopen-questions.md.worktree finishrefuses to merge while tracked files have changes (exit 6). No branch file overlaps those edits.Branch
ticket-1601is ready: dfc11a9 (the migration) and a52ff41 (the Gemfile now takesos_gitby path to~/dev/cc-os/plugins/os-git, cc-os ADR-0310, instead of the~/.claude/plugins/os-gitlink). The tests for the changed files pass: git_workspace, programmer post, validator pre, and rdx_cache key, 44 runs, 0 failures.Next step: Jared commits or drops the four edits, then
worktree finish ticket-1601runs from~/dev/delta-refinery.