Repository navigation
Description
Problem or Motivation
The docs audit and Pages health steps (#5154, #5155) are commands. Nothing runs them on a schedule for the Service repositories, or after a push that changes the docs. ADR 0021 puts Service work in cluster Jobs and Argo Workflows. Today the only roadmap CronWorkflow pattern is k8s/devops/cronworkflow-rag-ingest.yaml.
Proposed Solution & Architectural Design
- Add a WorkflowTemplate
roadmap-docsthat runs one step for one repository in its own pod:devops roadmap step pages-health --repo <r>ordevops roadmap step docs-audit --repo <r>. - Add a CronWorkflow
roadmap-docson the pattern ofcronworkflow-rag-ingest.yaml:pages-healtheach day, anddocs-auditeach week, for each repository ofservice.repos. SetactiveDeadlineSecondsabove the step timeouts, so the inner limit fires first. - The webhook router sends a
pushto the default branch that changes the docs globs to one scopeddocs-auditrun for that repository (ADR 0017, ADR 0021). - Add the settings
roadmap.docs_audit.modeandroadmap.pages_health.modewith the valueplantok8s/devops/configmap.example.yamland the live ConfigMap. - Add the NetworkPolicy for the pods (GitHub API, the Pages hosts, the gateway for Jev), the spend rows
docs_auditandpages_health, and the counterdevops_cli_docs_findings_total{repo,job,check,action}. - Document the job in
k8s/README.mdanddocs/ROUTINE_TASKS.md.
Target Subsystem
Kubernetes manifests (k8s/devops/), SDLC, Git & PR Governance (the router subscription).
Existing Tool Considered
Argo Workflows (in use, ADR 0008) runs the CronWorkflow. The webhook router (ADR 0009, ADR 0017) delivers the push event. No new tool. Custom code: manifests and one router subscription. Cost (estimate): about 200,000 tokens and 1 day elapsed.
Acceptance Criteria
kubectl apply --dry-run=serveraccepts the manifests, and the manifest tests pass.- A manual submit of the template for devops-cli runs
pages-healthin modeplanand logs its would-be actions. - A push fixture that changes
docs/x.mdstarts 1docs-auditrun. A push that changes onlysrc/starts 0. - The counter shows in Prometheus after one run.
Dependencies
- feat(roadmap): a Pages health step finds deploy faults and missing pages #5154 and feat(roadmap): a docs audit step finds link, lint and stale-doc defects #5155 (the step commands).
Source: #5151
Alternatives check of 2026-11-27: 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-27, maintained.
Reason: The issue already runs Argo Workflows (ADR 0008), and its WorkflowTemplate plus CronWorkflow pattern covers the daily and weekly schedule per repository; the push trigger, NetworkPolicy, mode settings, spend rows, counter and docs globs remain custom code.
Covers:
- WorkflowTemplate runs one step for one repository in its own pod
- CronWorkflow starts the template daily and weekly
- Fan-out over a resolved repository list with withItems
- Workflow deadline backstop above the step timeout
Lacks:
- No docs-glob push filter; the webhook router submits the scoped run
- No NetworkPolicy, mode settings or spend rows
- No docs findings counter
Proposed design
Problem statement
The docs audit and Pages health steps have no schedule for the Service repositories. No push starts a docs audit. This change adds a WorkflowTemplate, two CronWorkflows, a router subscription, two mode settings, a NetworkPolicy, two spend rows, one counter and the documentation.
Acceptance criteria
Requirement: One pod for one repository
The WorkflowTemplate roadmap-docs SHALL run one step for one repository in a pod of its own.
Scenario: The template validates
- WHEN
uv run devops ci --check --only k8svalidates the manifests ofk8s/devops/ - THEN the check exits 0 and reports no finding for
k8s/devops/workflowtemplate-roadmap-docs.yaml.
Requirement: Daily pages-health run
A CronWorkflow SHALL start the pages-health step once a day for each repository of service.repos.
Scenario: The daily CronWorkflow validates
- WHEN
uv run devops ci --check --only k8svalidates the manifests ofk8s/devops/ - THEN the check exits 0 and reports no finding for
k8s/devops/cronworkflow-roadmap-pages-health.yaml.
Requirement: Weekly docs-audit run
A CronWorkflow SHALL start the docs-audit step once a week for each repository of service.repos.
Scenario: The weekly CronWorkflow validates
- WHEN
uv run devops ci --check --only k8svalidates the manifests ofk8s/devops/ - THEN the check exits 0 and reports no finding for
k8s/devops/cronworkflow-roadmap-docs-audit.yaml.
Requirement: A docs push starts one docs-audit run
The webhook router SHALL start exactly one scoped docs-audit run when a push to the default branch changes a file in the docs globs.
Scenario: A push that changes docs/x.md
- WHEN a test feeds the router a push fixture that changes
docs/x.mdon the default branch - THEN the test asserts that the router creates one unit of work for the docs-audit step of that repository and no other unit.
Requirement: A source-only push starts no run
The webhook router SHALL start no docs-audit run when a push to the default branch changes no file in the docs globs.
Scenario: A push that changes only src/
- WHEN a test feeds the router a push fixture that changes only
src/on the default branch - THEN the test asserts that the router creates no unit of work.
Requirement: The mode settings accept plan
The settings model SHALL accept plan for roadmap.docs_audit.mode and roadmap.pages_health.mode.
Scenario: The settings model loads plan
- WHEN a test builds the roadmap settings with
roadmap.docs_audit.mode: planandroadmap.pages_health.mode: plan - THEN the test asserts that the settings load with no validation error.
Requirement: Pending a person after the merge
The pages-health step in mode plan SHALL log the actions that it would take and send no request.
Scenario: A manual submit in plan mode
- WHEN after the merge, a person sets both modes to
planin the live ConfigMap and submitsargo submit --from workflowtemplate/roadmap-docs -p repo=<repo> -p job=pages-health - THEN the pod log lists the would-be actions and the run sends no GitHub write request.
Requirement: The docs findings counter
The metric devops_cli_docs_findings_total SHALL hold the labels repo, job, check and action.
Scenario: One finding adds one sample
- WHEN a test records one docs finding for one repository, job, check and action
- THEN the test asserts that the counter sample has those four label values and the value 1.
Requirement: The two spend rows
The spend ledger SHALL hold a row for docs_audit and a row for pages_health.
Scenario: A step run takes its spend row
- WHEN a test takes the spend row of the job
docs_audit - THEN the test asserts that the row is
docs_auditand not the default row.
Requirement: The pods reach GitHub and the Pages hosts only
A NetworkPolicy SHALL admit egress from the docs pods to the GitHub API, the Pages hosts and the gateway, and no other egress.
Scenario: The policy validates
- WHEN
uv run devops ci --check --only k8svalidates the manifests ofk8s/devops/ - THEN the check exits 0 and reports no finding for
k8s/devops/networkpolicy-roadmap-docs.yaml.
Requirement: The documentation names the schedule
The documentation SHALL name the roadmap-docs WorkflowTemplate, the two CronWorkflows and the router subscription.
Scenario: The docs check passes
- WHEN
uv run devops ci --check --only docsruns - THEN the check exits 0.
Existing Tool Considered
Argo Workflows (argoproj/argo-workflows, Apache-2.0, maintained) is in use; see the alternatives check in the issue body for what it covers and lacks. The proposal adds the webhook router subscription, the NetworkPolicy, the two mode settings, the two spend rows, the docs findings counter and the docs globs, which the block lists as lacking.
Key questions
- Which scheduler runs the docs and Pages steps for each Service repository?: Argo Workflows. The WorkflowTemplate
roadmap-docsholds the step, and two CronWorkflows start 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, k8s/devops/cronworkflow-rag-ingest.yaml, k8s/devops/workflowtemplate-rag-ingest.yaml]- Chosen: Argo Workflows CronWorkflow and WorkflowTemplate. The cluster already runs Argo Workflows, and the repository has the pattern.
- Rejected: A Kubernetes CronJob for each step. A CronJob has no step template and no fan-out, so each repository needs a manifest.
- Rejected: A GitHub Actions schedule. The steps run in the cluster with the Service credentials, and ADR 0021 puts this work in cluster pods.
- How does one workflow start one pod for each repository of
service.repos?: A resolve step printsservice.reposas a JSON array. The template fans out over that output withwithItems, and each item is one pod that runs one step for one repository. (best practice) [sources: k8s/devops/configmap.example.yaml, k8s/devops/workflowtemplate-rag-ingest.yaml]- Chosen:
withItemsover the output of a resolve step.service.reposstays the only list, and each repository gets a pod of its own. - Rejected: One pod that loops over the repositories. The issue asks for one pod for each repository, and one failure would end every repository.
- Rejected: One CronWorkflow for each repository. The list changes in the ConfigMap, and a manifest for each repository duplicates it.
- Chosen:
- Does the change add one CronWorkflow or two, for the daily and the weekly cadence?: Two CronWorkflows,
roadmap-pages-healthandroadmap-docs-audit. Each references the WorkflowTemplateroadmap-docsand sets thejobparameter. (best practice) [sources: k8s/devops/cronworkflow-rag-ingest.yaml]- Chosen: Two CronWorkflows over one WorkflowTemplate. Each cadence reads on its own, and both keep the pattern of
cronworkflow-rag-ingest.yaml. - Rejected: One daily CronWorkflow with a weekday condition. The condition sits in the manifest, and a reader cannot see the weekly cadence in the schedule.
- Rejected: One CronWorkflow with two entries in
spec.schedules. No CronWorkflow in this repository uses that field, so the pattern is unproven here.
- Chosen: Two CronWorkflows over one WorkflowTemplate. Each cadence reads on its own, and both keep the pattern of
- Where does
activeDeadlineSecondssit, and what value does it take?: It sits on the workflow spec of the WorkflowTemplate, at twice the step command timeout of feat(roadmap): a Pages health step finds deploy faults and missing pages #5154 and feat(roadmap): a docs audit step finds link, lint and stale-doc defects #5155. The step timeout fires first, and the workflow deadline only stops a pod that hangs. (best practice) [sources: k8s/devops/workflowtemplate-rag-ingest.yaml, k8s/devops/configmap.example.yaml]- Chosen: A workflow deadline at twice the step timeout. The inner limit reports the step result, and the workflow deadline stays a backstop.
- Rejected: No workflow deadline. A hung pod holds the workflow, and the next schedule waits behind
concurrencyPolicy: Forbid. - Rejected: A workflow deadline below the step timeout. The workflow would end the step before the step limit writes its result.
- Which mode do
roadmap.docs_audit.modeandroadmap.pages_health.modestart in?:plan, in the example ConfigMap and in the live ConfigMap. A person setsonafter a person reads the plan logs. (best practice) [sources: k8s/devops/configmap.example.yaml]- Chosen: plan. The mode logs the would-be actions and writes nothing, and the repository starts each new row this way.
- Rejected: off. The mode sends no request, so the manual submit cannot show the would-be actions.
- Rejected: on. The step would write to GitHub on its first run with no review.
- What egress does the NetworkPolicy admit for the docs pods?: Egress on TCP 443 to the internet with the cluster and private ranges excepted, and DNS to
kube-system. It admits no ingress. The step reaches the GitHub API, the Pages hosts and the gateway for Jev. (best practice) [sources: k8s/devops/roadmap-service/admissionpolicy.yaml, k8s/devops/configmap.example.yaml]- Chosen: 443 to the internet except the cluster and private ranges, plus DNS. The step reaches GitHub, the Pages hosts and the gateway, and the policy keeps the cluster network out.
- Rejected: Deny all egress. The step cannot reach the GitHub API or the Pages hosts.
- Rejected: Allow all egress. It admits the cluster network and every port.
- Which docs globs start a scoped docs-audit run?: One glob list, owned by the docs-audit step of feat(roadmap): a docs audit step finds link, lint and stale-doc defects #5155. The router reads the same list, so the push filter and the step cannot disagree. (best practice) [sources: docs/adr/0017-each-subscribed-webhook-event-runs-the-update-scoped-to-it.md]
- Chosen: One glob list that the step owns. The router and the step read one source, so a change of the globs changes both.
- Rejected: A second glob list in the router. Two lists drift, and a push starts a run that finds nothing.
- Rejected: Any push to the default branch. A push that changes only
src/starts a docs run that finds nothing.
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 12, 2026
Both schedule a cluster task per Service repo with a push trigger, but #3589 targets the RAG index while this targets docs and Pages steps.devops-cli-service commentedon Nov 16, 2026
Alternatives check: in-use
Reason: Argo Workflows (Apache-2.0, v4.1.6, actively maintained) provides the CronWorkflow, WorkflowTemplate and activeDeadlineSeconds primitives that the issue needs to schedule docs-audit and pages-health steps per repository. The issue itself states "No new tool" and names Argo Workflows as already in use under ADR 0008.
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-16. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 17, 2026
Refine cannot set this item to Ready at c58b592 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 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.