Skip to content

fix(roadmap): a stop rebases a checkout that a failed program left dirty #4487

Closed

Description

@dan-petty

Problem Description

When an implement run stops after a project program (devops docs generate or devops openspec archive) failed, the checkout holds the files that the program wrote. The stop then pushes the commits that passed. Before the push, _current_tip rebases the checkout onto the default branch with _sync. Git refuses to rebase a checkout with unstaged changes. The job then runs git rebase --abort, but no rebase started, so the abort fails too. The job pushes the head without the rebase, and the log shows a false conflict and a failed abort.

The docstring of _current_tip (src/devops_cli/roadmap/implement/implement_run.py) says: "Between steps and at a stop the checkout is clean". _program breaks that rule when it fails, and no code at the stop makes the checkout clean.

The formatter is not the cause. _format_failure stages the files that ruff format changed, and the group commit holds them: commit 0c2fc9b holds src/devops_cli/roadmap/stage/stage_change.py, the file that the log names as formatted.

Reproduction Steps

  1. Run the implement job on an item whose groups pass.
  2. Make devops openspec archive fail after it applied the archive (for example, openspec validate --all --strict fails).
  3. Read the log of the Job.

Expected vs Actual Behavior

Expected: the stop pushes only commits, from a clean checkout, rebased onto the default branch. A rebase that does not start does not run git rebase --abort, and its failure is not a conflict.

Actual: the rebase refuses the dirty checkout, the abort fails with "no rebase in progress", and the reason says "The rebase onto origin/main stopped", which the failure rules read as a conflict.

Environment Diagnostics

Runner Job devops-cli-runner-20261111-022552-5e9a, item #3462, pull request #4465.

Logs, Traces, or Terminal Output

Formatted: src/devops_cli/roadmap/stage/stage_change.py
The rebase onto origin/main stopped.
`git rebase origin/main` failed: error: cannot rebase: You have unstaged changes. error: Please commit or stash them.
The abort of the rebase failed too.
fatal: no rebase in progress
Failure class test. Action left: repair.

The stop comment on #3462 says "Stopped at archive" with the failed check uv run devops openspec archive 3462-accept-a-test-only-group-that (exit status 1, "The archive is applied").

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 11, 2026
  2. dan-petty commented on Nov 11, 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 bug produces false conflict logs and a failed abort, but commits still push and no data is lost.
    • Value: Medium. Users see misleading conflict reports and failed aborts that hide the real program failure.
    • Effort: Low. The fix is to commit or stash the dirty files before the rebase in the stop path, a small local change.
    • Related: fix(roadmap): rebase the branch before its first push #4380, which asks for a different change. Both deal with the rebase step in the implement run, but #4380 changes when the rebase happens while the candidate cleans the checkout so the rebase can start.
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 11, 2026
  4. removed
    status/in-progress
    owner/agent
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 05:46 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