Skip to content

fix(roadmap): a rebase stop names the conflicted files #3646

Closed

Description

@dan-petty

Problem

A stop on a rebase conflict does not name the conflicted files. The class conflict is correct, but a person or a repair step must find the files again.

Evidence on origin/main at cfcbd3d:

  • _sync in src/devops_cli/roadmap/implement_run.py builds the reason from str(exc), then aborts the rebase. After the abort, git has no record of the conflict.
  • git in src/devops_cli/roadmap/clone_git.py builds the exception text with git_message. git_message in src/devops_cli/git/worktree_inventory.py reads only proc.stderr.
  • Git writes CONFLICT (content): Merge conflict in <file> to stdout. A rebase with a real conflict, through the same git function, gave this text with no file name:
`git rebase main` failed: Rebasing (1/1) error: could not apply ef0408d... topic hint: Resolve all conflicts manually, mark them as resolved with hint: "git add/rm <conflicted_files>", then run "git rebase --continue". hint: You can instead skip this commit: run "git rebase --skip"
  • test_a_conflict_on_the_rebase_stops_the_item_before_any_step asserts only that the comment holds the word conflict.

Expected

Before the abort, the job reads the conflicted files with git diff --name-only --diff-filter=U. The stop comment and the job record hold them. The list of files is masked and has a limit.

Acceptance criteria

  • A test with a real git repository: a rebase conflict at the start of a run stops the item with class conflict, and the comment names each conflicted file.
  • A test: the same for the rebase before the push.
  • A test: the job record holds the files, and a retry removes them with the stop.
  • A test: a list of files above the limit is cut, and the comment says so.

Existing tool considered

git diff --name-only --diff-filter=U gives the list. The change adds no tool.

Related

Moved from #3098, acceptance criterion 4. A repair step that resolves the conflict is a separate step, and #3053 holds it as an input in its comment of 2026-11-01. Related: #3053, #3065, #3476.

Proposed design

Problem statement

A rebase conflict stops an item with class conflict, but the stop names no conflicted file. _sync aborts the rebase first, and git keeps no record of the conflict after the abort. A person or a repair step must find the files again. The job now reads the files before the abort, and the comment and the job record hold them.

Acceptance criteria

Requirement: Conflict files at the start of a run

The stop of a rebase conflict at the start of a run SHALL name each conflicted file in its comment.

Scenario: Start rebase conflicts

  • WHEN A real git repository has a conflict when the job rebases onto the default branch at the start of the run.
  • THEN The item stops with class conflict, and the comment names each file that git diff --name-only --diff-filter=U lists.

Requirement: Conflict files before the push

The stop of a rebase conflict before the push SHALL name each conflicted file in its comment.

Scenario: Push rebase conflicts

  • WHEN A real git repository has a conflict when the job rebases onto the default branch before the push.
  • THEN The item stops with class conflict, and the comment names each conflicted file.

Requirement: Record of the conflicted files

The job record SHALL hold the conflicted files of a conflict stop, and a retry SHALL clear them.

Scenario: A retry clears the files

  • WHEN The item stops on a conflict, and a person then comments implement: retry.
  • THEN The record holds each file after the stop, and holds none after the retry starts the item.

Requirement: Cut list of conflicted files

A list of conflicted files above the limit SHALL be cut, and the comment SHALL state the number of files that the cut left out.

Scenario: List above the limit

  • WHEN A conflict stops the item, and the list holds more files than CONST_ROADMAP_IMPLEMENT_CONFLICT_FILES_MAX.
  • THEN The comment names the files up to the limit and states the number left out.

Requirement: Masked file paths

Each conflicted file path SHALL be masked before the job writes it to the comment or the record.

Scenario: A secret in a path

  • WHEN A conflicted file path holds a token that mask_secrets knows.
  • THEN The comment and the record hold the masked path and not the token.

Existing Tool Considered

