Rule on and migrate the cc-plugins git hook and harness scripts #1600
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#1600
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
cc-plugins/progressive-disclosure/hooks/pre-commitandlib/hook_installer.rb(which emits the same bash in two variants) rungit addand always exit 0.cc-plugins/workflow-optimizer/harness/scripts/init-runandcapture-diffrunadd -Ain scratch directories. Open item Q-4 in the checklist asks whether the pre-commit hook should callos-git.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-15. The orchestrator rules Q-4 with
/os-me:predictand records the ruling. Recommended: leave the pre-commit hook as bash (it is a git hook, not a Claude hook, and a Ruby start-up cost adds to every commit), and mark G-075 and G-076 out of scope with that reason; merge the duplicated hook body into one source. The harness scripts run only in scratch directories: mark G-077 and G-078 out of scope with that reason unless a ruling says otherwise.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
- [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
From #1609: cc-plugins client-management/skills/migrate-client/workflows/migrate-project.md (row G-120) is unsafe. The Phase 0 dirty-tree stop is only text. A replay of reset --hard TAG lost the migration commit (reflog only), mid-run tracked edits (no copy), and staged new files; a dirty start lost tracked edits. Handle this rollback in this ticket, or rule it in G-120.
Resolution
Done: Q-4 ruled by prediction, rulings row 77: G-075 to G-078 stay out of scope. HookInstaller::RUNNER_BODY is the one source for the fresh and chain hook bodies; generated hooks are unchanged.
Evidence: cc-plugins 841d224, main 6491d48; before/after diff of both generated variants shows no difference; new test passes.
Follow-ups: dropped: spec/hook_installer_spec.rb has 4 failures and 1 error that predate this change (confirmed on 841d224~1); the plugin is installed nowhere, so they stay unfixed