Repository navigation
Description
Problem or Motivation
The question resolver must run with no person and no agent session (owner requirement of 2026-11-11, #4780). No template runs it.
Proposed Solution & Architectural Design
- A WorkflowTemplate and a CronWorkflow
roadmap-resolve:schedules: ['15 */4 * * *'], timezone UTC.concurrencyPolicy: Forbid,startingDeadlineSeconds: 3600.- A mutex
resolveand the semaphoresteward(a new key of the ConfigMaproadmap-limits, value 1). retryStrategyfor exit code 75 only.activeDeadlineSeconds: 3600.- The ADR 0022 labels.
- No API token in the main container.
- ConfigMap keys
roadmap.resolve.mode,roadmap.resolve.reposandroadmap.resolve.limit. - The first runs use plan mode. The row stays in plan mode until the gold-set gate of the answer child passes.
- The owner merges this pull request, because it changes a limit (ADR 0021).
Target Subsystem
Kubernetes manifests (k8s/devops/).
Existing Tool Considered
Argo Workflows CronWorkflows and synchronization (installed). Cost to build: about 50,000 tokens and 1.5 hours.
Acceptance Criteria
- The kustomize render holds the objects.
- The admission policy admits them.
- A server-side dry run passes.
- The first scheduled run in plan mode writes its plan to Loki and nothing to GitHub.
Dependencies
- docs(adr): add the resolve, group, split and step rows #4792 (the ADR rows)
- feat(roadmap): the question resolver answers with verified sources #4808 (the answer step)
- feat(k8s): let Argo Workflows run roadmap pods in devops #4566 (Argo Workflows runs roadmap pods)
- feat(roadmap): label Service Jobs by repository and item #4558 (Job labels)
Source: #4780
Owner decision 2026-11-13
The approved pipeline split (tracker #5482, Phase 6) keeps this scope, with the semaphore steward 1.
- Live proof: after the merge, the schedule runs the resolver one time as the App. A comment gives the Workflow name and the result lines.
Alternatives check of 2026-11-26: in-use.
The repository already uses this tool.
Tool: argoproj/argo-workflows (https://github.com/argoproj/argo-workflows), Apache-2.0, last activity 2026-11-26, maintained.
Reason: Searches found Argo Workflows, the engine the repository already runs and ADR 0021 chose; its CronWorkflow, WorkflowTemplate, retry, timeout and synchronization features cover the scheduled resolve run, leaving only project-specific manifest settings.
Covers:
- Cron-scheduled Workflow runs in UTC
- Reusable WorkflowTemplates for one spec
- Workflow and step timeouts and retries
- Mutex and semaphore synchronization between runs
Lacks:
- Project ConfigMap keys roadmap.resolve.mode, repos and limit
- ADR 0022 labels on objects and pod metadata
- No-API-token rule for the main container
- Admission-policy scope for the rendered objects
Proposed design
Problem statement
Build the roadmap-resolve WorkflowTemplate and CronWorkflow. Add the three roadmap.resolve.* keys of ConfigMap devops-cli-config. Add the steward key of ConfigMap roadmap-limits. Add the ADR 0022 labels.
The change uses Argo Workflows and adds no new tool. The pull request waits on #4558, #4566, #4792 and #4808. The owner must merge the pull request because it changes a limit. A person must prove the first scheduled run after the merge. The issue is not Ready until those dependencies merge.
Acceptance criteria
Requirement: Render holds the resolve objects
The kustomize render of k8s/devops SHALL contain a WorkflowTemplate and a CronWorkflow named roadmap-resolve.
Scenario: Render contains the resolve schedule
- WHEN
uv run devops ci --check --only k8sruns - THEN The k8s check exits 0 and reports no error for the
roadmap-resolveWorkflowTemplate and CronWorkflow.
Requirement: Resolve schedule uses the four-hour cron
The roadmap-resolve CronWorkflow SHALL set schedules to ['15 */4 * * *'] and timezone to UTC.
Scenario: Schedule runs every fourth hour in UTC
- WHEN
uv run devops ci --check --only k8sruns - THEN The k8s check exits 0 and reports no error for the resolve schedule and its timezone.
Requirement: Resolve schedule serializes runs
The roadmap-resolve CronWorkflow SHALL set concurrencyPolicy: Forbid and startingDeadlineSeconds: 3600.
Scenario: Schedule forbids a second run
- WHEN
uv run devops ci --check --only k8sruns - THEN The k8s check exits 0 and reports no error for the resolve concurrency policy and start deadline.
Requirement: Resolve template bounds one run
The roadmap-resolve WorkflowTemplate SHALL set activeDeadlineSeconds: 3600.
Scenario: Template bounds one run
- WHEN
uv run devops ci --check --only k8sruns - THEN The k8s check exits 0 and reports no error for the resolve run deadline.
Requirement: Resolve workflow holds synchronization
The roadmap-resolve WorkflowTemplate SHALL declare mutex resolve and semaphore steward, and ConfigMap roadmap-limits SHALL hold key steward with value 1.
Scenario: Mutex and semaphore are set
- WHEN
uv run devops ci --check --only k8sruns - THEN The k8s check exits 0 and reports no error for the resolve mutex, the
stewardsemaphore and its limit.
Requirement: Resolve retries only exit 75
The roadmap-resolve WorkflowTemplate SHALL set retryStrategy to retry exit code 75 only.
Scenario: Retry expression names exit 75 only
- WHEN
uv run devops ci --check --only k8sruns - THEN The k8s check exits 0 and reports no error for the resolve retry rule.
Requirement: Resolve objects carry ADR 0022 labels
The roadmap-resolve WorkflowTemplate and CronWorkflow SHALL carry the four ADR 0022 labels, and the template SHALL set them in spec.podMetadata.labels.
Scenario: Objects carry the common labels
- WHEN
uv run devops ci --check --only k8sruns - THEN The k8s check exits 0 and reports no error for the resolve labels and the pod metadata labels.
Requirement: Resolve configuration keys exist
ConfigMap devops-cli-config SHALL define roadmap.resolve.mode with value plan, roadmap.resolve.repos with the repository list of the setting service.repos, and roadmap.resolve.limit with value 5.
Scenario: Resolve configuration keys are present
- WHEN
uv run devops ci --check --only k8sruns - THEN The k8s check exits 0 and reports no error for the resolve ConfigMap keys.
Requirement: Main container holds no API token
The roadmap-resolve WorkflowTemplate SHALL give no API token to its main container.
Scenario: Main container has no API token
- WHEN
uv run devops ci --check --only k8sruns - THEN The k8s check exits 0 and reports no error for the main-container token rule.
Requirement: Admission policy does not reject the resolve objects
The rendered roadmap-resolve objects SHALL contain no Job, and the roadmap-service-jobs admission policy SHALL not reject them.
Scenario: Policy does not reject the resolve objects
- WHEN
uv run devops ci --check --only k8sruns - THEN The k8s check exits 0 and reports no error for the admission-policy scope.
Requirement: Server-side dry run accepts the render
The rendered roadmap-resolve objects SHALL pass a server-side dry run.
Scenario: Dry run accepts the resolve objects
- WHEN After feat(k8s): let Argo Workflows run roadmap pods in devops #4566,
kubectl apply --dry-run=server -k k8s/devopsruns - THEN The command exits 0 and reports no error for the resolve objects.
Requirement: Pending a person after the merge
The owner SHALL merge the pull request that changes the steward limit.
Scenario: Owner merges the limit change
- WHEN The pull request passes its checks
- THEN The owner merges it.
Requirement: Pending a person after the merge
The first scheduled roadmap-resolve run after the merge SHALL write its plan to Loki and nothing to GitHub.
Scenario: First scheduled run in plan mode
- WHEN The first scheduled run after the merge completes
- THEN Loki holds the plan lines and GitHub shows no new comment or label from the run.
Existing Tool Considered
argoproj/argo-workflows (https://github.com/argoproj/argo-workflows), Apache-2.0, maintained, verdict in-use: the repository already runs Argo Workflows, and ADR 0021 and ADR 0008 chose it. The alternatives check in the issue body records what the tool covers and lacks. This change adds only what the tool lacks: the roadmap.resolve.mode, roadmap.resolve.repos and roadmap.resolve.limit keys of ConfigMap devops-cli-config, the ADR 0022 labels, the admission-policy scope and the no-token rule of the main container. #4808 supplies the plan-mode and gold-set gate logic and the gateway-key answer step.
Key questions
- Does the owner decision of 2026-11-13 keep this scope with the
stewardsemaphore at 1?: Yes. The owner decision keeps the scope, and ADR 0021 admits 1 pod of the rowsresolveandsplitthroughsteward. (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]- Chosen: Keep the scope and set
stewardto 1. The owner decision keeps the scope, and ADR 0021 admits 1 pod ofresolveandsplit. - Rejected: Reduce the scope to a plain schedule. The owner decision keeps the scope.
- Rejected: Use the
agentsemaphore. ADR 0021 assigns theresolverow tosteward.
- Chosen: Keep the scope and set
- Which schedule and synchronization does ADR 0021 give the
resolverow?: A CronWorkflowroadmap-resolvewithschedules: ['15 */4 * * *']in UTC,concurrencyPolicy: Forbid,startingDeadlineSeconds: 3600, mutexresolveand semaphoresteward. (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]- Chosen: Argo CronWorkflow
roadmap-resolvewith the ADR 0021 row settings. ADR 0021 names the resolve row, its four-hour schedule, its mutex and its steward semaphore. - Rejected: Kubernetes CronJob. ADR 0021 moves the roadmap rows to Argo Workflows.
- Rejected: A schedule inside the Service pod. ADR 0021 keeps only the webhook router in the Service.
- Chosen: Argo CronWorkflow
- Who merges the pull request that changes the
stewardlimit?: The owner merges the pull request. Only a person merges pull requests, and this change changes a limit. (best practice) [sources: AGENTS.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: The owner merges the pull request. AGENTS.md reserves merges to a person, and ADR 0021 makes a limit change an owner decision.
- Rejected: An agent merges the pull request. AGENTS.md forbids it.
- Rejected: Automatically merge after the checks pass. AGENTS.md forbids it.
- Which exit code does the
retryStrategyretry?: Exit code 75 only. A model refusal is not a temporary fault. (best practice) [sources: CONTEXT.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: Retry exit code 75 only. CONTEXT.md names exit 75 for a later try, and ADR 0021 tries again a pod that exits with 75.
- Rejected: Retry every failed step. A model refusal is not a temporary fault.
- Rejected: Do not retry. A temporary fault needs a later try.
- Which mode does the resolver use on its first scheduled runs?: Plan mode. The key
roadmap.resolve.modeisplan, and the row stays in plan until the gold-set gate of the answer child (feat(roadmap): the question resolver answers with verified sources #4808) passes. (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]- Chosen: Start in
planmode. ADR 0021 starts the new rows in modeplan, and the gold-set gate of feat(roadmap): the question resolver answers with verified sources #4808 has not run. - Rejected: Start in
onmode. The gold-set gate of the answer child has not run. - Rejected: Start in
offmode. Modeoffis the stop switch and the schedule would do no work.
- Chosen: Start in
- Which ConfigMap keys configure the resolver?:
roadmap.resolve.modewith valueplan,roadmap.resolve.reposwith the repository list of the settingservice.repos, androadmap.resolve.limitwith value5, in ConfigMapdevops-cli-config. (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, CONTEXT.md]- Chosen: The three
roadmap.resolve.*keys indevops-cli-config. ADR 0021 namesroadmap.<row>.modeandroadmap.resolve.repos, and bounds a run to 5 items. - Rejected: Environment variables only. The issue body names ConfigMap keys.
- Rejected: Command-line flags only. The issue body names ConfigMap keys.
- Chosen: The three
- Which repositories does
roadmap.resolve.reposlist?: The repositories of the settingservice.repos. ADR 0021 selects each repository ofroadmap.resolve.repos, and the Service manages those repositories. (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, CONTEXT.md]- Chosen: The repositories of
service.repos. The Service manages those repositories, and the resolver must cover each of them. - Rejected: Only
dan-petty/devops-cli. The settingservice.reposcan name more than one repository, so one repository would leave gaps. - Rejected: All repositories of the owner. The Service must not run on a repository that it does not manage.
- Chosen: The repositories of
- Which ConfigMap holds the
stewardsemaphore?: ConfigMaproadmap-limitsholds keystewardwith value1. [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md] - How do the Workflow steps receive credentials?: The main container gets no API token. Each step gets only the Secret key that its job needs. feat(roadmap): the question resolver answers with verified sources #4808 gives the answer step only the gateway key
DEVOPS_CLI_AI_API_KEY, and the deterministic and comment steps use the App keyDEVOPS_CLI_SERVICE_GITHUB_APP_PRIVATE_KEYfrom Secretdevops-cli. (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, src/devops_cli/config/constants.py, k8s/devops/roadmap-service/admissionpolicy.yaml]- Chosen: No token in the main container, and one Secret key for each step. ADR 0021 forbids an API token in the main container of an agent pod and gives each pod only the keys that its job needs.
- Rejected: A GitHub token in the main container. The issue body and ADR 0021 forbid it.
- Rejected: The App key in the answer step. The App key stays out of the model pod, and the answer step gets only the gateway key (feat(roadmap): the question resolver answers with verified sources #4808).
- Does
activeDeadlineSecondsbelong to the CronWorkflow or the WorkflowTemplate?: The WorkflowTemplate. It is a WorkflowSpec field, andworkflowtemplate-rag-ingest.yamlsets it there. (best practice) [sources: k8s/devops/workflowtemplate-rag-ingest.yaml, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]- Chosen: The WorkflowTemplate. One template holds the bound for every Workflow it starts, and the existing
rag-ingesttemplate sets it there. - Rejected: The CronWorkflow. The CronWorkflow only references the template, so the bound would live in two places.
- Rejected: Both. Two values could disagree, and the Workflow uses the template.
- Chosen: The WorkflowTemplate. One template holds the bound for every Workflow it starts, and the existing
- Does the CronWorkflow use
scheduleorschedules?:schedules, a list. ADR 0021 records that Argo v4.0 removed the singularschedule. [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md] - Which objects does the
roadmap-service-jobsadmission policy evaluate?: Only roadmap units that run as ServiceAccountroadmap-service. The resolve objects are a WorkflowTemplate and a CronWorkflow, so the policy does not evaluate them, and the server-side dry run is the admission gate. [sources: k8s/devops/roadmap-service/admissionpolicy.yaml, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md] - Which names and labels do the resolve objects carry?: Both objects are named
roadmap-resolve. They carryapp.kubernetes.io/name: devops-cli-job,app.kubernetes.io/component: roadmap-resolve,app.kubernetes.io/part-of: devops-cli-stackandapp.kubernetes.io/managed-by: roadmap-service. The WorkflowTemplate also sets them inspec.podMetadata.labels. (best practice) [sources: docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.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: The ADR 0022 common labels on both objects and on
spec.podMetadata.labels. ADR 0022 names the common labels of a roadmap object, and the pod metadata carries them to the pods. - Rejected: Only the
app.kubernetes.io/namelabel. ADR 0021 needs the name label for the network policies, and ADR 0022 adds the other common labels.
- Chosen: The ADR 0022 common labels on both objects and on
- Which validator proves the manifest and admission requirements?:
uv run devops ci --check --only k8schecks the manifest invariants.kubectl apply --dry-run=server -k k8s/devopschecks admission after feat(k8s): let Argo Workflows run roadmap pods in devops #4566. (best practice) [sources: tests/gate/k8s_checks/job_admission_policy.py, tests/invariants/test_k8s_manifests.py]- Chosen:
uv run devops ci --check --only k8sand, after feat(k8s): let Argo Workflows run roadmap pods in devops #4566, the server-side dry run. The k8s check runs the manifest invariants, and the dry run checks admission. - Rejected: A new test that reads the manifests. A manifest criterion names a validator command, not a test that reads the file.
- Rejected: Only the server-side dry run. It needs cluster access and does not cover the offline manifest invariants.
- Chosen:
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.(k8s)scope of the title gives the scope.It automates a required process but depends on unresolved items and is not blocking other work.It removes manual runs of the question resolver, but the resolver itself must pass its gold-set gate first.The body states about 50,000 tokens and 1.5 hours for the manifests and ConfigMap keys.Both add a CronWorkflow for a roadmap job with Forbid concurrency, but #4574 delivers the reconcile sweep and this candidate delivers the question resolver.dan-petty commentedon Nov 12, 2026
Scope update from the Service step jobs plan (#5014).
The owner asked on 2026-11-12 for a separate job for each step that the Service jobs run the same way every time. This issue is the
resolve-scheduleitem of that plan. The plan is extract-first: each repeated step becomes one module and one command (devops roadmap step <name>) that every caller uses, and then the steps that cost most move to their own Jobs.Proposed title:
feat(k8s): run the question resolver on a scheduleProblem (plan evidence)
#4809 runs the question resolver as a CronWorkflow every 4 h. The Argo-native design made resolve a unit for each item and gave its model pod a GitHub token that no step can safely make (plan review). ADR 0021:96 has each pod make its own installation token, which would put the App key in a model pod.
Added scope
Keep #4809 as a CronWorkflow (ADR 0023 form, not a unit). Add: a deterministic step puts the issue text and the clone at a pinned SHA on the Workflow volume; the answer step (#4808) gets the gateway key only and no GitHub token; a comment step with the App key posts the marked comment. The question record of question-record and a trusted issue_comment (#4415) set its due mark.
Cost: as #4809 states.
Added acceptance
Merge first
Coordination
#4780 stays the parent. The resolver stays the stewards CronWorkflow, not a unit for each item.
devops-cli-service commentedon Nov 14, 2026
Alternatives check: in-use
Reason: The issue already names Argo Workflows CronWorkflows and synchronization as the installed tool, and ADR 0021/AD 0008 chose Argo Workflows as the roadmap engine over plain CronJobs. Its CronWorkflow, WorkflowTemplate and synchronization features cover the scheduling, mutual exclusion and retry/deadline needs of the issue, so no new tool is needed.
The repository already uses this tool.
Tool: argoproj/argo-workflows (https://github.com/argoproj/argo-workflows)
Covers:
Lacks:
Tools considered:
Searches run:
Sources:
Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 15, 2026
Owner question: Who merges the pull request that changes the
stewardlimit? (a person decides)Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 19, 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 24, 2026
The owner merges the pull request. Only a person merges pull requests (AGENTS.md).
devops-cli-service commentedon Nov 24, 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
devops-cli-service commentedon Nov 26, 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.