No alternatives check has run. Git itself covers the need: git diff --name-only --diff-filter=U lists the unmerged files, and it lacks nothing for this change. The change adds no tool and no build cost. The work is one read before the abort, one message template, one record key and the tests.

Key questions

  • How does the job get the list of conflicted files?: _sync reads the list before git rebase --abort, with git diff --name-only --diff-filter=U in the worktree, through run_subprocess with check=False. Both call sites get it: _start with push_on_conflict=False, and _push. (best practice) [sources: src/devops_cli/roadmap/implement_run.py:649, src/devops_cli/git/worktree_inventory.py:458]
    • Chosen: Read before the abort in _sync. Git holds the unmerged paths only until the abort. The read is local and adds no tool.
    • Rejected: Read after the abort. The abort clears the conflict, so the command returns no file.
    • Rejected: Make git_message read stdout. The text of git is unparsed and differs by version. Other callers expect the error text.
  • Where does the job record hold the conflicted files?: A new ImplementRecordKey member holds the masked files as JSON. _start clears it when self.target.retry is true, with the other stop marks. (best practice) [sources: src/devops_cli/roadmap/implement_run.py:615, src/devops_cli/roadmap/store.py]
    • Chosen: New record key, cleared on retry. The criterion asks the record to hold the files and a retry to remove them. The other stop marks already clear there.
    • Rejected: Only in the stop comment. The comment is text of GitHub. The job cannot read it back as a record.
  • What limit applies to the list of files?: A new constant CONST_ROADMAP_IMPLEMENT_CONFLICT_FILES_MAX sets the limit at 20 files. A message states the count of files that the cut left out. (best practice) [sources: src/devops_cli/config/constants.py, src/devops_cli/lang/en/messages.py]
    • Chosen: A file count with a stated remainder. A path stays whole, and the reader learns that more files exist.
    • Rejected: The existing character cut of the reason. It cuts a path in the middle and says nothing about the files that it drops.
  • Is each conflicted file masked before it leaves the job?: Yes. _sync masks each path with mask_secrets, and the stop caps the reason at CONST_ROADMAP_IMPLEMENT_REASON_CHARS. [sources: src/devops_cli/roadmap/implement_run.py:649, src/devops_cli/security/sanitizer.py]
  • Which test covers the conflict stop?: tests/roadmap/test_roadmap_implement_job.py holds test_a_conflict_on_the_rebase_stops_the_item_before_any_step. It builds a real repository through tests/support/roadmap_implement.py and asserts only the word conflict today. [sources: tests/roadmap/test_roadmap_implement_job.py, tests/support/roadmap_implement.py]
  • Does the failure class stay conflict when the reason holds file paths?: Yes. The reason keeps the git text that names the conflict, and the file list follows it. classify_failure still sees the word that gives the class. [sources: src/devops_cli/roadmap/implement_run.py:649, src/devops_cli/roadmap/failure.py]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 5, 2026
  2. dan-petty commented on Nov 5, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. The stop still works but omits the file names a person or repair step needs, adding friction without breaking the run.
    • Value: Medium. Operators and repair steps save time by reading the file list directly from the stop comment instead of re-running git commands.
    • Effort: Low. The fix reads one existing git command before the abort and writes the list into the comment and job record; the scope is small and localized.
    • Related: feat(roadmap): the implement job keeps, classifies and continues a partial implementation #3098, which asks for a different change. Both handle rebase conflict stops in the implement job, but the candidate adds file names to the stop comment while #3098 is the umbrella for keeping, classifying, and continuing partial work.
  3. added
    priority/p2-medium
    on Nov 5, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 6, 2026
  5. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 6d12548 (see proposed design in issue body).

  6. added
    owner/agent
    status/in-progress
    and removed
    status/ready
    on Nov 7, 2026
  7. removed
    status/in-progress
    owner/agent
    on Nov 7, 2026
  8. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-07 05:06 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions