Skip to content

feat(roadmap): the watch row starts fix-conflict Jobs #5028

Done

Description

@dan-petty

Problem or Motivation

After fix-conflict, a finished bot pull request that gets a conflict from a later main still waits for a person's implement: retry (docs/ROADMAP_WORKFLOW.md:196).

Proposed Solution & Architectural Design

Use the JobLauncher of fix-checks-job. The watch row turns the due mark fix-conflict: into one Job devops roadmap step fix-conflict --pull N at 1 CPU/2Gi. The unit name comes from ::. For a bot pull request, class conflict gets the fix-conflict Job in place of WAIT (failure.py:128). Change docs/ROADMAP_WORKFLOW.md:196 in the same pull request.

Plan mode first; mode off is the kill switch; at most 2M tokens for each Job (owner decision O5).

Cost: about 0.8M tokens and 1 agent-day.

Target Subsystem

Roadmap Service Job launcher and docs/ROADMAP_WORKFLOW.md.

Existing Tool Considered

The same Kubernetes Job launcher as the fix-checks Job item.

Acceptance Criteria

  • Tests: a CONFLICT verdict on a bot pull request gives one Job manifest that tests/gate/k8s_checks/job_admission_policy.py admits; a person's pull request gets one comment and no Job; a second create gets 409; plan mode sends 0 GitHub writes.

Dependencies

Source: #5014

Owner decision 2026-11-13

No due mark: the fix-conflict Job is due by its predicate in due_jobs (a CONFLICT verdict and no claim). The unit name comes from <pr>:<base>:<head>, with the semaphore agent. Source: tracker #5482, Phase 3.

  • Live proof: after the merge and the release, a bot PR with a conflict gets one fix-conflict Job as the App. A comment gives the result line.

Alternatives check of 2026-11-27: none.
Tool: none found.
Reason: Searches found only generic primitives: the kubernetes Python client creates Jobs from a manifest and Argo Workflows runs container steps, but neither holds the roadmap due predicate, the <pr>:<base>:<head> unit, plan mode, the token cap or the claim-record 409.

Covers:

  • Creates Kubernetes Jobs from a Python-built manifest
  • Runs one container step per workflow pod
  • Provides the API transport the launcher already uses

Lacks:

  • No due predicate for a CONFLICT verdict with no claim
  • No <pr>:<base>:<head> unit name or agent semaphore
  • No plan mode with zero GitHub writes or 2M-token cap
  • No 409 on a second create of the same unit

Proposed design

Problem statement

After fix-conflict, a finished bot pull request that gets a conflict from a later main still waits for a person's implement: retry (docs/ROADMAP_WORKFLOW.md:197). The Service must start one fix-conflict step Job when the due_jobs predicate holds for a bot pull request: a CONFLICT verdict and no claim, with no due mark (owner decision 2026-11-13, tracker #5482 Phase 3). A pull request that a person wrote keeps the one-comment path with no Job. The change reuses the JobLauncher of the fix-checks item, the build_job helper and the devops-cli-runner Job template, and it updates docs/ROADMAP_WORKFLOW.md and CONTEXT.md.

Acceptance criteria

Requirement: The due predicate starts one fix-conflict Job

The Service SHALL start exactly one fix-conflict step Job when the due_jobs predicate holds for a bot pull request with a CONFLICT verdict and no claim.

Scenario: A bot pull request with a conflict is due

  • WHEN the round evaluates due_jobs and the fix-conflict predicate holds for a bot pull request with no claim
  • THEN the launcher receives exactly one Job manifest for the unit of that pull request and the row writes no due mark

Requirement: The Job command and its size

The fix-conflict Job MUST run devops roadmap step fix-conflict --pull N --confirm in mode on at 1 CPU and 2Gi.

Scenario: The fix-conflict Job manifest

  • WHEN the launcher builds the manifest for pull request N while the fix-conflict row mode is on
  • THEN the container args hold roadmap step fix-conflict --pull N --confirm and the resources request 1 CPU and 2Gi

Requirement: The unit name and semaphore

The fix-conflict unit MUST take its name from <pr>:<base>:<head> and the semaphore agent.

Scenario: Unit identity

  • WHEN the launcher creates the fix-conflict unit for a bot pull request
  • THEN the Job name comes from unit_name(FIX_CONFLICT, "<pr>:<base>:<head>") and the unit takes the semaphore agent

Requirement: The Job manifest passes the admission policy

The fix-conflict Job manifest MUST pass the admission policy in tests/gate/k8s_checks/job_admission_policy.py.

Scenario: Admission of the fix-conflict Job

  • WHEN the test builds the fix-conflict Job manifest from build_job with the runner template at 1 CPU and 2Gi
  • THEN the policy returns no refusal for the manifest

Requirement: A second create returns 409

The launcher MUST answer 409 when the fix-conflict Job of the same unit name already exists.

Scenario: Second create of the same unit

  • WHEN the launcher creates the fix-conflict Job for one unit a second time
  • THEN the launcher returns 409 and the cluster holds one Job

Requirement: A person's pull request gets one comment and no Job

The watch row SHALL write one comment and MUST create no Job for a pull request that a person wrote.

Scenario: A person's pull request with a conflict

  • WHEN the round finds a CONFLICT verdict on a pull request that a person wrote
  • THEN the row writes one comment and creates no Job

Requirement: Plan mode sends no GitHub write

The fix-conflict path MUST send zero GitHub writes in plan mode.

Scenario: Plan mode

  • WHEN the round runs with the fix-conflict row mode plan and a due fix-conflict unit
  • THEN the run records zero GitHub write requests and the Job args omit --confirm

Requirement: The workflow document states the new path

docs/ROADMAP_WORKFLOW.md MUST state that the Service starts the fix-conflict Job for a bot pull request with a conflict.

Scenario: The retry statement

  • WHEN the pull request changes the statement at docs/ROADMAP_WORKFLOW.md:197
  • THEN the document names the fix-conflict step Job for a bot pull request

Requirement: The glossary states the due predicate

CONTEXT.md MUST state that the fix-conflict unit is due by its predicate in due_jobs and not by a due mark.

Scenario: The Step job entry

  • WHEN the change updates the Step job entry of CONTEXT.md
  • THEN the entry names the due predicate of the fix-conflict unit

Existing Tool Considered

No alternatives check found a tool that covers the need. The check of 2026-11-15 gave the verdict none. It considered the kubernetes Python client (Apache-2.0, https://pypi.org/project/kubernetes), which creates a Job from a manifest and is already the transport of the launcher (CustomObjectsApi), but it lacks the due predicate, the <pr>:<base>:<head> unit name, plan mode with zero GitHub writes, the 2M-token cap and the claim-record 409. Argo Workflows (https://github.com/argoproj/argo-workflows) can run container steps, but it is the engine the project adopts only after the engine step (docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:195) and it holds no roadmap watch-row due predicate either. The change therefore reuses the project's own build_job helper and the devops-cli-runner Job template in src/devops_cli/k8s/cluster_job.py from #5027, and builds no second launcher. The written cost of the code that the project builds and keeps is about 0.8M tokens and 1 agent-day.

Key questions

  • How does the Service find a due fix-conflict unit?: No due mark. The fix-conflict Job is due by its predicate in due_jobs: a CONFLICT verdict and no claim. The owner decision of 2026-11-13 (tracker feat(roadmap): track the roadmap pipeline split into jobs #5482, Phase 3) removes the fix due marks, and the watch-row change records that fix jobs run via their predicates. (best practice) [sources: openspec/changes/archive/2026-11-16-5024-watch-row/design.md:16, openspec/changes/archive/2026-11-16-5024-watch-row/design.md:27, openspec/specs/roadmap-watch-row/spec.md:33, CONTEXT.md:170]
    • Chosen: Predicate in due_jobs (a CONFLICT verdict and no claim). The owner decision of 2026-11-13 names this predicate as the due test of the unit, and the watch-row change records that the fix due marks are removed.
    • Rejected: Due mark fix-conflict:<pr> set by the watch row. The owner decision of 2026-11-13 removes the fix due mark; the watch-row change rejects it as superseded.
  • What name and semaphore does the fix-conflict unit take?: The unit name comes from <pr>:<base>:<head> and the unit counts against the semaphore agent. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:211, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:97, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:197, src/devops_cli/github/repo_ref.py:72, src/devops_cli/github/repo_ref.py:178]
    • Chosen: <pr>:<base>:<head> with the semaphore agent. ADR 0021 gives the unit name from <pr>:<base>:<head> and counts each fix unit against the model pods (section 5), whose semaphore is agent.
    • Rejected: <pr> alone. Two bases or two heads of one pull request would collide on one name, and a second create could not get 409 for a new input.
  • Which code builds the fix-conflict Job manifest?: build_job at src/devops_cli/k8s/cluster_job.py:218 with the devops-cli-runner template (RUNNER_TEMPLATE, cluster_job.py:59), args roadmap step fix-conflict --pull N, the unit name from RepoRef.unit_name(ServiceRow.FIX_CONFLICT, "<pr>:<base>:<head>", item) (repo_ref.py:178), the small runner size 1 CPU/2Gi (implement_size.py:64-70) and row=FIX_CONFLICT so the component label is roadmap-fix-conflict. (best practice) [sources: src/devops_cli/k8s/cluster_job.py:59, src/devops_cli/k8s/cluster_job.py:218, src/devops_cli/github/repo_ref.py:178, src/devops_cli/roadmap/implement/implement_size.py:64, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:195, k8s/devops/roadmap-service/admissionpolicy.yaml:51, tests/gate/k8s_checks/job_admission_policy.py:21]
    • Chosen: Reuse build_job with the devops-cli-runner template. ADR 0021 section 8 says a fix unit is a Job from devops-cli-runner with arguments only; the admission policy already imports build_job and RUNNER_TEMPLATE, so one policy covers each Job the Service makes.
    • Rejected: Add a fix-conflict CronJob template beside the runner and stage templates. It adds a CronJob and a template that the admission policy and the fix-unit rule do not need; the runner template already carries the runner image, the ServiceAccount and the pod label that the policy requires.
    • Rejected: Write a second launcher for fix-conflict. A second launcher repeats the manifest and escapes the admission policy of the Service.
  • What does the watch row do for a pull request that a person wrote?: It writes one comment for each head and creates no Job. due_steps returns comment_conflict for a person's pull request and nothing for a bot pull request, and _apply_due_steps writes the &lt;!-- devops roadmap watch --> comment once for each head. (best practice) [sources: src/devops_cli/roadmap/steps/watch.py:264, src/devops_cli/roadmap/watch_row.py:390, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:186, CONTEXT.md:170]
    • Chosen: Comment only, no Job. ADR 0021 gives a person's pull request one comment for each head, and the Service takes no item that a person holds.
    • Rejected: Start the Job for every pull request. It would take work from a person's claim and spend tokens on a pull request that a person owns.
  • How do plan mode and the token cap apply to the fix-conflict Job?: Mode plan runs first and writes the plan to the log and nothing to GitHub; mode off is the stop switch; mode on runs the work. Each fix-conflict unit is capped at 2,000,000 tokens. The Job passes --confirm only in mode on. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:128, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:197, src/devops_cli/commands/roadmap_step_fix_conflict.py:35, src/devops_cli/roadmap/steps/fix_conflict.py:734]
    • Chosen: Plan mode first, mode off is the kill switch, 2M tokens for each Job. ADR 0021 sets mode plan first for each fix row, mode off as the stop switch, and at most 2,000,000 tokens for each fix-conflict unit.
    • Rejected: No token cap. A Job with no cap spends without a limit; ADR 0021 sets the cap of a fix-conflict unit.
  • Which module and line hold the class conflict action that a bot pull request gets today?: src/devops_cli/roadmap/failure.py:128 starts the one ACTION_BY_CLASS table, and line 140 maps FailureClass.CONFLICT to FailureAction.REPAIR, not to WAIT; WAIT is the action left after a repair (tests/roadmap/test_roadmap_failure.py:611). The body's failure.py:128 citation points at the table, not at the conflict row. The retry statement that the change updates is docs/ROADMAP_WORKFLOW.md:197 (the body cites :196, which holds the branch text of the new Job). [sources: src/devops_cli/roadmap/failure.py:128, src/devops_cli/roadmap/failure.py:140, docs/ROADMAP_WORKFLOW.md:197, tests/roadmap/test_roadmap_failure.py:611]
  • Does the change also update the glossary entry for the Step job?: Yes. The Step job entry of CONTEXT.md:170 says the sweep creates the unit from the due mark that watch sets, and the owner decision of 2026-11-13 removes the due mark for fix-conflict, so the entry must state the due predicate. (best practice) [sources: CONTEXT.md:170, openspec/changes/archive/2026-11-16-5024-watch-row/design.md:16]
    • Chosen: Update the Step job entry of CONTEXT.md in the same pull request. The entry names the due mark for fix-conflict, which the owner decision of 2026-11-13 removes, so the glossary would contradict the recorded decision.
    • Rejected: Leave CONTEXT.md unchanged. The glossary would keep a statement that the owner decision contradicts.
  • Which listed dependencies are already done?: feat(roadmap): a fix-conflict step settles merge conflicts #5019 (the fix-conflict step) and feat(roadmap): label Service Jobs by repository and item #4558 (label Service Jobs by repository and item) are merged: their change folders are archived and CHANGELOG.md:76 records that feat(roadmap): a fix-conflict step settles merge conflicts #5930 closes feat(roadmap): a fix-conflict step settles merge conflicts #5019. Only feat(roadmap): the watch row starts fix-checks Jobs #5027 (the fix-checks Job launcher and its due predicate) is still open, so it stays the one dependency. [sources: CHANGELOG.md:76, openspec/changes/archive/2026-11-16-5019-fix-conflict-step/proposal.md:7, openspec/changes/archive/2026-11-14-4558-label-service-jobs-by-repository-and-item/proposal.md:1]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#5027

Activity

  1. added
    source/agent
    on Nov 12, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/low
    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. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Alternatives check: none

    Reason: The searches surfaced only generic Kubernetes workflow/job engines (Argo Workflows, Hera, Couler) and the Kubernetes client; none turns a roadmap watch-row due mark for a bot PR conflict into one devops roadmap step fix-conflict Job with the project's unit name, plan mode, token cap and claim-record 409. The issue asks to reuse the project's own JobLauncher from the fix-checks item, and no external tool implements that watch-row, due-predicate and admission-policy wiring; Argo WorkflowTemplates are only the later stage of the parent tracker.

    Tool: none found

    Lacks:

    • No tool implements the roadmap watch row's due predicate (CONFLICT verdict on a bot pull request and no claim) that starts the fix-conflict unit.
    • No tool derives the unit name from <pr>:<base>:<head> or returns 409 when the Job is created a second time.
    • No tool provides plan mode with zero GitHub writes, the 2M-token cap for each Job, or the comment-only path for a person's pull request.
    • Argo Workflows, Hera and Couler can run container steps in Kubernetes, but the trigger, claim record, unit naming and admission-policy integration would still have to be built by the project.

    Tools considered:

    Searches run:

    • Kubernetes Job launcher library python create job from manifest, results: 5
    • open source bot that resolves merge conflicts on pull requests automatically, results: 5
    • "merge conflict" resolver GitHub Action open source, results: 5
    • Qodo Merge resolve merge conflicts pull request command, results: 5
    • kubernetes-sigs jobset job launcher operator, results: 5
    • argoproj argo-workflows kubernetes native workflow engine, results: 5
    • argo-workflows, results: 5
    • fix merge conflict pull request bot, results: 5
    • argoproj-labs hera python argo workflows, results: 5
    • mergify merge queue conflict resolution bot, results: 5

    Sources:

    Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.

  6. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 7e1f8a8 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

    The next refine round also looks at the item again when a commit on the default branch changes one of these files: src/devops_cli/k8s/cluster_job.py.

  7. added
    status/ready
    and removed
    status/new
    on Nov 16, 2026
  8. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 62a806b (see proposed design in issue body).

    Moved to new items: #6043.

  9. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 28, 2026
  10. removed
    status/in-review
    owner/agent
    on Nov 28, 2026
  11. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-28 17:56 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/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions