forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Parent: #158
Objective
Clean our rg tool changes into exactly 2 isolated git commits that can be reliably rebased onto upstream after each sync.
Current State
The rg tool diff is currently contaminated with unrelated upstream changes. It needs to be isolated into:
Commit A: Add rg tool (pure additions — zero conflict risk)
packages/opencode/src/tool/rg.ts— 222 lines NEWpackages/opencode/src/tool/rg.txt— 13 lines NEW
Commit B: Swap grep/glob → rg in registry (8 lines — only conflict point)
packages/opencode/src/tool/registry.ts— 2 import swaps, 2 array entry swaps- Ensure
glob.ts,glob.txt,grep.ts,grep.txtdeletions are handled
Conflict Risk Analysis
registry.ts has ~2.5 commits/month upstream. Most changes are adding new tool imports + entries to the all() array — exactly where our diff touches. Estimated:
- ~70% of upstream changes will auto-merge cleanly
- ~30% will need trivial manual resolution (import block reordering)
Implementation Steps
- Interactive rebase to isolate rg changes from other fork changes
- Verify Commit A applies cleanly on current upstream HEAD
- Verify Commit B applies cleanly (or identify minimal manual fix)
- Document the rebase-onto command for sync automation
- Integrate into WS2's
upstream-sync.ymlworkflow
Sync Command
git rebase --onto upstream/dev <recorded-base-sha> fork/rg-tool
bun run typecheck && bun testAcceptance Criteria
- Exactly 2 commits, cleanly separated
- Commit A has zero overlap with upstream files
- Commit B touches only
registry.tswith minimal diff (~8 lines) - Both commits apply cleanly on current upstream dev HEAD
- Rebase command documented and tested
- Integrated into sync automation (WS2)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels