Repository navigation
Description
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
- feat(roadmap): the watch row starts fix-checks Jobs #5027 (fix-checks-job: feat(roadmap): the watch row starts fix-checks Jobs)
- feat(roadmap): a fix-conflict step settles merge conflicts #5019 (fix-conflict: feat(roadmap): a fix-conflict step settles merge conflicts)
- feat(roadmap): label Service Jobs by repository and item #4558 (label Service Jobs by repository and item)
- Part of feat(roadmap): track the Service step jobs #5014 (track the Service step jobs).
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_jobsand 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 --confirmand 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 semaphoreagent
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_jobwith 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
planand 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.
- Chosen: Predicate in
- What name and semaphore does the fix-conflict unit take?: The unit name comes from
<pr>:<base>:<head>and the unit counts against the semaphoreagent. (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 semaphoreagent. ADR 0021 gives the unit name from<pr>:<base>:<head>and counts each fix unit against the model pods (section 5), whose semaphore isagent. - 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.
- Chosen:
- Which code builds the fix-conflict Job manifest?:
build_jobat src/devops_cli/k8s/cluster_job.py:218 with thedevops-cli-runnertemplate (RUNNER_TEMPLATE, cluster_job.py:59), argsroadmap step fix-conflict --pull N, the unit name fromRepoRef.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) androw=FIX_CONFLICTso the component label isroadmap-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_jobwith thedevops-cli-runnertemplate. ADR 0021 section 8 says a fix unit is a Job fromdevops-cli-runnerwith arguments only; the admission policy already importsbuild_jobandRUNNER_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.
- Chosen: Reuse
- 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_stepsreturnscomment_conflictfor a person's pull request and nothing for a bot pull request, and_apply_due_stepswrites the<!-- 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
planruns first and writes the plan to the log and nothing to GitHub; modeoffis the stop switch; modeonruns the work. Each fix-conflict unit is capped at 2,000,000 tokens. The Job passes--confirmonly in modeon. (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
planfirst for each fix row, modeoffas the stop switch, and at most 2,000,000 tokens for eachfix-conflictunit. - Rejected: No token cap. A Job with no cap spends without a limit; ADR 0021 sets the cap of a fix-conflict unit.
- Chosen: Plan mode first, mode off is the kill switch, 2M tokens for each Job. ADR 0021 sets mode
- Which module and line hold the class conflict action that a bot pull request gets today?:
src/devops_cli/roadmap/failure.py:128starts the oneACTION_BY_CLASStable, and line 140 mapsFailureClass.CONFLICTtoFailureAction.REPAIR, not to WAIT; WAIT is the action left after a repair (tests/roadmap/test_roadmap_failure.py:611). The body'sfailure.py:128citation 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
watchsets, 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.
Activity
dan-petty commentedon Nov 12, 2026
Both handle merge conflicts on open pull requests; #4027 detects them, this candidate launches a fix-conflict Job to resolve them.docs(roadmap): start the watch row in mode on (#5060)
devops-cli-service commentedon Nov 15, 2026
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-conflictJob 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:
Tools considered:
Searches run:
Sources:
Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 16, 2026
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.devops-cli-service commentedon Nov 16, 2026
Status set to Ready at 62a806b (see proposed design in issue body).
Moved to new items: #6043.
chore(main): release 0.236.0 (#7602)
devops-cli-service commentedon Nov 28, 2026
Released in v0.236.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.236.0
devops-cli-service commentedon Nov 28, 2026
Live since 2026-11-28 17:56 UTC