Skip to content

feat(roadmap): a fix-conflict step settles merge conflicts #5019

Description

@dan-petty

Problem or Motivation

No job fixes a pull request with a merge conflict. In the runner Job, a rebase conflict stops the item with class conflict, and its action is WAIT (src/devops_cli/roadmap/failure.py:128; implement_run.py:795-839). Only a person's implement: retry clears it (stop_clear.py:362; docs/ROADMAP_WORKFLOW.md:196). pr_conflicts only comments (pr_conflicts.py:125-131), and stage aborts (stage.py:2411). In one week there were 130 conflicting base updates, and 75 % came from OpenSpec archive appends.

Proposed Solution & Architectural Design

steps/fix_conflict.py runs one round for each call.

  1. Rebase with the rebase step.
  2. Tier 1, no model. When only archive paths conflict (openspec/specs/, openspec/changes/archive/): drop the archive commit, rebase the rest, and run the finish step again from the change folder. Generated docs: take the side of main and run devops docs generate. uv.lock: take main and run uv lock. A release path (CHANGELOG.md, manifests, version lines) stops the step.
  3. Tier 2, model: one fix step gets only the paths that still conflict, both sides and the plan scope.
  4. Run openspec validate --specs --strict and the scoped checks, then push with the push step, only when merge-tree showed a conflict.

Bounds: bot pull requests only (App head author, claim owner/service, no commit of a person after the last bot push); stop on an owner/* label or on a head that is not the judged head; one model round for each base and head; soft cap 2 rounds for each pull request, one more while the count of conflicted files falls, hard cap 4. Record keys fix_conflict.key (:), .rounds, .files, .result. The runner Job calls the step at a rebase conflict in place of the stop with WAIT.

CLI devops roadmap step fix-conflict --pull N. Change docs/ROADMAP_WORKFLOW.md:196 and :207 in the same pull request. #3969 (plan branches) is its kind=plan case and folds here, with the conflict part of #3577. The source fix of spec conflicts is #4622 (PR #4981, nested capabilities, the cause of 97 of 130 conflicting updates); this step is the fallback.

Rejected: the update-branch API (it refuses a conflict), the git union driver (it can keep two copies of a changed requirement), mergiraf (GPLv3; the owner prefers permissive licenses).

Timeouts: fetch 30 s < rebase 120 s < regenerate 600 s < model request 1200 s < model step 1800 s; checks 1800 s; push 300 s.

Cost: about 2M tokens and 1.5 agent-days to build; at run time at most 2M tokens for each round.

Target Subsystem

Roadmap steps (src/devops_cli/roadmap/steps/), the implement runner Job and docs/ROADMAP_WORKFLOW.md.

Existing Tool Considered

git rebase and git merge-tree --write-tree, openspec validate --strict, devops docs generate and uv lock. Rejected: the update-branch API (it refuses a conflict), the git union driver (it can keep two copies of a changed requirement) and mergiraf (GPLv3; the owner prefers permissive licenses).

Acceptance Criteria

  • Tests in a temporary repository: an archive-only conflict ends with a clean push and 0 model requests; a conflict on a release path stops with class conflict; a person's pull request is refused; the caps hold.
  • The implement conflict test shows one fix round in place of WAIT.
  • A dry-run test sees 0 requests.
  • The strict validation runs before each push.

Dependencies

Source: #5014

Owner decision 2026-11-13

The approved pipeline split (tracker #5482, Phase 3) puts fix-conflict before fix-checks: a head with a conflict goes to fix-conflict first. D9: tier 1 (no model call) goes to mode on at once after the merge. Tier 2 waits for 1 week in mode plan and the O5 caps.

  • Live proof: after the merge and the release, the step runs tier 1 as the App on the open bot PRs with a conflict. A comment gives the result lines and the share of heads that merge cleanly after one run (target 70 % or more).

Activity

  1. added
    source/agent
    on Nov 12, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/high
    effort/high
    on Nov 12, 2026
  3. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    on Nov 12, 2026
  5. dan-petty commented on Nov 16, 2026

    @dan-petty
    OwnerAuthor

    Owner direction 2026-11-16 for every new job that is split out of the plan or implement job: the job uses openrouter/deepseek/deepseek-v4.1-flash-1017 until its roadmap job result grade reaches 80%. Then it gets a trial on local/qwen3.8:27b.

    For this item: give the new step its own model setting ai.tasks.<step> (a new field of AITasksConfig), set to openrouter/deepseek/deepseek-v4.1-flash-1017. Do not read the setting of another job (analysis, triage, implement or stage), so that a model change of one job never moves another job.

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

    @devops-cli-service
    Contributor

    Live since 2026-11-16 06:35 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/highpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions