Repository navigation
Description
Problem
The commands at packages/agents/source/skills/rebase/shared/scripts/start-rebase.sh:56 and packages/agents/source/skills/rebase/shared/scripts/continue-rebase.sh:48 pin Git settings, reject staged markers and prove empty skips. Git itself accepts a resolved path that still contains markers, so these checks must accompany the port.
Acceptance criteria
- AC1: Given an invalid base, detached HEAD or an active operation, when a new replay is requested, then it refuses with the frozen status and diagnostic.
- AC2: Given an accepted start, when Git runs, then it receives the frozen update-refs, autosquash, editor and autostash settings.
- AC3: Given a no-op start, when the current tip equals the selected base, then evidence from a previous replay is discarded.
- AC4: Given a replay finishes, stops or fails without an active replay, when start or continue returns, then its status and report match the frozen outcome.
- AC5: Given rerere reuse or an autostash conflict, when the corresponding command reports, then the frozen warning is present.
- AC6: Given no merge-backend rebase or unresolved paths, when continuation is requested, then it refuses before advancing Git.
- AC7: Given staged markers or scanner failure, when ordinary continuation is requested, then it refuses before advancing Git.
- AC8: Given staged-path listing emits partial output then fails, when continuation is requested, then that failure propagates without advancing Git.
- AC9: Given a skip request without proof that the index equals HEAD and no paths remain unmerged, then the commit is not skipped.
- AC10: Given each replay outcome, when recovery evidence is inspected, then it matches the frozen state transition.
- AC11: Non-functional: a failed or uncertain Git write is never retried automatically.
- AC12: Non-functional: native replay and refusal cases execute without skips on macOS, Linux and Windows.
Scope and non-goals
Scope: start, continue and empty skip under agentrepo rebase.
Non-goal: new marker recognition, apply-backend continuation, changing Git's empty-commit policy, pushing, or hook enforcement. 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
Reuse child 01's evidence and internal/agentrepo/markers.go:24. Preserve argument and status ordering at packages/agents/source/skills/rebase/shared/scripts/start-rebase.sh:106 and packages/agents/source/skills/rebase/shared/scripts/continue-rebase.sh:127. Start does not explicitly select a backend today; preserve that fact and continuation's merge-backend restriction. Cover partial listing failure at tests/skills/rebase/scripts/rebase-workflow.bats:115. Persist evidence before Git; do not infer completion from output alone.
Dependencies
Uses the marker scanner on main. #322 owns the commit skill's post-commit workflow.
Size
M. Forecast 750 code lines: 300 implementation, 390 tests and fixtures, 60 integration. Measured source baseline: 208 code lines across start and continue. 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: scratch-repository refusal/no-op cases and recorded invocations compare settings and evidence.
- AC4, AC5, AC10: compare transcripts, statuses and evidence for real isolated replay cases and injected Git outcomes.
- AC6, AC7, AC8, AC9: cover unmerged paths, staged-only and unstaged-only markers, scanner failures, partial listings and empty/nonempty indexes; inspect Git write-call counts.
- AC11: inject failure after write output and assert exactly one attempt.
- AC12: inspect native three-platform CI results; shell-parity cases supplement native coverage.
- 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
A mistaken skip loses a commit; scanning the worktree instead of the index can commit markers. Undo: revert before activation and retain evidence for recovery.
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 — Start and continue a rebase with the existing safeguards in Go
Model: gpt-6-astra
Child 02 Start and continue a rebase with the existing safeguards in Go
Verdict: READY
Checked: Prior safeguards, evidence transitions and 750-line forecast remain consistent; unaffected by the corrections.
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