Repository navigation
Description
Problem
The repository-facing classifier at packages/agents/source/skills/resolve-rebase-conflicts/shared/scripts/classify-conflicts.sh:65 combines operation detection, stage interpretation, attributes, proof results and per-side diffs. Porting the pure helper alone would still leave workflow decisions in shell.
Acceptance criteria
- AC1: Given a stopped merge-backend rebase, apply-backend rebase or cherry-pick, when classification runs, then it accepts the same operation contexts as the frozen classifier.
- AC2: Given no supported active operation, or an effective selection (the explicit path arguments if any, otherwise the discovered unmerged set) that is empty, when classification runs, then it returns the frozen refusal; an explicitly named resolved path is not refused and is reported per AC4.
- AC3: Given selected paths or the default unmerged set, when classification runs, then it reports paths in the frozen order.
- AC4: Given add/add, delete/modify, content or already-resolved paths, when classification runs, then the stage-kind report matches the frozen classifier.
- AC5: Given a regeneration declaration, when classification runs, then it recommends taking a complete side and regenerating after replay.
- AC6: Given union or manual declarations, when classification runs, then the resulting class and declaration explanation match the frozen classifier.
- AC7: Given safe unions, token extensions or ordinary content conflicts, when classification runs, then it prints the corresponding evidence or proposal.
- AC8: Given side changes above or below the configured display cap, when classification runs, then it prints the frozen diff body or expansion advice.
- AC9: Given a proof-engine failure, when classification runs, then it reports a tool failure rather than a content verdict.
- AC10: Given the Go implementation and Git are available, when classification runs without Python or uv, then the native classification succeeds for valid input.
- AC11: Non-functional: classification leaves repository contents and the index unchanged.
- AC12: Non-functional: native classification cases execute without skips on macOS, Linux and Windows.
Scope and non-goals
Scope: the classification command under agentrepo rebase, including the evidence formerly printed by the helper.
Non-goal: writing resolutions, taking sides, continuing Git or porting guards. Removal of Python/uv as Go runtime prerequisites is an explicit migration change; their frozen fallback still needs them. 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
Compose children 05 and 06. Preserve attribute precedence at packages/agents/source/skills/resolve-rebase-conflicts/shared/scripts/classify-conflicts.sh:124 and side-diff limits at packages/agents/source/skills/resolve-rebase-conflicts/shared/scripts/classify-conflicts.sh:166. Keep stage 2 as base-side and stage 3 as replayed-side. Normalize fixture scratch paths only when comparing reports. Preserve the relative-entry behavior at tests/skills/resolve-rebase-conflicts/scripts/resolve-workflow.bats:98 during later activation.
Dependencies
Prerequisite: #321's repository-context deliverable.
Size
M. Forecast 640 code lines: 270 implementation, 320 tests and fixtures, 50 integration. Measured shell baseline: 129 code lines, plus report portions of the 212-code-line helper. Prose allowance: 220 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, AC4: scratch repositories cover both rebase backends, cherry-pick, no operation, an empty effective selection, an active operation with no unmerged paths run both without arguments (refusal) and with an explicitly named resolved path (reported, not refused), and each stage combination.
- AC5, AC6, AC7: compare class, evidence, declarations and side labels against frozen reports; include false union declarations and manual paths.
- AC8: compare exact diff-body and expansion output at display-cap boundaries.
- AC9: inject a proof failure and assert it cannot become a content classification.
- AC10: execute the Go cases in an isolated PATH without Python or uv.
- AC11: snapshot content/index around all classification cases.
- AC12: inspect executing native cases on all three CI platforms.
- 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
Wrong side names or declaration precedence can turn a content conflict into an unsafe mechanical choice. Undo: revert the Go command before activation; the frozen classifier remains available.
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 — Classify stopped conflicts and print their evidence in Go
Model: gpt-6-astra
Child 07 Classify stopped conflicts and print their evidence in Go
Verdict: READY
Checked: AC2 now defines effective selection as explicit arguments when supplied, otherwise discovered unmerged paths. This matches
packages/agents/source/skills/resolve-rebase-conflicts/shared/scripts/classify-conflicts.sh:71. The resolved-path report remains consistent withpackages/agents/source/skills/resolve-rebase-conflicts/shared/scripts/classify-conflicts.sh:100.The verification plan explicitly covers an active operation with no unmerged paths both without arguments, producing refusal, and with an explicitly named resolved path, producing its report. AC1 retains the supported-operation prerequisite. Child 05’s corrected output boundary does not change classification semantics. Forecast remains 640 code lines.
Gaps: None. The round 1 gap is closed.
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