Repository navigation
Description
Problem or Motivation
ADR 0008 plans the move of the roadmap jobs onto Argo Workflows after a go verdict. The owner recorded the verdict "warm p95 11 s - go" on #1535 on 2026-11-11 (warm p95 11 s against the limit of 30 s, a cold run of 54 s, a burst p95 of 24 s, no new 429 or 5xx answer in a burst of 20 Workflows, 0 of 40 submissions failed).
No ADR records the owner direction of 2026-11-11: move as much Service work as possible to jobs, workflows and event-driven tools, and use a central Valkey store for shared data. ADR 0003, ADR 0009 and ADR 0017 still describe a Service that runs lanes and a poll timer. ADR 0017 lines 14 and 19 say that scoped intake runs on the model lane, but the code uses the triage lane (src/devops_cli/roadmap/run.py:820-831). ADR 0017 line 20 says 151 s; the live poll is 300 s.
Facts for the record (measured 2026-11-04 to 2026-11-11):
- 133 Service shutdowns in 7 days. Since 2026-11-07, 53 of 71 restarts killed a running stage round. Stage runs 1,244 s at p50 and 6,547 s at p99; the drain stops after 120 s.
- No replica receives webhooks for about 37 minutes a day (about 116 s for each rollout), because the Deployment uses
Recreatefor its ReadWriteOnce volume. GitHub does not redeliver a failed delivery by itself. - The request self-cap, the schedules, the intake record, the ledgers and the stage plan records are files on that volume. The lane queues, the delivery cache, the GraphQL pause and the job record lock are in process memory.
Proposed Solution & Architectural Design
Add docs/adr/<next free number>-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md. It records these decisions:
- The Service keeps only the webhook router (ADR 0009), the Mattermost command and
/metrics. At the end it runs no row, holds no volume and runs 2 replicas withRollingUpdate. - Each job runs in a pod of its own: one item (stage, refine, alternatives), one issue (scoped intake) or one batch (intake). A reconcile pod (the "sweep") runs the short rows on a cluster schedule every 5 minutes. Only the router and the sweep create units. No DAG chain links two jobs: a unit that makes work due sets a due mark.
- The engine is Argo Workflows (go verdict on feat(k8s): the argo workflows controller runs in its own namespace under argo cd and deploy-stack, and a --version workflow measures start-up and api-server load for the go/no-go on moving the roadmap jobs onto it #1535). The controller watches namespace
devopswith--namespaced --managed-namespace devops. The controller usesworkflowRestrictions.templateReferencing: Strict. Stage moves first to a plain Kubernetes Job on the path of feat(k8s): the implement job runs as a cluster Job on a runner image with uv, the dev dependencies and the pinned tools, submitted by the Service #2667, because it needs no shared store, and then to a WorkflowTemplate in the engine step. - A new Valkey instance
valkey-roadmap(AOF,noeviction, three ACL users) holds coordination state: request windows, holds, the identity halt, delivery ids, locks, due marks, schedules, the intake record, ledgers and stage plan records. GitHub stays the source of truth. The nine rules of the state (Valkey never holds the only copy of a decision; read GitHub before a write; GitHub wins; a lock is not the guard of a lost update, the read-back repair is; markers before a post; a TTL or one owner for each key; no credential in Valkey; a schema version in each key name; a sentinel key). - One set of
limitsmoving windows in Valkey for all pods of the App installation. - A cold pod gets warm from its image layers, a blobless clone and Valkey; Valkey does not hold the image, the clone or the uv cache.
The record amends ADR 0008 (stage Job first, the steps of the tracker replace steps 2-6, the managed namespace), ADR 0003 (the sweep and 5-minute ticks), ADR 0009 (the delivery target creates a unit; the delivery id is marked only after the create succeeds or gets 409) and ADR 0017 (a scoped update runs in its own pod under the intake mutex; intake is also due on a new issue). It corrects the stale lines of ADR 0017 by the amendment, not by an edit of the old record. It lists the rejected options with their reasons: WorkflowEventBinding, Argo Events, KEDA ScaledJobs, DBOS, a Valkey stream queue, DAG chains, a timer in the router, valkey-devops or valkey-runs for the state, a Kubernetes Lease for each lock, a hand-built Lua window, one shared installation token, a pre-pull DaemonSet as the first image fix, templateReferencing: Secure.
Names, labels, Valkey key forms, mutex names and service names are owned by the naming ADR of "feat(roadmap): name each repository's resources from one RepoRef". This ADR links to it. If that ADR is not merged yet, cite the tracker; the pull request that merges second adds the link.
Add the terms "sweep", "unit of work" and "due mark" to CONTEXT.md.
Target Subsystem
SDLC, Git & PR Governance (roadmap Service: docs/adr/, CONTEXT.md).
Existing Tool Considered
The ADR form of docs/adr/. No build. Cost: about 40,000 tokens and 1 hour to write; 0 tokens a month to keep; about 5,000 tokens to fix.
Acceptance Criteria
- The ADR records Argo Workflows as the engine with the go verdict and its numbers, and the plain stage Job as the first step.
- Each amended ADR (0003, 0008, 0009, 0017) gets a one-line "Amended on by ADR " note at its top, as ADR 0001 and ADR 0003 have.
CONTEXT.mddefines "sweep", "unit of work" and "due mark".- The ADR links to the naming ADR, or to the tracker until that ADR merges.
- The ADR text holds no hostname, private address or registry (AGENTS.md rule 10).
Dependencies
None.
Source: #4517
Proposed design
Problem statement
No ADR records the owner direction of 2026-11-11: the roadmap Service keeps only the webhook router, each roadmap job runs in its own pod, Argo Workflows is the engine, and valkey-roadmap holds the shared state. ADR 0003, ADR 0008, ADR 0009 and ADR 0017 still describe a Service that runs lanes and a poll timer, and ADR 0017 contradicts the code on the lane of scoped intake. The cost is visible: no replica receives webhooks for about 37 minutes a day, and 53 of 71 restarts killed a running stage round.
Acceptance criteria
Requirement: New ADR file
The repository SHALL hold one new ADR file under docs/adr/ whose number is the next free number and whose slug is the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.
Scenario: New ADR file
- WHEN A test lists the files of
docs/adr/before the change and after it. - THEN Exactly one new file matches
^[0-9]{4}-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state\.md$, and its number is the smallest number that the before list does not use.
Requirement: Router-only Service
The ADR SHALL record that the Service keeps only the webhook router, the Mattermost command and /metrics, runs no row, holds no volume, and runs 2 replicas with RollingUpdate.
Scenario: Router-only Service
- WHEN A test reads the new ADR text.
- THEN The text names the webhook router, the Mattermost command and
/metricsas the whole Service, and states that it runs no row, holds no volume, and runs 2 replicas withRollingUpdate.
Requirement: One pod for each unit
The ADR SHALL record that each job runs in a pod of its own — one item for stage, refine and alternatives, one issue for scoped intake, or one batch for intake — that a sweep pod runs the short rows on a 5-minute cluster schedule, that only the router and the sweep create units, and that a due mark, not a DAG chain, links the work.
Scenario: Unit per pod
- WHEN A test reads the new ADR text.
- THEN The text states one item, one issue or one batch for each pod, a sweep on a 5-minute cluster schedule, that only the router and the sweep create units, and that a unit that makes work due sets a due mark and no DAG chain links two jobs.
Requirement: Engine and go verdict
The ADR SHALL record Argo Workflows as the engine with the go verdict and its measured numbers, the plain Kubernetes Job for the stage step as the first step, the controller watching devops through --namespaced --managed-namespace devops with workflowRestrictions.templateReferencing: Strict, and the steps of the tracker in place of ADR 0008 steps 2-6.
Scenario: Engine and go verdict
- WHEN A test reads the new ADR text.
- THEN The text names Argo Workflows, the go verdict with 11 s, 30 s, 54 s and 24 s, no new 429 or 5xx in a burst of 20 Workflows and 0 of 40 submissions failed, a plain Kubernetes Job that runs the stage step first, the
devopsmanaged namespace withStricttemplate referencing, and the tracker's steps in place of ADR 0008 steps 2-6.
Requirement: Valkey state store
The ADR SHALL record the valkey-roadmap instance with AOF, noeviction, three ACL users, the coordination state it holds while GitHub stays the source of truth, the nine rules of the state, and one set of limits moving windows for all pods.
Scenario: Valkey state store
- WHEN A test reads the new ADR text.
- THEN The text names
valkey-roadmap, AOF,noeviction, three ACL users, request windows, holds, the identity halt, delivery ids, locks, due marks, schedules, the intake record, ledgers and stage plan records, GitHub as the source of truth, nine numbered rules of the state, and one set oflimitsmoving windows for all pods of the App installation.
Requirement: Cold pod warm path
The ADR SHALL record that a cold pod gets warm from its image layers, a blobless clone and Valkey, and that Valkey holds no image, clone or uv cache.
Scenario: Cold pod warm path
- WHEN A test reads the new ADR text.
- THEN The text names the image layers, a blobless clone and Valkey as the warm path, and states that Valkey holds no image, no clone and no uv cache.
Requirement: Amendment notes
Each of ADR 0003, ADR 0008, ADR 0009 and ADR 0017 SHALL get a one-line Amended on <date> by ADR <number> note at its top, and the rest of each old ADR text MUST stay unchanged.
Scenario: Amendment notes
- WHEN A test reads the top of each of the four ADR files and compares the rest of each file with its previous revision.
- THEN Each file holds a line that matches
Amended on [0-9]{4}-[0-9]{2}-[0-9]{2} byand names the number of the new ADR, and the rest of each file is unchanged.
Requirement: Glossary terms
CONTEXT.md SHALL define the terms "sweep", "unit of work" and "due mark".
Scenario: Glossary terms
- WHEN A test reads
CONTEXT.md. - THEN The text holds a bold entry for each of the three terms, and each entry has a definition.
Requirement: Naming ADR link
The ADR SHALL link to the naming ADR of "feat(roadmap): name each repository's resources from one RepoRef", or to the tracker issue of that item until that ADR merges.
Scenario: Naming link
- WHEN A test reads the new ADR text.
- THEN The text holds a Markdown link to the naming ADR file under
docs/adr/or to a tracker issue URL underhttps://github.com/dan-petty/devops-cli/issues/.
Requirement: Rejected options
The ADR SHALL list each rejected option with its reason.
Scenario: Rejected options
- WHEN A test reads the new ADR text.
- THEN The text lists WorkflowEventBinding, Argo Events, KEDA ScaledJobs, DBOS, a Valkey stream queue, DAG chains, a timer in the router,
valkey-devopsandvalkey-runs, a Kubernetes Lease for each lock, a hand-built Lua window, one shared installation token, a pre-pull DaemonSet andtemplateReferencing: Secure, each with a reason.
Requirement: No private data
The ADR text MUST hold no hostname, private address or registry.
Scenario: No private data
- WHEN A test scans the new ADR text.
- THEN The scan finds no private IPv4 address, no internal hostname and no registry name.
Requirement: ADR 0017 lane correction
The ADR SHALL record that a scoped intake update runs on the triage lane, not the model lane, in its own pod under the intake mutex, and that intake is also due on a new issue.
Scenario: ADR 0017 lane correction
- WHEN A test reads the new ADR text and
src/devops_cli/roadmap/run.py. - THEN The new ADR names the triage lane for scoped intake, its own pod under the intake mutex, and intake due on a new issue, and
TRIAGE_LANE_ROWSinsrc/devops_cli/roadmap/run.pyholds theintakerow.
Requirement: Delivery id after create
The ADR SHALL record that the delivery target creates a unit and that the delivery id is marked only after the create succeeds or gets 409.
Scenario: Delivery id after create
- WHEN A test reads the new ADR text.
- THEN The text states that the delivery target creates a unit and that the delivery id is marked only after the create succeeds or gets 409.
Existing Tool Considered
The project's ADR form under docs/adr/ covers the need, and the change builds no code. The open adr-tools CLI only scaffolds numbered Markdown files, and MADR is a template set; neither writes this repository's NNNN-slug.md numbering, its Amended on notes or the CONTEXT.md terms, so neither is adopted. Written cost from the issue: about 40,000 tokens and 1 hour to write the ADR, 0 tokens a month to keep it, and about 5,000 tokens to fix it.
Key questions
- What number does the new ADR take?: 0021.
docs/adr/holds ADR 0001 through ADR 0020, so 0021 is the smallest number that no file uses. [sources: docs/adr/0020-a-decision-point-is-a-unit-of-a-workflow-with-a-resolver-chain-and-a-rule-goes-before-a-decision-model.md:1, docs/adr/0001-github-is-the-roadmap-source.md:1] - Which engine runs the roadmap jobs?: Argo Workflows. ADR 0008 records the engine choice of 2026-10-09 and the go/no-go threshold of a 30 s warm p95; the owner recorded the go verdict of 2026-11-11 on feat(k8s): the argo workflows controller runs in its own namespace under argo cd and deploy-stack, and a --version workflow measures start-up and api-server load for the go/no-go on moving the roadmap jobs onto it #1535 (warm p95 11 s, cold 54 s, burst p95 24 s, no new 429 or 5xx in a burst of 20 Workflows, 0 of 40 submissions failed). The controller moves to a managed namespace
devopswith--namespaced --managed-namespace devopsandworkflowRestrictions.templateReferencing: Strict. (best practice) [sources: docs/adr/0008-argo-workflows-run-the-roadmap-jobs-after-a-measured-go.md:3, docs/adr/0008-argo-workflows-run-the-roadmap-jobs-after-a-measured-go.md:7, https://github.com/feat(roadmap): move Service work to Workflows and Valkey #4517]- Chosen: Argo Workflows. ADR 0008 records the engine choice and its go/no-go threshold, and the umbrella feat(roadmap): move Service work to Workflows and Valkey #4517 records the owner's go verdict of 2026-11-11 with the measured numbers.
- Rejected: Plain Kubernetes Jobs only. The project would build and keep its own retry, order and status layer, which Argo Workflows already has.
- Rejected: Argo Events. The webhook router already creates units, and an event bus adds a component and a second path.
- Rejected: KEDA ScaledJobs. KEDA scales on a metric, and a due mark is not a metric.
- Rejected: DBOS. It has no queue pause for the GraphQL hold and a small community (ADR 0008).
- Where does the shared coordination state live?: A new
valkey-roadmapinstance with AOF,noevictionand three ACL users. It holds the request windows, holds, identity halt, delivery ids, locks, due marks, schedules, intake record, ledgers and stage plan records; GitHub stays the source of truth.valkey-runsalready uses AOF andnoevictionfor its own data, so the new instance follows that pattern rather than sharing another workload's keys. (best practice) [sources: k8s/llm/valkey-runs.yaml:88, k8s/llm/valkey-runs.yaml:91, tests/k8s/test_k8s_valkey_stack.py:1, https://github.com/feat(roadmap): move Service work to Workflows and Valkey #4517]- Chosen: New
valkey-roadmapinstance. One workload owns the eviction policy and the persistence, andnoevictionkeeps a lock and a due mark. - Rejected:
valkey-devopsorvalkey-runs. Another workload's keys and eviction policy would decide the roadmap's state. - Rejected: Files on the RWO volume. The volume forces
Recreate, and no replica receives webhooks for about 37 minutes a day. - Rejected: Process memory. Two replicas cannot share it, and a restart loses it.
- Chosen: New
- How many replicas does the Service run, and with which strategy?: 2 replicas with
RollingUpdateand no volume. The current Deployment runs one replica withRecreatebecause itslocal-pathclaim is ReadWriteOnce, so a rollout stops the only pod and makes the webhook gap. (best practice) [sources: k8s/devops/roadmap-service/deployment.yaml:13, k8s/devops/roadmap-service/deployment.yaml:15, https://github.com/feat(roadmap): move Service work to Workflows and Valkey #4517]- Chosen: 2 replicas with
RollingUpdate, no volume. A rollout keeps one pod serving webhooks, and the router holds no state. - Rejected: 1 replica with
Recreate. Each rollout makes a webhook gap of about 116 s, and GitHub does not redeliver a failed delivery. - Rejected: 2 replicas with
RollingUpdateand an RWX volume. The state keeps one owner and one backup, and a network filesystem adds latency.
- Chosen: 2 replicas with
- How does the ADR correct the stale lines of ADR 0017?: By the
Amended onnote on ADR 0017, not by an edit of its text. ADR 0001 and ADR 0003 keep their text and take the note, so a reader sees what changed and when. (best practice) [sources: docs/adr/0001-github-is-the-roadmap-source.md:3, docs/adr/0003-polling-is-how-the-roadmap-sees-changes.md:3, docs/adr/0003-polling-is-how-the-roadmap-sees-changes.md:5]- Chosen: Amendment note. ADR 0001 and ADR 0003 keep their text and take an
Amended online, so a reader sees what changed and when. - Rejected: Edit the old lines. It rewrites the record and hides the change from a reader of the history.
- Chosen: Amendment note. ADR 0001 and ADR 0003 keep their text and take an
- Which lane runs a scoped intake update?: The triage lane.
TRIAGE_LANE_ROWSholds theintakerow (src/devops_cli/roadmap/run.py:828-837), and intake calls no model. ADR 0017 lines 14 and 19 still say the model lane, so the new ADR corrects the record. (best practice) [sources: src/devops_cli/roadmap/run.py:828, src/devops_cli/roadmap/run.py:830, docs/adr/0017-each-subscribed-webhook-event-runs-the-update-scoped-to-it.md:14, docs/adr/0017-each-subscribed-webhook-event-runs-the-update-scoped-to-it.md:19]- Chosen: Triage lane.
TRIAGE_LANE_ROWSinsrc/devops_cli/roadmap/run.pyholds theintakerow, and intake calls no model. - Rejected: Model lane. ADR 0017 lines 14 and 19 state it, but the code does not do it, and the new ADR corrects the record.
- Chosen: Triage lane.
- How does the controller watch the
devopsnamespace?: The ADR records a managed namespace:--namespaced --managed-namespace devops, withworkflowRestrictions.templateReferencing: Strictso a WorkflowTemplate stays indevopsand an inline template stays allowed. The controller today watches onlyargo-workflows(singleNamespace: true), so this is a change that the ADR records. (best practice) [sources: https://github.com/feat(roadmap): move Service work to Workflows and Valkey #4517, k8s/README.md:901, k8s/argo-workflows/values.yaml:24, docs/adr/0008-argo-workflows-run-the-roadmap-jobs-after-a-measured-go.md:9]- Chosen: Namespaced to
devopswithStrict. The controller runs a Workflow only indevops, andStrictkeeps each template in the same namespace while an inline template stays allowed. - Rejected: Cluster-wide controller. The controller could run a Workflow in any namespace.
- Rejected:
templateReferencing: Secure. It makes every Workflow useworkflowTemplateRef, so the plain stage Job step cannot use an inline template.
- Chosen: Namespaced to
- Does the ADR wait for the naming ADR to merge?: No. The umbrella feat(roadmap): move Service work to Workflows and Valkey #4517 lists this record and the naming item as
start nowwith no dependency, so this ADR lands now (fetched 2026-11-11). It links to the naming ADR file when that file exists, or to the naming item's tracker issue until then; the pull request that merges second adds the link. (best practice) [sources: https://github.com/feat(roadmap): move Service work to Workflows and Valkey #4517]- Chosen: Link to the tracker until the naming ADR merges. The record lands now, and the pull request that merges second adds the link.
- Rejected: Wait for the naming ADR. It blocks this record on an unrelated item, and the umbrella sets no dependency.
- Rejected: Define the names in this ADR. Two owners of one name set make a later rename a two-file change.
- How does the sweep run?: A reconcile pod, the
sweep, runs the short rows on a cluster schedule every 5 minutes. Only the router and the sweep create units; a unit that makes work due sets a due mark, so no DAG chain links two jobs. The sweep replaces the poll and the lanes that the Service runs today. (best practice) [sources: https://github.com/feat(roadmap): move Service work to Workflows and Valkey #4517, docs/adr/0003-polling-is-how-the-roadmap-sees-changes.md:7, k8s/README.md:696]- Chosen: 5-minute sweep pod. It runs the short rows without a Service row or a volume, and the router and the sweep are the only creators.
- Rejected: Keep the poll timer in the router. The router would hold a schedule and a row, and the Service is to keep only the router.
- Rejected: DAG chain per unit. A due mark lets the sweep pick up the next unit, and a DAG chain would tie two jobs together.
- What does the ADR 0009 amendment record about the delivery id?: The delivery target creates a unit, and the delivery id is marked only after the create succeeds or gets 409. A failed create is therefore retried, and GitHub does not need to redeliver it. (best practice) [sources: docs/adr/0009-one-webhook-router-delivers-each-event-to-the-consumers-subscribed-to-it.md:5, docs/adr/0009-one-webhook-router-delivers-each-event-to-the-consumers-subscribed-to-it.md:9, https://github.com/feat(roadmap): move Service work to Workflows and Valkey #4517]
- Chosen: Mark after the create succeeds or gets 409. A failed create stays retryable, and a repeated create that gets 409 is already done.
- Rejected: Mark before the create. A failed create would lose the delivery, and GitHub does not redeliver a failed delivery by itself.
- Rejected: Rely on GitHub redelivery. GitHub never sends a failed delivery again by itself.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
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.
docsprefix of the title gives the type.(roadmap)scope of the title gives the scope.It corrects stale ADRs that could mislead developers but does not block a code change.It keeps the architecture record accurate so future work builds on the right decisions.It requires writing one new ADR and amending four existing ones with rejected options.Both record roadmap service decisions in ADRs, but #756 recorded the initial design and polling decisions while the candidate records the later move to jobs and Valkey.devops-cli-service commentedon Nov 11, 2026
Status set to Ready at 5f75d25 (see proposed design in issue body).
feat(roadmap): name each repository's resources from one RepoRef (#4612)