Repository navigation
Description
Problem or Motivation
Scoped intake takes 64 s at p50 and 194 s at p99, with the wait for the one model slot of the Service process. The scoped queue is in memory, so a rollout drops each queued update. About 240 scoped updates run a day. Batch intake runs in the Service pod and dies with each rollout.
Proposed Solution & Architectural Design
- WorkflowTemplate
roadmap-intakeruns the intake selection for the repository, or for one issue. Mutexintake-<owner>.<name>on the template, not on the Workflow, so the rule of ADR 0017 (one intake writer for each repository) stays. Semaphoretriage. Deadline 900 s (batch) or 600 s (one issue), on the template. - The router's delivery target creates the intake unit for
issuesopened,edited,reopened(src/devops_cli/roadmap/run.py:881-883). During a hold, or when the create fails, it setsroadmap:v1:due:<owner>/<name>:intakeand no delivery key. - The intake row becomes a submit that runs only when a candidate or a new issue exists.
- A placed P0 or critical fix sets
roadmap:v1:due:<owner>/<name>:refine; no DAG chain. - fix(service): route issues webhooks past scoped intake #4412 (route
issueswebhooks past scoped intake) editsenqueue_trigger, which this item replaces. Merge fix(service): route issues webhooks past scoped intake #4412 first, or fold its routing into this item and close it with evidence. feat(roadmap): PR, review and check events start a scoped sweep #4413 to feat(roadmap): comment releases from GitHub release webhooks #4416 add more webhook targets; their targets create units or set due marks in the same way.
Removes: the triage lane, enqueue_scoped and _pending_scoped (src/devops_cli/server/service.py:467,500-585), the in-pod body of _run_intake_adapter (run.py:473-506), the use of model_call_slot in the Service.
Target Subsystem
SDLC, Git & PR Governance (roadmap intake, webhook router).
Existing Tool Considered
Argo Workflows mutex and semaphore; Kubernetes API create from the router. WorkflowEventBinding and Argo Events are rejected in the ADR of the move (they duplicate the router). Cost: about 120,000 tokens and 6 hours to build, about 10,000 tokens a month to keep, about 20,000 tokens to fix. About 240 pods a day, each with cold GitHub reads.
Acceptance Criteria
- An opened issue gets one intake unit within 15 s of the delivery (router log and the creation time).
- A batch and a scoped intake of one repository never write the intake record at the same time.
- A repeated delivery makes no second unit; a failed create leaves a due mark and no delivery key.
- The ADR 0017 behaviours stay: no last success from a scoped update; the record keeps every other entry.
- Measure: delivery to decision for scoped intake, p50 of 60 s or less; accepted
issuesdeliveries against intake units, no loss.
Dependencies
- "feat(roadmap): keep schedules, intake and ledgers in Valkey".
- feat(k8s): let roadmap-service create Argo Workflows #6592 (let roadmap-service create Argo Workflows).
- fix(service): route issues webhooks past scoped intake #4412 (merge first or fold in).
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: Searches and the repository facts confirm Argo Workflows, the engine that ADR 0021 and ADR 0008 chose and the issue already names. Its template mutex, semaphore and deadline run each intake in its own pod. The router, the due selection and the ADR 0017 record rule stay project code.
Covers:
- Pod for each run, with retries and a deadline
- Mutex on the WorkflowTemplate, so every unit of one repository takes it
- Semaphore to hold the triage concurrency at 1
- Queued work behind a mutex, so a rollout loses no unit
Lacks:
- No webhook receiver, HMAC check or delivery dedupe
- No router scoped sweep and no due selection
- No intake record, so the ADR 0017 rules stay in project code
- Needs the Kubernetes create from the router and the Valkey state
Owner decision 2026-11-13
The approved pipeline split (tracker #5482) makes this pod the triage unit: intake, the retitle summary (#5507) and premise (#5508), at most 5 items for each pass, semaphore triage 1, no clone. No due mark: the router runs a scoped sweep, and due_jobs selects the items. A placed P0 sets no refine mark; refine is due by its predicate. It waits for #4565 and #4566.
- After feat(roadmap): the model container of a unit holds no credential #5506 merges, the unit uses the two-container template.
- Live proof: after the merge and the release, the unit runs as the App on the issues opened in the last 7 days. A comment gives the result lines.
Proposed design
Problem statement
The Service pod runs batch intake and scoped intake. A rollout stops batch intake and drops each queued scoped update, because the scoped queue is in memory. Scoped intake waits for the one model slot of the Service and takes 64 s at p50 and 194 s at p99. This item moves the triage unit to WorkflowTemplate roadmap-intake on Argo Workflows. The triage unit runs intake, the retitle summary and the premise for at most 5 items. The router starts one scoped sweep, and the due selection picks the items.
Acceptance criteria
Requirement: Intake template synchronization
WorkflowTemplate roadmap-intake SHALL carry the mutex intake-<owner>.<name>, the semaphore triage with a limit of 1, and a deadline of 900 s for a batch pass or 600 s for a one-item pass.
Scenario: Template fields
- WHEN The k8s check runs
uv run devops ci --check --only k8son the change. - THEN The check passes with WorkflowTemplate
roadmap-intakecarrying the mutexintake-<owner>.<name>, the semaphoretriageat 1, and the 900 s batch deadline or the 600 s one-item deadline.
Requirement: Intake template runs no clone
WorkflowTemplate roadmap-intake MUST run no git clone step.
Scenario: No clone step
- WHEN The k8s check runs
uv run devops ci --check --only k8son the change. - THEN The check passes with WorkflowTemplate
roadmap-intakecarrying no git clone step.
Requirement: Triage selection cap
The triage unit MUST take at most 5 items in one pass.
Scenario: Six candidates
- WHEN A test gives six candidates to the triage selection with
DEFAULT_ROADMAP_INTAKE_LIMIT. - THEN The selection returns five candidates.
Requirement: Triage unit runs retitle and premise
The triage unit SHALL run the intake selection, the retitle summary and the premise for each selected item.
Scenario: One selected item
- WHEN A test runs the triage unit for one selected item with a fake intake selection, a fake retitle step and a fake premise step.
- THEN The fake intake selection records the item, and the fake retitle step and the fake premise step each record one call for the item.
Requirement: Hold writes no intake due key
During a hold, the router MUST start no scoped sweep and MUST write no intake due key.
Scenario: Hold active
- WHEN A signed
issuesopeneddelivery arrives for a managed repository during a hold. - THEN The fake service manager records no scoped sweep, and the fake due store records no
roadmap:v1:due:<owner>/<name>:intakekey.
Requirement: Router starts one scoped sweep
For an issues opened, edited or reopened delivery, the router MUST start one scoped sweep for the repository and MUST write no intake due key.
Scenario: Opened issue delivery
- WHEN A signed
issuesopeneddelivery arrives for a managed repository and no hold is active. - THEN The fake service manager records one scoped sweep for the repository, and the fake due store records no
roadmap:v1:due:<owner>/<name>:intakekey.
Requirement: Due selection submits the triage unit
The scoped sweep MUST select the intake items with run_due_jobs and _intake_due, and the intake row MUST submit one roadmap-intake unit for them.
Scenario: Due jobs selection
- WHEN A test runs
run_due_jobsfor a repository with one candidate and one new issue. - THEN The intake row is due and its fake unit creator records one
roadmap-intakeunit.
Requirement: Repeated delivery is idempotent
A repeated issues delivery ID MUST NOT create a second scoped sweep or a second triage unit.
Scenario: Duplicate delivery ID
- WHEN The router receives the same delivery ID two times.
- THEN The router records the second delivery as a duplicate, and one scoped sweep and one triage unit exist.
Requirement: Failed unit create counts a failure
When the create of the triage unit fails, the intake row MUST count one failure, MUST write no intake due key and MUST write no delivery key.
Scenario: Unit create fails
- WHEN The intake row submits a
roadmap-intakeunit and the Kubernetes create returns an error. - THEN The row counts one create failure, the fake due store records no
roadmap:v1:due:<owner>/<name>:intakekey, and the fake delivery store records no delivery key.
Requirement: One intake writer for each repository
A batch intake and a scoped intake of one repository MUST NOT write the intake record at the same time.
Scenario: Both units take the template mutex
- WHEN A test builds a batch intake unit and a scoped intake unit for one repository.
- THEN Both units come from WorkflowTemplate
roadmap-intake, whose mutex isintake-<owner>.<name>.
Requirement: Intake row submits only for work
The intake row MUST submit a roadmap-intake unit only when the due rule selects a candidate or a new issue.
Scenario: No selected item
- WHEN The intake row runs for a repository and
_intake_dueselects no candidate and no new issue. - THEN The row submits no workflow, and its fake unit creator records no unit.
Requirement: No refine mark from a placed P0
A placed P0 or critical fix MUST NOT write a refine due key or a refine_due stamp, and the refine row MUST stay due by its own rule.
Scenario: Critical fix placed
- WHEN The triage unit places a P0 item that fixes a defect.
- THEN The unit writes no
refine_duestamp and noroadmap:v1:due:<owner>/<name>:refinekey, and the refine row is due in the same round by its own rule.
Requirement: Scoped intake keeps the ADR 0017 record rule
A scoped intake MUST NOT write a last success entry and MUST keep every other entry of the intake record.
Scenario: Scoped intake writes the record
- WHEN A scoped intake writes the intake record of a repository.
- THEN The record has no new last success entry and keeps every other entry.
Requirement: Service triage lane and scoped queue removed
The change MUST remove TRIAGE_LANE_ROWS, _SCOPED_INTAKE, enqueue_scoped and _pending_scoped, and MUST keep the intake row in DEFAULT_DUE_TABLE.
Scenario: Removed intake names are absent
- WHEN A test imports
devops_cli.roadmap.runanddevops_cli.server.serviceand looks up each removed name. - THEN The lookup finds none of
TRIAGE_LANE_ROWS,_SCOPED_INTAKE,enqueue_scopedand_pending_scoped, andDEFAULT_DUE_TABLEholds the intake row.
Requirement: Triage runs in a unit, not in the Service process
The triage work MUST run as a roadmap-intake unit and MUST NOT call plan_intake or take the Service model_call_slot.
Scenario: Intake adapter submits a unit
- WHEN A test runs
_run_intake_adapterfor a due intake row with a fake unit creator and a fake model slot. - THEN The fake unit creator records one
roadmap-intakeunit, the adapter calls noplan_intake, and the fake model slot records no take.
Requirement: Pending a person after the merge
After the merge and the release, a person SHALL run the triage unit as the App on the issues opened in the last 7 days and SHALL report the delivery-to-decision measure.
Scenario: Live proof
- WHEN The change merges and releases.
- THEN The person adds a result comment with one result line for each issue opened in the last 7 days, the p50 delivery-to-decision time of the scoped intakes, and the count of accepted
issuesdeliveries against the triage units.
Existing Tool Considered
Argo Workflows (argoproj/argo-workflows, Apache-2.0, maintained) is the open tool. The alternatives check of 2026-11-26 in the issue body gives the verdict in-use, and the repository already uses the tool. The block of that check lists what the tool covers and lacks. This proposal uses the engine for the pod-per-run execution and the template mutex, semaphore and deadline. Project code supplies the router scoped sweep and the due selection. It supplies the triage unit submission, the removal of the Service lane and queue, and the ADR 0017 record rule. The project code for those parts costs about 120,000 tokens and 6 hours to build. It costs about 10,000 tokens a month to keep and about 20,000 tokens to fix, as the issue body states.
Key questions
- Which component runs the triage unit?: Argo Workflows runs the triage unit as a pod from WorkflowTemplate
roadmap-intake. The template holds the mutexintake-<owner>.<name>, the semaphoretriageat 1 and the deadline of its run type. The project builds no workflow engine. (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/roadmap/job_launcher.py]- Chosen: Argo Workflows pod. ADR 0021 section 2 puts intake and scoped intake in the unit table, and the project already runs the controller.
- Rejected: Service poll. It keeps the in-memory queue and dies with each rollout.
- Rejected: Argo Events. It adds a second webhook receiver beside the router, and ADR 0021 rejects it.
- What does the router do for an
issuesdelivery?: It starts one scoped sweep for the repository and writes no intake due key. During a hold, it starts no sweep and writes no intake due key. The sweep runsrun_due_jobswith_intake_due, and the intake row submits the triage unit. (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, src/devops_cli/server/routes/webhooks.py, src/devops_cli/roadmap/run.py]- Chosen: Router starts a scoped sweep. The owner decision of 2026-11-13 sets it, and the due selection of the sweep picks the items.
- Rejected: Intake due mark. The owner decision of 2026-11-13 removes the intake due mark.
- Rejected: Direct unit create from the router. The owner decision of 2026-11-13 replaces it with a scoped sweep whose due selection picks the items.
- Where does the mutex
intake-<owner>.<name>live?: On WorkflowTemplateroadmap-intake. Every unit of one repository takes that mutex, and no caller can skip it. (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, docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md, docs/adr/0017-each-subscribed-webhook-event-runs-the-update-scoped-to-it.md]- Chosen: WorkflowTemplate mutex. Every unit of one repository takes the same mutex, and no caller can skip it.
- Rejected: Workflow mutex. A caller can create a Workflow without the mutex.
- Rejected: No mutex. A batch and a scoped intake can write the record at the same time.
- What limit does the semaphore
triagehave?: 1. The owner decision of 2026-11-13 sets the triage unit to one pod. That limit replaces the 2 pods of ADR 0021 section 5. (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: 1 pod. The owner decision of 2026-11-13 sets 1 for this unit.
- Rejected: 2 pods. ADR 0021 section 5 set 2 on 2026-11-11, before the 2026-11-13 owner decision.
- How many items does one triage pass take?: At most 5 items. The default
DEFAULT_ROADMAP_INTAKE_LIMITis 5. (best practice) [sources: src/devops_cli/config/defaults.py:1010, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]- Chosen: At most 5 items. The owner decision sets the cap, and ADR 0021 section 2 gives one batch of at most 5 candidates.
- Rejected: Every candidate. It ignores the cap and spends a long batch.
- Rejected: One item only. It runs no batch intake.
- What steps does the triage unit run?: The triage unit runs the intake selection, the retitle summary and the premise for each selected item. It takes at most 5 items in one pass. (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/roadmap/run.py]
- Chosen: Intake, retitle and premise in one unit. The owner decision of 2026-11-13 makes this pod the triage unit, and tracker feat(roadmap): track the roadmap pipeline split into jobs #5482 sets the pipeline split.
- Rejected: Intake only. It leaves the retitle summary and the premise outside the triage unit.
- Rejected: Separate pods for retitle and premise. It adds pods, and the owner decision sets one triage unit.
- How does a placed P0 or critical fix reach refinement?: It writes no refine mark and no
refine_duestamp. The refine row is due by its own rule, which makes refine due in the same round when the triage unit placed a critical fix or a P0 item. (best practice) [sources: src/devops_cli/roadmap/run.py]- Chosen: Refine predicate. The owner decision of 2026-11-13 removes the refine mark and leaves refine due by its predicate.
- Rejected: Refine due key or
refine_duestamp. The owner decision says no refine mark. - Rejected: DAG chain. It couples the workflows and keeps the pod alive, and ADR 0021 rejects DAG chains.
- Does the item use Argo Events or WorkflowEventBinding?: No. The existing router starts the scoped sweep. ADR 0021 rejects Argo Events and WorkflowEventBinding as a second webhook path. (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/server/routes/webhooks.py]
- Chosen: Existing router. It already verifies each delivery and starts a repository round.
- Rejected: Argo Events. It adds a second receiver, a second HMAC check and at least 4 more pods.
- Rejected: WorkflowEventBinding. It needs argo-server with a public route and repeats the router checks.
- Which Service and roadmap code does this item remove?: It removes
TRIAGE_LANE_ROWS,_SCOPED_INTAKE,enqueue_scoped,_pending_scoped, the in-pod body of_run_intake_adapterand itsmodel_call_slotuse. It keeps the intake row inDEFAULT_DUE_TABLE. [sources: src/devops_cli/roadmap/run.py:1284, src/devops_cli/roadmap/run.py:1414, src/devops_cli/roadmap/run.py:1333, src/devops_cli/server/service.py:467, src/devops_cli/server/service.py:500-585, src/devops_cli/roadmap/run.py:473-506] - What does
due_jobsname?: The repository has no functiondue_jobs. The due selection isrun_due_jobs, and the intake rule is_intake_due. [sources: src/devops_cli/roadmap/run.py] - Is fix(service): route issues webhooks past scoped intake #4412 still a dependency?: No. fix(service): route issues webhooks past scoped intake #4412 is merged and archived, and its routing is in
SCOPED_UPDATES. This item replaces that routing. [sources: src/devops_cli/roadmap/run.py:1444, openspec/changes/archive/2026-11-11-4412-route-issues-webhooks-past-scoped-intake/proposal.md] - Which items must be delivered before this one?: feat(roadmap): keep schedules, intake and ledgers in Valkey #4565 (the Valkey state) and feat(k8s): let Argo Workflows run roadmap pods in devops #4566 (the engine). ADR 0021 section 7 puts them before the intake job, and the owner decision of 2026-11-13 sets the wait.
WorkflowLauncheris the interface that feat(k8s): let Argo Workflows run roadmap pods in devops #4566 replaces. (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/roadmap/job_launcher.py]- Chosen: feat(roadmap): keep schedules, intake and ledgers in Valkey #4565 and feat(k8s): let Argo Workflows run roadmap pods in devops #4566. ADR 0021 section 7 and the owner decision of 2026-11-13 put the Valkey state and the engine first.
- Rejected: fix(service): route issues webhooks past scoped intake #4412 first. fix(service): route issues webhooks past scoped intake #4412 is merged and archived.
- Rejected: No dependency. The triage unit needs the Valkey state and the engine.
- Is the two-container template of feat(roadmap): the model container of a unit holds no credential #5506 available?: No. No WorkflowTemplate in
k8s/devops/kustomization.yamlcarries two containers at this commit. This part goes to a new issue and waits for feat(roadmap): the model container of a unit holds no credential #5506. [sources: k8s/devops/kustomization.yaml]
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 fixes data loss on rollouts and improves latency, but depends on two other items and is not a critical defect.Prevents loss of queued updates on every rollout and cuts scoped intake p50 from 64 s toward 60 s or less.Requires a new Argo WorkflowTemplate, router changes, removal of existing Service code, and coordination with #4412.Both address webhook routing for scoped intake, but #4412 fixes specific routing gaps in the Service while the candidate moves all intake execution into dedicated pods and removes the triage lane.devops-cli-service commentedon Nov 11, 2026
Refine cannot set this item to Ready at 1db29f7 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/server/service.py,src/devops_cli/server/routes/webhooks.py.devops-cli-service commentedon Nov 12, 2026
Status set to Ready at c3130a3 (see proposed design in issue body).
devops-cli-service commentedon Nov 12, 2026
Alternatives check: in-use
Reason: The searches surfaced no single tool that delivers the whole item; the closest is Argo Workflows, the Kubernetes-native workflow engine that ADR 0021/ADR 0008 already chose and that the issue names, which supplies the pod-per-run execution, the WorkflowTemplate mutex/semaphore and the template deadline, but not the webhook routing, delivery accounting or the durable due marks. Those remain the router's and Valkey's work, so it covers only part of the need.
The item already names this tool.
Tool: argoproj/argo-workflows (https://github.com/argoproj/argo-workflows)
Covers:
intake-<owner>.<name>and semaphoretriage, so batch and scoped intake of one repository share one writer and one concurrency capLacks:
roadmap:v1:due:<owner>/<name>:intakeand:refine) for holds, failed creates and placed critical fixes; Valkey holds theseenqueue_scoped,_pending_scopedandmodel_call_slotTools 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 25, 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 27, 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.