Repository navigation
Description
Problem
The side picker at packages/agents/source/skills/resolve-rebase-conflicts/shared/scripts/take-side.sh:51 uses base-side and replayed-side because Git's ours/theirs wording is reversed during replay. An absent chosen stage means deletion, not an empty file. Generated-file advice also has to survive the port.
Acceptance criteria
- AC1: Given missing or invalid arguments, when a side is requested, then the frozen refusal is returned.
- AC2: Given ours or theirs as the side name, when resolution is requested, then it refuses the ambiguous name.
- AC3: Given no supported active operation or a path that is not unmerged, when resolution is requested, then it refuses before changing the path.
- AC4: Given a present selected stage, when base-side or replayed-side is chosen, then the path receives exactly the selected stage's bytes.
- AC5: Given an absent selected stage, when that side is chosen, then the path is deleted and the deletion is staged.
- AC6: Given a present selected stage, when resolution succeeds, then only the named path is staged.
- AC7: Given a side choice, when resolution starts, then the frozen commit and stage explanation is printed before changing the path.
- AC8: Given a regeneration declaration on a retained path, when resolution succeeds, then the frozen placeholder warning is printed.
- AC9: Non-functional: choosing a side never continues the replay or runs a generator.
- AC10: Non-functional: native side-choice cases execute without skips on macOS, Linux and Windows.
Scope and non-goals
Scope: explicit side choice and named staging under agentrepo rebase.
Non-goal: deciding which intent wins, automatic token application, generating files or changing PreToolUse policy. Keep shell and coupled Python frozen through N-2, with no new shell logic. Do not switch callers or retire tests in this child.
Approach
Preserve argument mapping at packages/agents/source/skills/resolve-rebase-conflicts/shared/scripts/take-side.sh:56 and deletion handling at packages/agents/source/skills/resolve-rebase-conflicts/shared/scripts/take-side.sh:90. Exercise merge/apply rebases and cherry-picks. Test binary stage bytes as well as ordinary text. Use the existing operation context and direct Git stage reads; no marker parsing is needed.
Dependencies
Blocked by: #753.
Prerequisite: #321's repository-context deliverable.
Size
S. Forecast 430 code lines: 160 implementation, 230 tests and fixtures, 40 integration. Measured source baseline: 67 code lines. Prose allowance: 160 lines.
scc could not run in the isolated checkout. Measured baselines count non-blank lines other than full-line # comments, including Python docstrings and embedded code conservatively. Forecasts include implementation, tests, fixtures and registration; they are estimates, not measured future Go. Generated output is excluded only under packages/agents/claude/.apm/skills/, packages/agents/codex/.apm/skills/, .claude/skills/, .agents/skills/ and tokens.json. The source under packages/agents/source/ and copies anywhere else count. The final diff must be at most 800 code lines and 2,000 prose lines, with no exception; split before implementation if either forecast grows beyond its limit.
Verify plan
- AC1, AC2, AC3: compare invalid arguments, inverted words, unsupported operations and resolved-path refusals with the frozen script.
- AC4, AC5, AC6: inspect worktree bytes and index for both stages, binary input and both delete/modify directions; unrelated paths remain unchanged.
- AC7, AC8: compare ordering and content of explanation and regeneration warnings.
- AC9: inspect the command trace for absence of continuation and generator calls.
- AC10: inspect executing native cases on macOS, Linux and Windows.
- Definition of done: D1 each AC is verified at the merged head, with the commands and results cited in the pull request's Verification. D2 an independent review approves the exact merged head, and every finding has a recorded disposition. D3 required checks pass with no gate loosened. D4 the leak scans the repository specifies are clean, and every post made for this work passes the per-post leak review before it is posted. D5 every commit is signed. D6 the documentation matches the change or the Verification says why there is no impact. D7 every commit has an
Assisted-bytrailer and the pull request has theprovenance:agent-assistedlabel. D8 the pull request stays within the size limits. D9 follow-ups are filed as issues and listed under Related. D10 the merge closes the issue through a closing reference, the board shows Done, and the finalStatus:comment names the merge commit.
Risks
An inverted mapping can silently discard the intended side. Treating a missing stage as empty would erase deletion intent. Undo: revert the port; preserve conflict-stage evidence rather than attempting an automatic opposite-side rewrite.
Operator authority
None.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Work type
Projects
- StatusShow more project fieldsBacklog
Activity
tbhb-agent commentedon Oct 27, 2026
Refinement: READY — Resolve one path by an explicit side in Go
Model: gpt-6-astra
Child 09 Resolve one path by an explicit side in Go
Verdict: READY
Checked: Prior explicit-side, deletion and exact-byte contracts remain consistent; unaffected by the corrections. Forecast remains 430 lines.
Gaps: None.
Split: None required.
Definition of done
The definition of done for this issue (Feature). Tick each item and give its evidence.
check-leaks.shwith the repository's private-strings list, and the leak review of each post.docs/, CHANGELOG or help text), or the Verification section says "No doc impact" and why.provenance:agent-assistedlabel.Status:comment names the merge commit.mise run checkis green, and so are the coverage floorsmise run cover-go-checkandmise run cover-py-check, whichcheckdoesn't run.packages/agents/source/commits whatmise run generate-skills, thenmise run skill-tokens, thenapm installrewrite, in that order, andcheck-generated-skills(part oflint) passes.docs/agent-skills-migration.mdor the adoption docs, or the PR's Verification says "No consumer impact" and why.Round: 2 of 3