Repository navigation
Description
Problem or Motivation
The alternatives check runs in the roadmap Service pod, and a rollout kills a check in progress. Alternatives writes its record before its comment, so a kill loses a comment and does not double it (src/devops_cli/roadmap/alternatives.py:1214-1227), but the work runs again.
Proposed Solution & Architectural Design
- WorkflowTemplate
roadmap-alternativesruns the alternatives selection narrowed to one item. Semaphoreagent. Deadline 3,600 s on the template. No clone. - The pod reaches SearXNG in
devops; check its policy ink8s/devops/searxng/. - The row becomes a submit.
Removes: the in-pod body of _run_alternatives_adapter (src/devops_cli/roadmap/run.py:704-719).
Target Subsystem
SDLC, Git & PR Governance (roadmap alternatives).
Existing Tool Considered
Argo Workflows semaphore and templates. Cost: about 60,000 tokens and 3 hours to build, about 5,000 tokens a month to keep, about 10,000 tokens to fix.
Acceptance Criteria
- A check runs in a pod and writes its verdict section.
- The pod reaches SearXNG, GitHub and PyPI and nothing that the perimeter refuses.
- Measure: alternatives checks killed by a shutdown, 0 in 7 days.
Dependencies
- feat(k8s): let roadmap-service create Argo Workflows #6592 (let roadmap-service create Argo Workflows).
Source: #4517
Alternatives check of 2026-12-01: in-use.
The repository already uses this tool.
Tool: Argo Workflows (https://github.com/argoproj/argo-workflows), Apache-2.0, last activity 2026-12-01, maintained.
Reason: The issue already names Argo Workflows as its proposed solution, and the repository runs it (ADR 0008, ADR 0021). A WorkflowTemplate with a semaphore and a template deadline runs one alternatives check in its own pod.
Covers:
- Runs one item per pod from a WorkflowTemplate
- Synchronization semaphore limits concurrent checks
- Template activeDeadlineSeconds bounds each run
Lacks:
- Submit row, pod labels and egress policy are repository glue
- SearXNG ingress peer needs the new component label
- In-pod record, verdict block and comment write
Owner decision 2026-11-13
The approved pipeline split (tracker #5482) makes this pod step 1 of the research unit (#5513). It uses the semaphore research 1, not agent, so research never holds an agent slot. Due just in time: the items in the next stage window and P0 items. The 30-day recheck runs only for items in the window. #5506 builds the two-container template on this unit.
- Live proof: after the merge and the release, the pod runs as the App on the next 5 items of the stage window. A comment gives the result lines with
tokensandcost_usd_micros.
Proposed design
Problem statement
The alternatives check runs in the roadmap Service pod. A rollout kills a check in progress and the work runs again. This change runs each check in its own Argo Workflows pod from WorkflowTemplate roadmap-alternatives. The alternatives row submits one workflow for each selected item and runs no check itself.
Acceptance criteria
Requirement: WorkflowTemplate roadmap-alternatives
The repository SHALL define WorkflowTemplate roadmap-alternatives in namespace devops to run the alternatives check for one item in its own pod.
Scenario: Template validation
- WHEN
uv run devops ci --check --only k8svalidates the manifests that hold WorkflowTemplateroadmap-alternatives. - THEN The check exits 0 and reports no validation error for the template.
Requirement: Template controls
WorkflowTemplate roadmap-alternatives SHALL use synchronization semaphore research with a limit of 1, set activeDeadlineSeconds to 3600, define no clone step or repository volume, and label its pod app.kubernetes.io/name: devops-cli-job with component roadmap-alternatives.
Scenario: Template controls validation
- WHEN
uv run devops ci --check --only k8svalidates the template and the ConfigMap that holds semaphoreresearch. - THEN The check exits 0 and reports semaphore
researchat a limit of 1,activeDeadlineSeconds3600, no clone step or repository volume, and the two pod labels.
Requirement: Submit row
The alternatives row SHALL create one workflow from template roadmap-alternatives for each item that select_items returns, and SHALL return without waiting.
Scenario: Two due items
- WHEN A test calls
_run_alternatives_adapterfor a repository of 2 due items with a fake workflow client. - THEN The row creates 2 workflows from template
roadmap-alternativeswith the item numbers, and returns without a wait call.
Requirement: No in-pod check
The Service pod SHALL make no model call and SHALL start no alternatives check process.
Scenario: No model call
- WHEN A test calls
_run_alternatives_adapterwith a fake workflow client and a fake model. - THEN The fake model records no call, and no alternatives record, verdict block or comment is written.
Requirement: Pod egress
The alternatives pod SHALL reach SearXNG in namespace devops on TCP 8080, the LLM gateway, the cache and public HTTPS for GitHub and PyPI.
Scenario: Kubernetes policy validation
- WHEN
uv run devops ci --check --only k8svalidatesk8s/devops/networkpolicy.yaml,k8s/devops/searxng/networkpolicy-client.yamlandk8s/devops/searxng/networkpolicy.yaml. - THEN The check exits 0 and reports those egress rules for the pod label, and no TCP 6443, private range or cloud metadata address.
Requirement: Verdict write
The pod SHALL write the record, the verdict block and the comment of the alternatives check for its one item.
Scenario: One item writes one result
- WHEN A test runs the one-item alternatives command with a fake GitHub store, a fake search result and no earlier verdict block.
- THEN The run writes one record, one verdict block and one comment for that item.
Requirement: Inventory without a clone
The check SHALL read the deployed inventory paths through the roadmap store when it runs with no clone.
Scenario: Deployed path names the tool
- WHEN A test runs the check with no clone and a fake store whose
k8sfile names the tool of the item. - THEN The verdict is
in-useand the record names the tool.
Requirement: Deadline leaves the item due
A workflow that ends at its deadline SHALL leave the item due, so that a later round selects it again.
Scenario: Timed-out workflow
- WHEN A test calls
select_itemsfor an item whose job record holds a timed-out workflow and no verdict block. - THEN The selection returns the item and the item holds no verdict block.
Requirement: Pending a person after the merge
The alternatives pod SHALL run as the App on the next 5 items of the stage window after the merge and the release.
Scenario: Live proof
- WHEN An agent runs the live check
uv run devops roadmap follow <n>for each of the next 5 items that thealternativesrow submits, after theLive sincecomment thatrelease_commentsposts. - THEN Each item has one Workflow of
roadmap-alternativesthat ended Succeeded, each item has a new date in its verdict block and onejob=alternativesresult line, and one comment on this issue gives the 5 result lines withtokensandcost_usd_microsand the Workflow names.
Requirement: No check killed by a shutdown
A rollout SHALL kill no alternatives check, so that the count of killed checks is 0 in 7 days.
Scenario: Seven-day count
- WHEN An agent counts, 7 days after the release, the Workflows of
roadmap-alternativesthat ended Failed or Error after their pod was deleted, withkubectl get workflows -n devops. - THEN The count is 0 and the agent posts the count on this issue.
Existing Tool Considered
The alternatives check of 2026-11-19 in the issue body gives the verdict in-use for argoproj/argo-workflows (https://github.com/argoproj/argo-workflows), Apache-2.0, maintained, because the repository already runs it (ADR 0008, ADR 0021). The block in the issue body lists what the tool covers and lacks. This change adds the repository glue that the block lists as lacking: the submit row that creates one workflow for each selected item, the SearXNG egress policy and its matching ingress peer, the in-pod write of the record, the verdict block and the comment, and the deployed-path inventory read through the store with no clone. The body records about 60,000 tokens and 3 hours to build that glue, about 5,000 tokens a month to keep it, and about 10,000 tokens to fix it.
Key questions
- Which open, maintained tool runs one alternatives check in its own pod?: Argo Workflows, which the repository already runs. The alternatives check of 2026-11-19 in the issue body gives the verdict in-use for argoproj/argo-workflows. WorkflowTemplate
roadmap-alternativesruns the one-item check with synchronization semaphoreresearchand a template deadline. (best practice) [sources: docs/adr/0008-argo-workflows-run-the-roadmap-jobs-after-a-measured-go.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]- Chosen: Argo Workflows WorkflowTemplate. The controller already runs in namespace
devops, and the template gives the semaphore and the deadline with no new engine. - Rejected: Kubernetes Jobs. A Job has no template, no semaphore and no template deadline, so the change builds those controls.
- Rejected: Keep the check in the Service pod. A rollout kills the check in progress, and that kill is the problem.
- Chosen: Argo Workflows WorkflowTemplate. The controller already runs in namespace
- Which semaphore does the template use, and does this item change the due rule from the owner decision of 2026-11-13?: The template uses semaphore
researchwith a limit of 1, notagent, as the owner decision of 2026-11-13 sets, so a research pod never holds an agent slot. This item keeps the current due rule. The just-in-time rule for the next stage window and the P0 items, and the 30-day recheck only in the window, belong to research unit feat(roadmap): one research unit runs its steps just in time #5513. (best practice) [sources: docs/CLUSTER.md, docs/ROADMAP_WORKFLOW.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]- Chosen: Semaphore
research1 and keep the due rule in feat(roadmap): one research unit runs its steps just in time #5513. The owner decision setsresearch1 and assigns the just-in-time due rule to research unit feat(roadmap): one research unit runs its steps just in time #5513. - Rejected: Semaphore
agent. A research pod would hold an agent slot, and the owner decision refuses that. - Rejected: Implement the just-in-time due rule here. It changes the selection and the due table that feat(roadmap): one research unit runs its steps just in time #5513 owns.
- Chosen: Semaphore
- How does the pod run the alternatives selection for one item?: The template runs the existing
devops roadmap alternativescommand with the item named and the write confirmed. That command already narrows the round to one named item, and it writes its result only when the run is confirmed. (best practice) [sources: src/devops_cli/commands/roadmap.py, src/devops_cli/roadmap/alternatives.py]- Chosen: The existing
devops roadmap alternativescommand. It already names one item and writes its result when confirmed, so no second entry point is needed. - Rejected: A new pod entry point. It duplicates the command and adds a path to keep.
- Rejected: Call the Python selection from a shell step. It bypasses the item selection and the exit path of the command.
- Chosen: The existing
- How does the row learn which items to submit?: The row calls
select_itemswith the settingslimit,first_pass_limit,recheck_daysandretry_daysand the ADR hash ofread_adrs, and creates one workflow for each selected item. It MUST NOT callplan_alternatives, because that function builds the model and runs_check_onefor each selected item even with no writer. (best practice) [sources: src/devops_cli/roadmap/alternatives.py, src/devops_cli/roadmap/adr.py]- Chosen: Call
select_itemsand submit one workflow for each item. The selection is one function with no model call, and each pod stays narrowed to one item. - Rejected: Call
plan_alternativeswith no writer. It builds the model and runs_check_onefor each item, so the Service pod would run the check. - Rejected: One workflow for the whole round. The template is narrowed to one item, and a deadline kill loses the rest of the round.
- Chosen: Call
- Does the row wait for the workflow that it creates?: No. The row creates the workflows and returns. The pod writes its own result, and a wait would hold the Service for up to the 3,600 s deadline. The agentic jobs guideline requires that no caller waits for the end of a job. (best practice) [sources: docs/guidelines/agentic-jobs.md, src/devops_cli/roadmap/run.py]
- Chosen: Create the workflows and return. The pod writes its own record, block and comment, so the row needs no result.
- Rejected: Wait for the workflow to end. The row would hold the Service for up to an hour.
- Rejected: Wait with a short timeout. A timeout leaves the result unknown and adds a second path.
- Does the row keep the in-pod alternatives body as a fallback?: No. Remove the in-pod body from
_run_alternatives_adapterand leave the row with one purpose: submit. A fallback keeps the kill path open and gives the row two purposes. (best practice) [sources: src/devops_cli/roadmap/run.py, docs/guidelines/agentic-jobs.md]- Chosen: Remove the in-pod body. A rollout can still kill an in-pod check, so the fallback keeps the problem.
- Rejected: Keep it as a fallback. It gives two paths and leaves the kill path open.
- Which pod label do the NetworkPolicies select, and how does the pod reach SearXNG, GitHub and PyPI?: The pod keeps
app.kubernetes.io/name: devops-cli-joband adds componentroadmap-alternatives. This change adds that component to the SearXNG egress block ink8s/devops/searxng/networkpolicy-client.yamland to the ingress peer ink8s/devops/searxng/networkpolicy.yaml. The pod keepsdevops-default-perimeterfor DNS, public HTTPS, the gateway, the cache and the OTLP collector. A NetworkPolicy matches addresses and not host names, so no rule names GitHub and PyPI alone. (best practice) [sources: k8s/devops/networkpolicy.yaml, k8s/devops/searxng/networkpolicy.yaml, k8s/devops/searxng/networkpolicy-client.yaml]- Chosen: Add the pod label to the existing SearXNG policies. One place holds the SearXNG rule and its allowed hosts, and the perimeter already gives the public HTTPS that GitHub and PyPI need.
- Rejected: A second NetworkPolicy that lists GitHub and PyPI addresses. A NetworkPolicy matches addresses and not host names, and the address lists of a hosted service change.
- Rejected: Use no policy. The pod could not reach SearXNG, and the perimeter would be the only guard.
- Does the alternatives pod need a clone of the repository?: No, but the check keeps the deployed paths.
read_inventoryreturns an emptydeployedtext when it gets no source, so the change reads theinventory_pathsthrough the roadmap store instead.read_adrsalready reads a repository directory through the store. (best practice) [sources: src/devops_cli/roadmap/inventory.py, src/devops_cli/roadmap/stores/store.py, src/devops_cli/roadmap/adr.py]- Chosen: Read the deployed paths through the store. One listing and a few file reads keep the
in-useverdict for a tool that only ak8sortffile names, with no clone step. - Rejected: Clone the repository. It adds a clone step, credentials and storage that the check does not need.
- Rejected: Drop the deployed paths.
read_inventorygives an emptydeployedstring with no source, so an in-use tool that only a deployed file names would be missed and the item could getcovers.
- Chosen: Read the deployed paths through the store. One listing and a few file reads keep the
- Who runs the live proof after the merge and the release?: An agent runs the live proof and posts the evidence. A person merges the pull request and decides on a measure that misses its target. The agent starts from the
Live sincecomment thatrelease_commentsposts on this issue and reads each of the next 5 runs withuv run devops roadmap follow <n>. A check posts a comment only when its result changed, so a missing comment on an unchanged result is no failure. The agent posts one comment with the 5 result lines and the Workflow names, and counts after 7 days the Workflows ofroadmap-alternativesthat ended Failed or Error because their pod was deleted. (best practice) [sources: AGENTS.md, src/devops_cli/roadmap/alternatives.py, docs/guidelines/agentic-jobs.md]- Chosen: An agent runs the live proof and posts the evidence. The owner decision sets the live proof, and the evidence is one comment with the 5 result lines and the Workflow names.
- Rejected: A person runs the live proof. The owner decision keeps only the merge and the decision on a missed measure for a person.
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.It prevents lost work during rollouts but the system recovers by re-running, so it is important but not urgent.It stops rollouts from killing in-progress checks, which saves re-run cost and keeps the record consistent.It requires a new WorkflowTemplate, a semaphore, network policy checks, and removal of existing in-pod code.Both change how the alternatives check executes, but #2652 adds the scheduled run in the Service while the candidate moves execution to individual Argo pods.devops-cli-service commentedon Nov 11, 2026
Refine cannot set this item to Ready at 818ac6f 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.
devops-cli-service commentedon Nov 12, 2026
Alternatives check: in-use
Reason: Searches and the repository's ADRs point to Argo Workflows, which the project already runs (ADR 0008 chose it; ADR 0021 puts roadmap jobs in cluster pods) and which provides a WorkflowTemplate, a semaphore and a per-template deadline so each alternatives check runs in a pod of its own. Only repository-specific glue (the submit row, the egress policy and the verdict write) remains, so it covers the whole need.
The item already names this tool.
Tool: argoproj/argo-workflows (https://github.com/argoproj/argo-workflows)
Covers:
agent)Lacks:
_run_alternatives_adapterthat creates the workflow instead of running the checkdevops, GitHub and PyPI and denying all other hostsTools considered:
Searches run:
Sources:
Checked on 2026-11-12. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 14, 2026
Refine cannot set this item to Ready at b15faab until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
devops-cli-service commentedon Nov 20, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
dan-petty commentedon Nov 21, 2026
Answer to the open question: who confirms the live proof after the merge and the release?
Decision: an agent runs the live proof and posts the evidence. A person does not do this step.
Live sincecomment thatrelease_commentsposts on this issue.devopsas Synced and Healthy. WorkflowTemplateroadmap-alternativesis in namespacedevops.alternativesrow submits each get one Workflow ofroadmap-alternativesthat runs as the App and ends Succeeded. Each item gets a new date in the verdict block of the body and onejob=alternativesresult line. The agent reads each run withuv run devops roadmap follow <n>.src/devops_cli/roadmap/alternatives.py,_posts_comment). A missing comment on an unchanged result is no failure.tokens,cost_usd_micros) and the names of the Workflows.roadmap-alternativesthat ended Failed or Error because their pod was deleted (kubectl get workflows -n devops). The target is 0. The agent posts the count.devops roadmap intakeand links it here.A person keeps two steps: the merge of the pull request, and the decision on a measure that misses its target.
This step comes after the merge and the release. It does not hold the item from Ready (decision "Post-merge person step" of 2026-11-11 in tracker 4780). Keep it as an acceptance criterion after the merge, not as an open question. Tracker 4780 is a source, not a dependency of this item.
devops-cli-service commentedon Nov 21, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.
devops-cli-service commentedon Nov 21, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.