Repository navigation
Description
Refreshed plan (2026-10-17, unblocking review)
This section supersedes any text below that conflicts with it.
Decisions
- Decision D4 (owner, 2026-10-17): "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 is re-scoped to step 1 now (install the Argo Workflows controller and measure, with an executor ServiceAccount and Role, API-server egress, no devops-cli Secret mount, deploy-stack registration, an AppProject destination, and a --version template that makes no GitHub request); steps 2-6 are filed after its go/no-go." This is the split the 2026-10-10 comment promised and never made.
- Decision D1 (owner, 2026-10-17): "chore(service): the roadmap service stays at 0 replicas, and its development is blocked, while its machine account is suspended #1562 holds the roadmap Service's deployment only; Service code is built, tested offline and merged at 0 replicas (replicas: 0, its test, and the no-scale/no-restart/no-secret-push rules stay)." Step 1 does not touch the Service, namespace
devopsor any GitHub identity. - Decision D2 (owner, 2026-10-17): "in-cluster jobs act as an organization-owned GitHub App installation (organization takes the owner's current login after the personal account is renamed); appeal the suspension in parallel." Steps 2-6 run roadmap jobs in the cluster, so they wait for that identity. Step 1 does not.
- Decision D3 (owner, 2026-10-17): "feat(service): one webhook router verifies each provider its own way, parses a typed payload and delivers each event only to the consumers subscribed to it #1386 and feat(service): each subscribed webhook event runs the roadmap update scoped to it at once, and the 5-minute poll reconciles board edits and lost deliveries #1533 build on today's in-process lanes, with schedules left to 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's CronWorkflows; 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 step 3 later swaps the delivery seam." So the migration table's feat(service): one webhook router verifies each provider its own way, parses a typed payload and delivers each event only to the consumers subscribed to it #1386 and feat(service): each subscribed webhook event runs the roadmap update scoped to it at once, and the 5-minute poll reconciles board edits and lost deliveries #1533 rows change (see Scope).
- Decision D5 (owner, 2026-10-17): "Argo CD records deployments with its own Deployments-only GitHub App, with no Service hop; opt-in for GitHub-sourced single-source Applications; the App's owner follows D2." So feat(k8s): argo cd records each single-source github application's deploy outcome as a github deployment on the synced commit, through its own deployments-only github app #1387 is no longer a later consumer of this engine.
- Decision D10 (owner, 2026-10-17): "perf(roadmap): a settled item costs no body read or model call until its text changes, with refine judging it from the listing it already read #1539 is split; intake's embeddings are cached in a password-protected Valkey (new item), never the shared password-less valkey." Only perf(roadmap): a settled item costs no body read or model call until its text changes, with refine judging it from the listing it already read #1539's refine half has to land before step 5.
- Decision D11 (owner, 2026-10-17): "feat(rag): Index managed repos, exclude private from unscoped search #1389 is split into a CLI ingestion pass now and an Argo cluster lane later (new item)." The cluster lane builds on step 2.
- Decision D16 (owner, 2026-10-17): "v0.2.38 may go over the cap of 16 for now; unblocking work goes first." This item stays in v0.2.38 as P0.
- The measurement runs
--version, notdevops roadmap metrics. Reason:devops roadmaphas nometricscommand, the metrics job reads its clone and GitHub, and--versionexits in its eager callback before any command runs. - The controller runs in a new namespace,
argo-workflows, with Pod Securityrestricted(asdevopshas) andPrune=false,Delete=false. Reason: the measured pods run under the same restriction step 2's jobs will, and a bareargowould be easy to confuse withargocd. - Every pod in
argo-workflowsis admitted byrestricted: the controller pod gets aRuntimeDefaultseccomp profile, and the executor's init and wait containers get a restrictedsecurityContext. Reason: chart 2.0.13 leavescontroller.podSecurityContextandexecutor.securityContextempty and its controller container sets no seccomp profile, so its defaults would be rejected. - In step 1 the controller watches only its own namespace; step 2 adds
devops. Reason: step 1 needs no access todevops, so its RBAC stays namespaced. - Nothing under
k8s/devops/changes. Reason: chore(service): the roadmap service stays at 0 replicas, and its development is blocked, while its machine account is suspended #1562's body records that thedevopsApplication's sync was turned off by hand, and D1 keeps the Service's deployment held. - The chart release is registered in deploy-stack's
infrastack, next toargocd. Reason: the argo chart repository is already ininfra, and deploying thedevopsstack runskubectl rollout restart deploy/roadmap-service, which D1 rules out. - The chart installs its minimal CRDs (
crds.full: false) withcrds.keep: trueand, throughcrds.annotations, the sameServerSideApply=true,Prune=false,Delete=falsesync options Argo CD's CRDs carry. Reason: chart 2.0.13's default (crds.full: true) applies full CRDs from a pre-install hook Job whose ClusterRole may create, patch and update every CRD in the cluster, andcrds.annotationsapplies only to the minimal CRDs. - The WorkflowTemplate is a plain manifest in
k8s/argo-workflows/, not part of the chart's values. Argo CD syncs it through the path Application withSkipDryRunOnMissingResource=true, asingressdoes. deploy-stack applies it after the Helm releases, teardown-stack deletes it, and the dry run lists it. Reason: Helm builds every object of a release against the API server before it runs the release's hooks or creates anything, so a WorkflowTemplate in the chart'sextraObjectswould fail a fresh deploy-stack, and deploy-stack applies plain manifests before any chart. feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 and fix(k8s): deploy-stack warns about GPU nodes no Ollama tier accepts, k8s/README.md documents GPU placement, and the gateway's ServiceMonitor moves to the llm stack #1367 need the same post-Helm step; whichever of the three lands first adds it. - The template sets
DEVOPS_CLI_TELEMETRY_ENABLED=false, and the perimeter allows no public HTTPS and no OTLP egress. Reason:--versionneeds neither and exits before any tracer is built, and the variable keeps the template from exporting if its arguments ever change. OTLP export from the controller and the jobs moves to step 2. - The chart is pinned to argo-helm's newest
argo-workflowsrelease on the day the PR opens. The body's 2.0.12 / v4.1.5 dates from 2026-10-09; 2.0.13 / v4.1.5, published 2026-10-14, is the newest today. The same PR moves the argo CLI pin from v4.1.4 to the chart's app version. Reason: the measurement submits its Workflows with that CLI. - The engine ADR moves into step 1, at whatever ADR number is next free when the PR opens (0006 today). Reason: D4's recommendation puts it there, and feat(service): each subscribed webhook event runs the roadmap update scoped to it at once, and the 5-minute poll reconciles board edits and lost deliveries #1533, whose ADR the body named for it, waits on feat(service): one webhook router verifies each provider its own way, parses a typed payload and delivers each event only to the consumers subscribed to it #1386. feat(service): each subscribed webhook event runs the roadmap update scoped to it at once, and the 5-minute poll reconciles board edits and lost deliveries #1533's ADR then records only the scoped updates.
- Go/no-go thresholds: go when, from a Workflow's creation to Succeeded, the warm p95 is at most 30 seconds, and a burst of 20 Workflows finishes with no 429 or 5xx from the API server. Reason: the body's cluster check, which moves to the later steps, requires a merged pull request's close workflow to start and finish within one minute, and this keeps half of that minute for the job itself.
Scope
- This item now delivers step 1 only: the controller with its namespace, perimeter and executor identity, one
--versionWorkflowTemplate, offline tests, the ADR and docs, and then the measured go/no-go. - Steps 2-6 are filed only after a go, each as a split with
budget/borrowed, and each says "Depends on" the step before it and on step 1's go:- step 2, lanes, mutexes and CronWorkflows;
- step 3, the router submits Workflows, after feat(service): one webhook router verifies each provider its own way, parses a typed payload and delivers each event only to the consumers subscribed to it #1386 and feat(service): each subscribed webhook event runs the roadmap update scoped to it at once, and the 5-minute poll reconciles board edits and lost deliveries #1533 (D3);
- step 4, the
github-graphqlsemaphore; - step 5, the background enhancement lane, after perf(roadmap): a settled item costs no body read or model call until its text changes, with refine judging it from the listing it already read #1539's refine half (D10);
- step 6, cleanup.
- All of steps 2-6 also depend on the GitHub App identity item (D2).
- These parts of this body move unchanged into steps 2-6: the design, the migration table, the offline rendering tests (one lane mutex per template, the
github-graphqlsemaphore, noretryStrategyon a step that writes to GitHub), the router test, the cluster checks, the deletions, and the remaining docs (AGENTS.md's roadmap-service section, the Service setup ink8s/README.md, RELEASE_CYCLE.md, CONTEXT.md's Lane). - Changes to the migration table: feat(k8s): argo cd records each single-source github application's deploy outcome as a github deployment on the synced commit, through its own deployments-only github app #1387 is removed (D5). feat(rag): Index managed repos, exclude private from unscoped search #1389's row now points to its new cluster-lane item (D11). The fix(roadmap): the service runs close and reprioritize in their own lane, so a slow model-bound intake or refine round never holds up a release #1532 and fix(roadmap): a GraphQL budget refusal pauses every Service worker until the reset, and each Service round ends with its spend line #1400 rows are history, since both have shipped. The feat(service): one webhook router verifies each provider its own way, parses a typed payload and delivers each event only to the consumers subscribed to it #1386 and feat(service): each subscribed webhook event runs the roadmap update scoped to it at once, and the 5-minute poll reconciles board edits and lost deliveries #1533 rows build on today's in-process lanes, with schedules left to CronWorkflows, and step 3 swaps their delivery seam for Workflow submits (D3). feat(service): each subscribed webhook event runs the roadmap update scoped to it at once, and the 5-minute poll reconciles board edits and lost deliveries #1533's ADR no longer records the engine.
Delivery
- One PR (M), "Fixes 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". It contains:
- the chart Application
k8s/argocd/apps/argo-workflows.yaml, shaped likeargocd-image-updater.yaml; - the chart's values (controller, CRDs and executor identity and
securityContext); k8s/argo-workflows/with the WorkflowTemplate, the perimeter and their kustomization;- a path Application for that kustomization, as
otelhas fork8s/otel/, withSkipDryRunOnMissingResource=trueasingresshas; - the namespace, the AppProject destination and the deploy-stack registration;
- deploy-stack's post-Helm step for the WorkflowTemplate, unless feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 or fix(k8s): deploy-stack warns about GPU nodes no Ollama tier accepts, k8s/README.md documents GPU placement, and the gateway's ServiceMonitor moves to the llm stack #1367 has added it first;
- the argo CLI pin, the offline tests, the ADR, the
k8s/README.mdinstall section andchangelog.d/1535.md.
- the chart Application
Acceptance criteria
- The chart Application pins argo-helm's
argo-workflowschart at an exact version, and the release is registered in_HELM_RELEASES_BY_STACK["infra"].test_helm_sources_pinned_versionstherefore checks its pin, namespace and values file, anddevops k8s deploy-stack --stack allinstalls it. -
k8s/namespaces.yamladdsargo-workflowswith Pod SecurityrestrictedandPrune=false,Delete=false. - The homelab AppProject lists
argo-workflowsas a destination. - A test asserts that every Application's destination namespace is one its project allows.
- An offline test checks the controller values:
- one replica,
LEADER_ELECTION_DISABLE=true, and a rollout that never runs two controllers; - it watches only its own namespace;
- no argo-server, no database and no workflow archive;
- its CRDs are the minimal ones (
crds.full: false) withcrds.keep: true, and carry the sameServerSideApply=true,Prune=false,Delete=falsesync options as Argo CD's; - the controller pod has a
RuntimeDefaultseccomp profile, and the executor's init and wait containers run withallowPrivilegeEscalation: falseand all capabilities dropped, sorestrictedadmits every pod.
- one replica,
- The executor ServiceAccount's Role grants only
createandpatchonworkflowtaskresults, and the template runs as that ServiceAccount. - An offline test checks the WorkflowTemplate:
- it runs the Service image with args
["--version"]only; - it has the cluster job template's pod and container
securityContext; - it has no
envFrom, no Secret volume and no Secret env; - it sets
DEVOPS_CLI_TELEMETRY_ENABLED=falseand anactiveDeadlineSeconds; - finished Workflows and their pods are garbage-collected.
- it runs the Service image with args
- An offline test asserts that no object in
k8s/argo-workflows/(rendered withkubectl kustomize) and nothing in the chart's values references Secretdevops-cli. - deploy-stack applies the WorkflowTemplate after the Helm releases, teardown-stack deletes it, and the dry run lists it.
-
k8s/argo-workflows/networkpolicy.yamlis listed in_MANIFESTS_BY_STACK["infra"], and an offline test checks its rules:- ingress only for the metrics scrape from
monitoring; - egress only to DNS and to the API server on 6443, through an ipBlock that excludes the cloud metadata address;
- no public HTTPS.
- ingress only for the metrics scrape from
- The controller's metrics are scraped through a ServiceMonitor, and the Scrape Ownership table names that scrape.
- The argo CLI pin matches the chart's app version.
- The ADR records the engine choice (from the research summary below) and the go/no-go thresholds.
-
k8s/README.mdgains the install, the measurement procedure and the new directory entries. -
changelog.d/1535.mdexists, anddevops docs checkanduv run devops cipass. - Cluster checks after Argo CD syncs the merge (an agent may run them on the homelab):
- both Applications are Synced and Healthy;
- the controller runs one replica;
- the
argoproj.ioWorkflow CRDs exist; - nothing in namespace
devopschanged, androadmap-serviceis still at 0 replicas.
- Go/no-go measurement (an agent may run it on the homelab), recorded as a comment 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:
- submit 20 sequential Workflows from the template with the argo CLI (no argo-server), reporting the cold first run separately;
- submit a burst of 20;
- record creation-to-Succeeded p50 and p95;
- record API-server requests per Workflow, from
apiserver_request_total(read withkubectl get --raw /metrics) before and after each batch; - record the controller's CPU and memory;
- record the verdict against the thresholds above.
- Pending a person: after a go, file steps 2-6 with
devops roadmap intake --title "<title>" --body-file <file> --confirm, with the dependencies listed in Scope. - Pending a person: after a no-go, the owner chooses between re-scoping the engine and the runner-up in the research summary.
Current references
devops roadmapsubcommands (none ismetrics):src/devops_cli/commands/roadmap.py:156-600.- The metrics job reads its clone (
:631) and GitHub (:634,:641):src/devops_cli/roadmap/run.py:611-645. - The eager
--versioncallback:src/devops_cli/main.py:219-224, made eager at:235. The tracer is built only when a subcommand runs:src/devops_cli/main.py:119-124. - The telemetry switch:
src/devops_cli/config/env.py:83. - Cluster job template:
securityContextatk8s/devops/cronjob.yaml:30-47,--versionat:41, and thedevops-cliSecret that step 1 must not mount at:48-50. - Application shape:
k8s/argocd/apps/argocd-image-updater.yaml:8-33. A path Application:k8s/argocd/apps/otel.yaml:10-13. A path Application that skips the dry run for another Application's custom resources:k8s/argocd/apps/ingress.yaml:27-28. - Homelab AppProject destinations, which have no
argo-workflowsyet:k8s/argocd/apps/projects.yaml:22-38. - The
devopsnamespace'srestrictedlabels:k8s/namespaces.yaml:88-98. - API-server egress through an ipBlock:
k8s/cloudflared/networkpolicy.yaml:43-53. - deploy-stack:
- the argo repository in
infra:src/devops_cli/commands/k8s/stack_lifecycle.py:56; - chart releases:
:79-172; inframanifests::177-180;- the
devopsrestart::734-739; - manifests applied before charts:
:1080-1094.
- the argo repository in
- Tests:
- project and destination:
tests/test_k8s_argocd_apps.py:52-69; - chart pin:
:104-142; - namespace safety, rendered offline with
kubectl kustomize::277-309; - Argo CD's CRD sync options:
:332-342.
- project and destination:
- argo CLI pin (v4.1.4 at
:112):src/devops_cli/tools_lock/tools.lock:104-125. - Container CPU and memory, already scraped:
k8s/monitoring/k8s-monitoring-values.yaml:36-37. ServiceMonitors scraped by Alloy::146-148. - Scrape Ownership table:
k8s/README.md:151. Roadmap Service suspension notice:k8s/README.md:361-363. docs/adr/holds 0001-0005.- For steps 2-6, these replace the body's stale line references:
DEFAULT_DUE_TABLEissrc/devops_cli/roadmap/run.py:704(not:619), with the lanes at:657and:683andSERVICE_JOBSat:1035;- in
src/devops_cli/server/service.py:TriggerBatchat:45,RoundPauseat:79,RepoWorkerat:130,_tick_loopat:350; DeliveryLRUCacheissrc/devops_cli/server/routes/webhooks.py:52.
Dependencies and order
- chore(service): the roadmap service stays at 0 replicas, and its development is blocked, while its machine account is suspended #1562 was closed (completed) on 2026-10-11, with no release. The Service is still held at
replicas: 0(k8s/devops/roadmap-service/deployment.yaml:12). Under D1 that hold covers deployment only, and step 1 touches none of it. - The block-scope docs item ("docs(agents): the roadmap service's suspension holds its deployment, not its development ...") is not yet filed. It is P0 and first in v0.2.38's staging.
- Until that item merges,
AGENTS.md:151keeps this item blocked. Once it is filed,status/blockedis re-pointed to it with a comment, and a person removes the label when it merges. - fix(roadmap): the service runs close and reprioritize in their own lane, so a slow model-bound intake or refine round never holds up a release #1532 (closed, v0.2.33) and fix(roadmap): a GraphQL budget refusal pauses every Service worker until the reset, and each Service round ends with its spend line #1400 (closed, v0.2.29) have shipped and no longer block anything here.
- perf(roadmap): a settled item costs no body read or model call until its text changes, with refine judging it from the listing it already read #1539 is open, in v0.2.38 and
status/blocked. It blocks step 5 only, so its native blocked-by link goes on step 5's item, not on this one. - The GitHub App identity item (D2) is not yet filed. fix(roadmap): the job clone and the change filter fail closed when the session login lookup fails, instead of falling back to a made-up devops-cli identity #1409 (open, v0.2.38), the multi-line secret item (not yet filed) and refactor(github): the github session owns transport, ledger, error classes and link pagination #983's PR 1 (refactor(github): the github session owns transport, ledger, error classes and link pagination #983 is open, v0.2.37) come before it. It blocks steps 2-6 only.
- feat(service): one webhook router verifies each provider its own way, parses a typed payload and delivers each event only to the consumers subscribed to it #1386 (open, v0.2.38,
status/blocked) and feat(service): each subscribed webhook event runs the roadmap update scoped to it at once, and the 5-minute poll reconciles board edits and lost deliveries #1533 (open, no release,status/blocked) block step 3 only. - feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 (open, v0.2.38) and fix(k8s): deploy-stack warns about GPU nodes no Ollama tier accepts, k8s/README.md documents GPU placement, and the gateway's ServiceMonitor moves to the llm stack #1367 (open, no release) need the same post-Helm deploy-stack step. Neither blocks this item; whichever of the three lands first adds the step, and the others reuse it.
- This item is in v0.2.38, P0, one PR. Other v0.2.38 PRs may touch
projects.yaml,namespaces.yamlorstack_lifecycle.py; if one merges first, this PR rebases on it.
Requested by the owner, 2026-10-09:
the services is ultimately going to need to manage both event drive triggers and scheduled tasks in order to integrate well with external services and maintain a consistent picture of state
It would be nice to leverage an existing workflow engine or queue implementation rather than trying to implement our own cleanly
I'm also picturing [...] issue enhancement processes that can truly run in the background without blocking releases and triage, while doing investigation, validation, enhancement, and correlation.
Problem
Checked at release/v0.2.33.
-
The Service hand-rolls its engine.
server/service.pyhas:- a
RepoWorkerthread and queue per repository; TriggerBatchcoalescing;- a 5-minute
_tick_loop; RoundPause(fix(roadmap): a GraphQL budget refusal pauses every Service worker until the reset, and each Service round ends with its spend line #1400), the hold until the GraphQL reset.
server/routes/webhooks.pykeeps an in-memoryDeliveryLRUCache.DEFAULT_DUE_TABLE(roadmap/run.py:619) holds each job's interval. - a
-
Each planned change adds more of it. fix(roadmap): the service runs close and reprioritize in their own lane, so a slow model-bound intake or refine round never holds up a release #1532 (v0.2.33) splits each worker into a release lane and a model lane. feat(roadmap): intake runs in its own triage lane on a fast devops-triage model, so a new p0 or p1 item gets its priority within one poll #1534 adds a triage lane. feat(service): one webhook router verifies each provider its own way, parses a typed payload and delivers each event only to the consumers subscribed to it #1386 adds consumers with their own events and schedules. feat(service): each subscribed webhook event runs the roadmap update scoped to it at once, and the 5-minute poll reconciles board edits and lost deliveries #1533 runs event-scoped updates. Each one adds hand-rolled queueing, scheduling or locking.
-
Queued work is not durable. A queued trigger lives only in memory. A pod restart drops it, and the next poll is the only recovery.
-
Enhancement runs inside intake's rounds. Refine is the only background enhancement, and it shares rounds with intake.
Decision (owner, 2026-10-09)
- Engine. Argo Workflows. It fits the existing Argo CD toolset and is widely used in enterprises. It was chosen over DBOS in-process, RQ on Valkey, Temporal, Hatchet and others; the research summary is below.
- fix(roadmap): the service runs close and reprioritize in their own lane, so a slow model-bound intake or refine round never holds up a release #1532 ships first. It ships in v0.2.33 as the thread split. This item moves its lanes onto Argo and deletes the hand-rolled worker.
- Enhancement folds in. Background enhancement (investigation, validation, enhancement, correlation) is part of this item. It runs in a lane that never blocks release or triage.
- refactor(ai): the durable resolver offers only the engines that work, and the unread
ai.durablesettings are removed #1121 is unchanged.
Proposed design
Install. An Argo CD Application, shaped like k8s/argocd/apps/argocd-image-updater.yaml:
- argo-helm's
argo-workflowschart, pinned at an exact version (2.0.12 / app v4.1.5 on 2026-10-09). - workflow-controller only: one replica,
LEADER_ELECTION_DISABLE=true, and a rollout that never runs two controllers. - No argo-server, no Argo Events and no database. Locks are ConfigMap-based, and the workflow archive is not used.
- Controller metrics go to Prometheus and traces to the OTel collector.
Jobs as templates (k8s/devops/roadmap-workflows/):
-
One WorkflowTemplate per job. Each runs
devops roadmap <job>for one repository in the Service image (theservice:latestdigest that Image Updater rolls). -
Lanes are templated mutexes:
roadmap-<repo>-release: close, reprioritize, metrics;roadmap-<repo>-triage: intake (feat(roadmap): intake runs in its own triage lane on a fast devops-triage model, so a new p0 or p1 item gets its priority within one poll #1534);roadmap-<repo>-enhance: refine and the enhancement steps.
Each lane runs one workflow at a time per repository. A slow enhancement workflow never holds the release or triage mutex.
-
Cross-job triggers stay in code. For example, a reprioritize run that makes refine due submits the enhancement workflow.
Schedules. CronWorkflows replace the due table's intervals and the 5-minute poll:
- reconcile every 5 minutes (
service.poll_interval_seconds); - close, intake and refine hourly;
- metrics every 15 minutes;
- reprioritize daily.
Each uses concurrencyPolicy: Forbid plus its lane mutex, and startingDeadlineSeconds so that a run missed during a controller restart is replayed. The due rules that read state (reprioritize.is_due, _intake_due) stay in the jobs.
Events.
- The Service keeps its routes and feat(service): one webhook router verifies each provider its own way, parses a typed payload and delivers each event only to the consumers subscribed to it #1386's typed router. Before it returns 2xx, the router creates a Workflow through the Kubernetes API, named from the delivery ID.
- The delivery is then durable in the API server, and a repeated delivery fails on the name, so
DeliveryLRUCachegoes. - A Mattermost slash command (feat(roadmap): a /roadmap slash command in mattermost shows each repository's roadmap service state, answered in-cluster through the service's webhook router #1395) still answers in its route.
GraphQL hold (replaces RoundPause):
- Every template that spends GraphQL takes a ConfigMap semaphore,
github-graphql. - A job that finds the budget exhausted sets the limit to 0. It then submits a workflow that suspends until the reset time and restores the limit.
- The controller re-reads the limit at every check, and a limit of 0 holds every waiter.
State.
- Task pods mount the existing roadmap-service PVC (local-path, ReadWriteOnce). local-path's node affinity schedules them onto that volume's node, and ReadWriteOnce allows several pods on one node.
schedule.jsonandintake.jsonare written atomically per job.
Background enhancement lane. One WorkflowTemplate per item, on the enhance mutex and devops-background. It has four steps, each its own retry boundary:
- Investigation: refine's research step (code, docs, public search).
- Validation: checks the item's
file:linereferences and stated facts against the current release branch, and marks stale ones. - Enhancement: refine's proposal (scope, acceptance criteria, Feasibility).
- Correlation: links duplicates and related items, from the embedding neighbours intake already computes.
Its writes are comments and field edits. A second run with no change writes nothing.
Retries. retryStrategy goes only on read-only or idempotent steps. A step that writes to GitHub gets no retry, as backoffLimit: 0 in k8s/devops/cronjob.yaml does today.
Migration, mapped onto open items
| Item | Change |
|---|---|
| #1532 (v0.2.33) | Ships as the thread split. Its acceptance tests become the lane-mutex checks here, and its worker code is deleted here. |
| #1534 | Its triage lane becomes the triage mutex. If it lands before this item, it extends #1532's lanes. |
| #1386 | A consumer declares its events, its schedules (CronWorkflows) and its lane. Delivery to a consumer is a Workflow submit, so the router needs no dispatch queue or threads. |
| #1533 | Each scoped update is a Workflow on the lane its table names, and the reconcile CronWorkflow is the poll. Its new ADR also records the engine. |
| #1400 (shipped) | RoundPause is replaced by the semaphore. |
| #1387, #1389, #1395 | Later consumers declare a template, a lane and their schedules. |
Acceptance criteria
- Engine install:
tests/test_k8s_argocd_apps.pycovers the new Application (an exact chart pin, astest_helm_sources_pinned_versionschecks).- On the cluster, Argo CD syncs it, the controller runs one replica, and the
argoproj.ioWorkflow CRDs exist.
- Offline rendering tests:
- Every WorkflowTemplate names exactly one lane mutex, and no release or triage template names the
enhancemutex. - Every template that spends GraphQL names the
github-graphqlsemaphore. - No template whose step writes to GitHub has a
retryStrategy.
- Every WorkflowTemplate names exactly one lane mutex, and no release or triage template names the
- Router test (fake Kubernetes API, no network): a delivery creates exactly one Workflow, named from its delivery ID, before the 2xx; a repeated delivery creates none.
- Cluster checks (an agent may run them on the homelab):
- With an enhancement workflow waiting on a slow model, a merged pull request's close workflow starts and finishes within one minute.
- With the semaphore at 0, GraphQL workflows wait, and they start once it is raised.
- Deleted:
RepoWorker,TriggerBatchcoalescing,_tick_loop,RoundPause's wait,DeliveryLRUCache, and the due table's intervals. - Docs and changelog:
- the ADR with feat(service): each subscribed webhook event runs the roadmap update scoped to it at once, and the 5-minute poll reconciles board edits and lost deliveries #1533 records the engine;
- AGENTS.md's roadmap-service section;
- k8s/README.md: the install and the Service setup;
- RELEASE_CYCLE.md;
- CONTEXT.md: Lane;
changelog.d/<issue>.md.
Feasibility
Does not fit one PR. Proposed split, filed in order when this item is refined:
- Install and measure. The controller (Application, values, NetworkPolicy, metrics) and one template (
devops roadmap metrics). Measure task start-up time and API-server load on k3s. Go/no-go before step 2. - Release and triage lanes. Templates, mutexes and CronWorkflows; the Service stops running those jobs in-process.
- Router submits Workflows. feat(service): one webhook router verifies each provider its own way, parses a typed payload and delivers each event only to the consumers subscribed to it #1386 builds on it;
DeliveryLRUCacheis deleted. - GraphQL semaphore.
RoundPauseis deleted. - Background enhancement lane: the four steps.
- Cleanup. The hand-rolled worker and the due table's intervals are deleted.
Risks:
- A pod per task. Start-up takes seconds instead of milliseconds (an estimate, not measured), and k3s's API server sees more churn. Step 1 measures both.
- No coalescing. N deliveries make N Workflows. Scoped updates must be cheap enough to repeat, and the reconcile CronWorkflow uses
concurrencyPolicy: Forbid. - At-least-once runs. A retried or replayed step runs again, so steps that write to GitHub stay unretried.
- The hold is our glue. Setting the semaphore to 0 and back takes a few lines plus a suspend workflow.
- More to keep current. One more controller and about 8 CRDs; the chart pin is bumped like the others.
Research summary (2026-10-09)
Requirements:
- events and schedules;
- one round at a time per repository lane;
- a global hold until the GraphQL reset;
- durable queued work;
- observability;
- reputable and actively maintained.
Candidates:
- Argo Workflows (chosen):
- v4.1.5 and v4.0.13 released 2026-10-09; CNCF graduated; Apache-2.0.
- Templated mutexes, CronWorkflows and
retryStrategywith backoff. - ConfigMap semaphores, where a limit of 0 holds every waiter.
- No database needed.
- DBOS Transact in-process (runner-up): no new server, but no queue pause and a small community.
- RQ on Valkey:
rq suspendmatches the hold, but it needs a persistent Valkey and about 16 worker processes, and its keyed concurrency is unreleased. - Not chosen:
- Temporal and Hatchet: each needs a new Postgres plus 3-6 pods.
- Argo Events: adds NATS without providing serialization or a hold.
- Celery, Dramatiq, Taskiq, Prefect, Restate, Inngest, Huey, SAQ, arq, APScheduler 4.
Sources: the argo-workflows docs on synchronization, cron workflows, retries, high availability and telemetry (https://github.com/argoproj/argo-workflows/tree/main/docs), and the argo-helm releases (https://github.com/argoproj/argo-helm/releases).
Related: #1532, #1534, #1386, #1533, #1400, #1387, #1389, #1395.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 10, 2026
The owner made this P0 on 2026-10-10 ("Turn this refactor into p0 work as it is blocking workflow") and placed it in v0.2.34, with Status Ready.
This item does not fit one pull request as written, so it will be re-scoped to its first pull request: install the engine and measure, with a go/no-go. The remaining steps will be filed as P0 items in v0.2.34, each saying "Depends on" the step before it. This body will be updated when they are filed.
dan-petty commentedon Oct 11, 2026
Blocked by #1562: the roadmap Service's machine account is suspended, and the Service is held at 0 replicas. This item develops the Service or can only be checked on it, so it waits until the account is reinstated or the jobs act as a GitHub App.
Generated by Claude Code
[-]feat(service): roadmap jobs run as argo workflows, with a mutex per repository lane, cronworkflows for schedules, webhook deliveries submitted as workflows, and a background enhancement lane[/-][+]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[/+]feat(k8s): the argo workflows controller runs in its own namespace un…
dan-petty commentedon Oct 22, 2026
What changed
#1819, merged into
release/v0.2.39as 33fe70f.22 file(s) changed.
How it was verified
Check runs at cdba7ce:
Acceptance Criteria of
docs/agent/tasks/task-1535-argo-workflows-controller.md:argo-workflowsat 2.0.13, and the release is registered in_HELM_RELEASES_BY_STACK["infra"], sotest_helm_sources_pinned_versionschecks its pin, namespace and values file, anddevops k8s deploy-stack --stack allinstalls it.k8s/namespaces.yamladdsargo-workflowswith Pod SecurityrestrictedandPrune=false,Delete=false, and thehomelabAppProject lists it as a destination. A test asserts that every Application's destination namespace is one its project allows.LEADER_ELECTION_*override, a single watched namespace, no argo-server, database or archive, minimal CRDs withcrds.keepand Argo CD's sync options, aRuntimeDefaultseccomp profile on the controller pod, and an executorsecurityContextthat disallows privilege escalation and drops all capabilities.createandpatchonworkflowtaskresults, and the template runs as that ServiceAccount.["--version"]only, has the cluster job template's pod and containersecurityContext, has noenvFrom, Secret volume or Secret env, setsDEVOPS_CLI_TELEMETRY_ENABLED=falseand anactiveDeadlineSeconds, and garbage-collects finished Workflows and their pods.k8s/argo-workflows/(rendered withkubectl kustomize) and nothing in the chart's values references Secretdevops-cli.teardown-stackdeletes it before they uninstall, and the dry run lists it.k8s/argo-workflows/networkpolicy.yamlis in_MANIFESTS_BY_STACK["infra"], and a test checks that it admits only the metrics scrape frommonitoring, reaches only DNS and the API server on 6443 through an ipBlock that excludes the cloud metadata address, and admits no public HTTPS.monitoring/networkpolicy.yamlallows that scrape, and the Scrape Ownership entry ink8s/README.mdnames it.images.tag.k8s/README.mdgains the install section, the measurement procedure and the directory entries.devops argo cd apps status argo-workflowsanddevops argo cd apps status argo-workflows-manifestsare both Synced and Healthy.teardown-stackon a cluster without the Workflow CRDs stops at its first step, the same way thellmServiceMonitor entry does; the follow-up is #1818.kubectl -n argo-workflows get deploy,podsshows one workflow-controller replica, Running, andkubectl get crd workflows.argoproj.io workflowtemplates.argoproj.io workflowtaskresults.argoproj.iolists the Workflow CRDs.kubectl auth can-i create workflowtaskresults.argoproj.io -n argo-workflows --as=system:serviceaccount:argo-workflows:argo-workflows-executorprintsyes, which no offline test can prove, since the Role is the chart's.devops prometheus query 'up{namespace="argo-workflows"}'shows the controller's metrics target at 1 in Alloy.kubectl -n devops get deploy roadmap-service -o jsonpath='{.spec.replicas}'prints0, and nothing else in namespacedevopschanged.argo submit --from workflowtemplate/devops-cli-version -n argo-workflows --waitand thenkubectl -n argo-workflows get workflow <name> -o jsonpath='{.status.storedWorkflowTemplateSpec.ttlStrategy} {.status.storedWorkflowTemplateSpec.podGC} {.status.storedWorkflowTemplateSpec.activeDeadlineSeconds}'.k8s/README.md(20 sequential Workflows, then a burst of 20 withseq 20 | xargs -P 20 -I{} argo submit --from workflowtemplate/devops-cli-version -n argo-workflows --wait), recorded as a comment 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 cold first run apart, the warm p50 and p95, the API-server requests per Workflow fromapiserver_request_total, the controller's CPU and memory, and the verdict against the thresholds in ADR 0008 (warm p95 of at most 30 seconds from creation to Succeeded, and a burst of 20 with no 429 or 5xx).devops roadmap intake --title "<title>" --body-file <file> --confirm, each with the dependencies in 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's scope; after a no-go, the owner chooses between re-scoping the engine and the runner-up in ADR 0008.feat(release): v0.2.39 (#1947)
dan-petty commentedon Nov 7, 2026
Answer from project standards: this issue closed with no recorded verdict. #3105 (implement as an Argo Workflow with resubmit of one group) waits on a go verdict of ADR 0008. No comment on this issue holds a measured value of the form
warm p95 <N> s. The threshold text of ADR 0008 is the only match.A person records the verdict here. Use one comment with the measured number and the word go or no-go, for example
warm p95 18 s - go.The measurement is in k8s/README.md, section Measurement.
argo submit --from workflowtemplate/devops-cli-version -n argo-workflows --wait.devops install-tools --tool argo.An agent on the homelab can run the measurement. A person records the verdict.
The go rule of ADR 0008 has two parts. The warm p95 is at most 30 s over the 19 runs after the first of 20 sequential Workflows. A burst of 20 Workflows gives no 429 and no 5xx.
Acceptance. Both commands print a line only after the verdict exists. They print nothing today.
uv run devops gh api repos/dan-petty/devops-cli/issues/1535/comments --paginate --jq '.[].body' | grep -E 'warm p95 [0-9]+ ?s'uv run devops gh api repos/dan-petty/devops-cli/issues/1535/comments --paginate --jq '.[].body' | grep -E 'warm p95 [0-9]+ ?s.*(go|no-go)'Do not build a stage-level Argo change before the verdict.
dan-petty commentedon Nov 11, 2026
ADR 0008 measurement, run 2026-11-11 (03:36Z to 03:46Z)
An agent ran the measurement in k8s/README.md, section Measurement on cluster
homelab-k3s(k3s v1.37.2+k3s1). It used argo CLI v4.1.5 (the pin insrc/devops_cli/tools_lock/tools.lock), controller chart 2.0.13 (app v4.1.5), and WorkflowTemplatedevops-cli-versionin namespaceargo-workflows. The run submitted 40 Workflows: 20 one at a time, then 20 at once. All 40 Workflows Succeeded.hogincluded)apiserver_request_totalacross the burstargo submitcalls that failed with a 429 or a 5xxxargsexit 0 for both batches)container_cpu_usage_seconds_totalcontainer_memory_working_set_bytesRaw durations, creation to Succeeded, in seconds, sorted:
10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 11 5410 10 10 10 11 12 12 12 14 14 23 23 23 24 24 24 24 24 24 24Raw counters (
apiserver_request_total, all codes and 429 or 5xx):Conditions during the run:
hog, the only control-plane node. Nodescondorandgeminiwere Ready but got no pod. Nodehawkwas NotReady and cordoned. Before the run, no node listed the Service image under a tag; the template uses the untagged image (latest) withIfNotPresent. Thus the first Workflow oncondororgeminipulls the image again. Onhog, the cold run took 44 s more than a warm run.roadmap-serviceran at 1 replica, and the other cluster clients ran as usual. The idle baselines (8.2 and 9.4 requests a second) include their load, so the requests per Workflow are an estimate with that noise.kubectl top(metrics-server) showed 3 m and 85 MiB during the 26 s burst. Its window is longer than the burst, so the table uses the cAdvisor series.Commands (bash, from the README section, with timestamps, a
kubectl topsampler and stderr capture added):PromQL (Grafana datasource
prometheus, 2026-11-11T03:30Z to 03:52Z, step 30 s):This comment records only the numbers. A person records the go or no-go verdict of ADR 0008 on this issue.
dan-petty commentedon Nov 11, 2026
warm p95 11 s - go
The owner recorded this verdict on 2026-11-11 after the measurement in the comment above (warm p95 11 s against the limit of 30 s; no new 429 or 5xx in the burst; 0 of 40 submissions failed). Per ADR 0008, the roadmap jobs move onto Argo Workflows, and the steps after step 1 are filed now under one tracker.
docs(roadmap): record the roadmap Service move to jobs and Valkey (#4609