Repository navigation
Description
Update 2026-11-26 (infra move): The monitoring and logging network policies are in dan-petty/homelab now.
This item keeps the WorkflowTemplate, the CronWorkflow, their egress policy and the due command. The ingress rules that admit the review pods are the homelab follow-up. Merge that one first.
Follow-up: dan-petty/homelab#276.
Problem or Motivation
The owner asked that a job can run the project review. The owner decided on 2026-11-11 that the job reviews each complete ISO week, with narrative, and that version reviews run on demand. Argo cannot run pods in namespace devops today: rag-ingest never ran, it uses the singular schedule field that Argo v4 removed, and the controller runs with --namespaced (#4566).
Proposed Solution & Architectural Design
- WorkflowTemplate
project-review:- the Service image with the
reviewextra; - the devops-cli Secret and the store write credential;
- the Job labels of feat(roadmap): label Service Jobs by repository and item #4558;
- a mutex;
activeDeadlineSeconds: 1800, longer than each inner timeout;- a network policy that allows egress only to GitHub, Prometheus, Loki, the gateway and the content store.
- the Service image with the
- CronWorkflow with
schedules: ['7 * * * *']andconcurrencyPolicy: Forbid. It runsdevops roadmap review due --run: each complete ISO week of the last 30 days with no index entry, oldest first, at most 6 for each run. - For a version review, a person, an agent or the Service submits the template with
-p window=.... - Add the row to the ADR 0021 unit table.
Target Subsystem
Kubernetes manifests (k8s/devops/, Argo Workflows), with the due subcommand in src/devops_cli/roadmap/project_review/.
Existing Tool Considered
Argo Workflows (installed) runs the template and the schedule. The custom code is the due subcommand, which reads the store index. Cost (estimate): manifests and about 80-150 lines with tests, one issue-size item, about 0.33-0.50 USD on the DeepSeek implement path and 1-2 days elapsed. Run: about 3-6 min for a weekly review, 0.5-1 GiB memory peak and 1 CPU.
Acceptance Criteria
- The CronWorkflow status shows a last-scheduled time within 1 h after the sync.
- A deleted week index entry is made again at the next run.
- A submitted version window publishes within 5 min.
- No run is longer than 1,800 s.
Dependencies
- feat(roadmap): publish the project review and link it on GitHub #4733 feat(roadmap): publish the project review and link it on GitHub.
- feat(roadmap): write the project review narrative with a model #4726 feat(roadmap): write the project review narrative with a model.
- feat(k8s): let Argo Workflows run roadmap pods in devops #4566 feat(k8s): let Argo Workflows run roadmap pods in devops.
- Person step: run
uv run devops k8s push-secretsfor the store write credential.
Source: #4679
Alternatives check of 2026-11-29: in-use.
The repository already uses this tool.
Tool: Argo Workflows (https://github.com/argoproj/argo-workflows), Apache-2.0, last activity 2026-11-29, maintained.
Reason: Searches found Argo Workflows, which the issue already names: its CronWorkflow, template mutex, deadline and parameter submit cover the hourly schedule and both triggers, leaving only the custom due selector as code.
Covers:
- Hourly CronWorkflow with the list field schedules and Forbid policy
- WorkflowTemplate with mutex, activeDeadlineSeconds and parameters
- On-demand submit of a window parameter through the argo CLI
- Pod labels, secrets and retry of a failed run
Lacks:
- Selects no complete ISO weeks; needs the custom due subcommand
- Writes no review narrative and reads no store index entry
- Ships no NetworkPolicy or Secret manifests for this cluster
Proposed design
Problem statement
No job runs the project review today. Argo cannot start pods in namespace devops until #4566. No schedule selects complete ISO weeks that have no review. This change adds the project-review WorkflowTemplate, an hourly CronWorkflow that runs devops roadmap review due --run, an on-demand version submit through a window parameter, the network policies, and the ADR 0021 unit row.
Acceptance criteria
Requirement: Project review WorkflowTemplate
The project-review WorkflowTemplate SHALL run the Service image ghcr.io/dan-petty/devops-cli/service, reference Secret devops-cli and Secret object-store-devops in namespace devops, and set the pod labels app.kubernetes.io/name: devops-cli-job, app.kubernetes.io/component: project-review, roadmap.devops-cli/owner and roadmap.devops-cli/repo.
Scenario: Rendered template image, secrets and labels
- WHEN The operator runs
kubectl -n devops get workflowtemplate project-review -o jsonpath='{.spec.templates[0].container.image}{" "}{..secretRef.name}{" "}{.spec.templates[0].metadata.labels}'after the sync. - THEN The command prints
ghcr.io/dan-petty/devops-cli/service,devops-cli,object-store-devopsand the four labels.
Requirement: Template deadline and mutex
The project-review WorkflowTemplate SHALL set activeDeadlineSeconds: 1800 and hold the mutex project-review.
Scenario: Rendered deadline and mutex
- WHEN The operator runs
kubectl -n devops get workflowtemplate project-review -o jsonpath='{.spec.activeDeadlineSeconds}{" "}{.spec.templates[0].synchronization.mutex.name}'. - THEN The command prints
1800 project-review.
Requirement: Due check CronWorkflow
The project-review CronWorkflow SHALL use the list field schedules: ['7 * * * *'] and concurrencyPolicy: Forbid.
Scenario: Rendered schedule
- WHEN The operator runs
kubectl -n devops get cronworkflow project-review -o jsonpath='{.spec.schedules}{" "}{.spec.concurrencyPolicy}{" "}{.spec.schedule}'. - THEN The command prints
["7 * * * *"] Forbidand an empty third field.
Requirement: Scheduled run
The project-review CronWorkflow MUST show a last-scheduled time within 1 h after Argo syncs it.
Scenario: First scheduled run
- WHEN The operator waits up to 1 h after the sync and runs
kubectl -n devops get cronworkflow project-review -o jsonpath='{.status.lastScheduledTime}'. - THEN The command prints a time less than 1 h before the current time.
Requirement: Due week selection
The devops roadmap review due --run command SHALL select each complete ISO week with no index entry, from the older of 30 days ago and the oldest index entry, oldest first, at most 6 for each run.
Scenario: Seven due weeks
- WHEN A test gives the index an entry 8 weeks ago and no entry for the 7 complete weeks after it, and runs the selector with a fixed
now. - THEN The selector returns the 6 oldest complete weeks in order and leaves the seventh week for a later run.
Requirement: Deleted week entry
The devops roadmap review due --run command SHALL select a complete ISO week again when its index entry is deleted.
Scenario: Deleted index entry
- WHEN A test deletes the index entry of a complete week that is older than 30 days but after the oldest index entry, and runs the selector.
- THEN The selector returns that week.
Requirement: On-demand version review
The project-review WorkflowTemplate SHALL declare a window parameter with an empty default, SHALL pass a non-empty value to devops roadmap review run --version, and SHALL run devops roadmap review due --run for the empty default.
Scenario: Version window submit
- WHEN The operator runs
argo submit -n devops --from workflowtemplate/project-review -p window=v1.0.0..v1.1.1 --dry-run -o yaml, and again with nowindowparameter. - THEN The first output runs
review run --version v1.0.0..v1.1.1, and the second output runsreview due --run.
Requirement: Review egress
The project-review NetworkPolicy SHALL add egress only to Prometheus on TCP 9090 in namespace monitoring and Loki on TCP 3100 in namespace logging.
Scenario: Egress allowlist
- WHEN The operator runs
kubectl -n devops get networkpolicy project-review -o jsonpath='{.spec.egress}'. - THEN The output holds two rules, one for namespace
monitoringport 9090 and one for namespaceloggingport 3100, and no other rule.
Requirement: Review pods admitted
The monitoring and logging NetworkPolicies SHALL admit the project-review pods on TCP 9090 and TCP 3100.
Scenario: Policies pass the Kubernetes checks
- WHEN The change edits
k8s/monitoring/networkpolicy.yamlandk8s/logging/networkpolicy.yaml, and the operator runsuv run devops ci --check --only k8s. - THEN The check exits 0 and reports no finding on the two policy files.
Requirement: ADR 0021 unit row
The ADR 0021 unit table SHALL list one row for the project review, with one complete ISO week of one repository as its unit and the hourly schedule and the on-demand version submit as its triggers.
Scenario: ADR table row
- WHEN The change adds the row to
docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, and the operator runsuv run devops ci --check --only docs. - THEN The docs check exits 0 and reports no finding on the ADR file.
Requirement: Pending a person after the merge
A person SHALL run uv run devops k8s push-secrets for the store write credential before the first scheduled run.
Scenario: Store write credential pushed
- WHEN After the merge, a person runs
uv run devops k8s push-secrets --only devops/object-store-devopsand thenuv run devops k8s push-secrets --only devops/object-store-devops --plan. - THEN The push exits 0 and the plan shows
unchangedfor every key.
Existing Tool Considered
Argo Workflows (argoproj/argo-workflows), verdict in-use: the alternatives check of 2026-11-23 in the issue body records the tool and what it covers and lacks. The change adds the missing due subcommand and the routing of an empty window to the weekly run: about 80-150 lines with tests, one issue-size item, about 0.33-0.50 USD on the DeepSeek implement path, and 1-2 days elapsed. A weekly run takes about 3-6 min, with a 0.5-1 GiB memory peak and 1 CPU.
Key questions
- What is a complete ISO week, and which command resolves its window?: A complete ISO week runs from Monday 00:00 UTC to the next Monday 00:00 UTC. It is complete when its end is at or before now. Its id is
YYYY-Www.devops roadmap review run --week YYYY-Wwwresolves that window throughparse_windowinsrc/devops_cli/roadmap/project_review/window.py. [sources: src/devops_cli/roadmap/project_review/window.py, docs/CLI_REFERENCE.md] - Which record tells the
duecommand that a week already has a review?: The index entry that feat(roadmap): publish the project review and link it on GitHub #4733 writes for the published review of the week. Theduecommand reads that entry and no other record. (best practice) [sources: src/devops_cli/roadmap/project_review/review.py, docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md]- Chosen: Index entry that feat(roadmap): publish the project review and link it on GitHub #4733 writes. feat(roadmap): publish the project review and link it on GitHub #4733 is a declared dependency that publishes the review and links it, so its index entry is the one record of a done week.
- Rejected: Folder
project-review/<owner>/<name>/<id>under the data directory. The data directory belongs to the pod that runs the review, and no durable copy is guaranteed there. - Rejected: GitHub search for the published link. It costs one search for each week, and the link text can change.
- Which complete weeks are due, and how do the 30-day lookback and the 6-week cap fit together?: A week is due when it is complete and the index has no entry for it. The scan starts at the older of 30 days ago and the oldest index entry, so a deleted entry or a week after an outage is selected again. Each run takes the 6 oldest due weeks, oldest first, and leaves the rest for the next run. (best practice) [sources: src/devops_cli/roadmap/project_review/window.py, docs/CLI_REFERENCE.md]
- Chosen: Index-bounded scan, oldest first, at most 6. The index says which weeks are done, the scan reaches a deleted entry or a week after an outage, and the cap of 6 bounds one run.
- Rejected: Fixed 30-day lookback. 30 days hold at most 4 complete weeks, so the cap of 6 is unreachable and an older week is never remade.
- Rejected: No cap. A first run or a long backlog can exceed the 1,800 s deadline.
- Rejected: Newest first. The oldest missing weeks wait forever while new weeks arrive.
- Which cadence does the CronWorkflow use for the weekly review?: The CronWorkflow checks every hour at minute 7 (
7 * * * *), anddueselects only complete weeks. A week is reviewed within 1 h of its end, no partial week is reviewed, and a missed run catches up from the index. The owner decided on 2026-11-11 that each complete ISO week gets a review and that version reviews run on demand. (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: Hourly due check. The check is frequent enough to review a week within 1 h of its end, and
duekeeps partial weeks out. - Rejected: Weekly CronWorkflow on Monday. A missed run waits a week, and the schedule must know the time zone and the week boundary.
- Rejected: Daily schedule. It checks 7 times for each week and adds runs with nothing due.
- Rejected: On-demand only. It leaves complete weeks without a review.
- Chosen: Hourly due check. The check is frequent enough to review a week within 1 h of its end, and
- Which Argo CronWorkflow field schedules the hourly due check?: Use the list field
schedules: ['7 * * * *']. Do not use the singularschedulefield, which Argo v4.0 removed;k8s/devops/cronworkflow-rag-ingest.yamlstill uses it and therefore never schedules. [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] - How does the CronWorkflow prevent overlapping runs?: Set
concurrencyPolicy: Forbidon the CronWorkflow and give the WorkflowTemplate theproject-reviewmutex. The policy stops a second scheduled run, and the mutex also stops an on-demand submit while a run holds 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/roadmap-service/cronjob-planner-run.yaml]- Chosen:
Forbidand the template mutex. The policy stops a second scheduled run, and the mutex also covers an on-demand submit. - Rejected:
concurrencyPolicy: Forbidalone. It governs only the Jobs of the schedule, so an on-demand submit can run at the same time. - Rejected:
Allow. Two runs can write the same week entry. - Rejected:
Replace. It cancels a running review and loses the week.
- Chosen:
- What deadline and network egress does the run use?: Set
activeDeadlineSeconds: 1800, longer than each inner timeout, because ADR 0021 requires each inner limit to stop before the limit around it. Thedevops-default-perimeteralready allows DNS, the LLM gateway, Valkey, Qdrant, the OTel collector, public HTTPS to GitHub and the content store. Theproject-reviewpolicy adds only Prometheus (monitoring:9090) and Loki (logging:3100). The monitoring and logging perimeters admit neither port to adevopspod today, so both policies get a rule for the review pods. (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/monitoring/networkpolicy.yaml, k8s/logging/networkpolicy.yaml]- Chosen: 1,800 s and least-privilege egress. The deadline bounds a stuck run without breaking the inner time limits, and the policy adds only the two services that the review reads beyond the perimeter.
- Rejected: No deadline and default egress. A stuck run holds the mutex, and the pod reaches services that the review does not need.
- Rejected: Raise the deadline to cover 6 weeks. It breaks the 1,800 s bound;
dueleaves the remaining weeks for the next run. - Rejected: One broad egress rule. It admits every port of the cluster and loses the least-privilege property of the perimeter.
- How does a person, an agent or the Service submit a version review?: Submit the same
project-reviewWorkflowTemplate with-p window=A..B. A non-empty value runsdevops roadmap review run --version A..Bthrough the existing parser, and the empty default runsdevops roadmap review due --run. The template keeps the same image, Secret, labels, mutex and deadline. (best practice) [sources: src/devops_cli/roadmap/project_review/window.py, docs/CLI_REFERENCE.md]- Chosen: Same template with a
windowparameter. It reuses the image, Secret, labels, mutex and deadline, and the empty default keeps the weekly due run. - Rejected: Separate version WorkflowTemplate. It duplicates the pod configuration and can drift from the weekly run.
- Rejected: Second CronWorkflow for versions. Version reviews run on demand, not on a schedule.
- Rejected: Run the review outside the template. It bypasses the deadline, the mutex, the Secret and the labels.
- Chosen: Same template with a
- Which image and pod labels does the WorkflowTemplate use?: The Service image
ghcr.io/dan-petty/devops-cli/service, with thereviewextra. The pod carriesapp.kubernetes.io/name: devops-cli-jobso the stack network policies select it,app.kubernetes.io/component: project-reviewso the monitoring and logging ingress rules name only these pods, and theroadmap.devops-cli/ownerandroadmap.devops-cli/repolabels of feat(roadmap): label Service Jobs by repository and item #4558. (best practice) [sources: pyproject.toml, docs/CLUSTER.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]- Chosen: Service image
ghcr.io/dan-petty/devops-cli/service. The body names it with thereviewextra, and it holds the roadmap commands that the job runs. - Rejected: A separate review image. It duplicates the roadmap commands and the Service configuration, and it drifts from the Service release.
- Chosen: Service image
- Which Secret holds the store write credential, and does the change create it?: Secret
object-store-devopsin namespacedevopsholds the store write credential. The change references that Secret and creates no new Secret. A person runsuv run devops k8s push-secretsafter the merge if the plan shows a change. [sources: docs/CLUSTER.md]
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(k8s)scope of the title gives the scope.It is a planned feature with three open dependencies and no user-facing breakage if deferred.It removes the manual step of triggering each weekly review and guarantees a review exists for every complete ISO week.The body estimates 80 to 150 lines of code with tests plus manifests, about 1 to 2 days elapsed.Both target Argo Workflows in the devops namespace, but dan-petty/devops-cli#4566 enables the controller and namespace access while this item adds a specific CronWorkflow and due subcommand for weekly reviews.devops-cli-service commentedon Nov 14, 2026
Alternatives check: in-use
Reason: The searches and the repository facts point to Argo Workflows, which the issue already names as installed: it supplies the WorkflowTemplate/CronWorkflow machinery (multiple
schedules,concurrencyPolicy: Forbid,activeDeadlineSeconds, synchronization/mutex, on-demand submit with parameters) that the manifests need. It does not supply the per-ISO-weekdueselection that reads the store index, nor the narrative and publishing steps, which stay custom code, so it covers only part of the issue.The repository already uses this tool.
Tool: argoproj/argo-workflows (https://github.com/argoproj/argo-workflows)
Covers:
activeDeadlineSecondson the template so no run exceeds 1,800 sschedulesin Argo v4 andconcurrencyPolicy: Forbidfor one run at a time-p window=...) by a person, an agent or the ServiceLacks:
duesubcommanddevopsuntil the namespaced controller access of feat(k8s): let Argo Workflows run roadmap pods in devops #4566 is fixedTools considered:
Searches run:
Sources:
Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 15, 2026
Owner question: Who creates the store write credential Secret before the CronWorkflow runs? (a person decides)
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
The next refine round also looks at the item again when a commit on the default branch changes one of these files:
k8s/argo-workflows/values.yaml,k8s/devops/cronworkflow-rag-ingest.yaml.devops-cli-service commentedon Nov 20, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
dan-petty commentedon Nov 21, 2026
Answer to the owner question "Who sets the review base URL and the content store write credential?":
PROJECT_REVIEW_URLbefore the merge of ci(release): link the project review from each release #4741. This replaces "before the first release after the merge" in ci(release): link the project review from each release #4741, because about 19 releases run each day. I use the Settings page oruv run devops gh api -X POST repos/dan-petty/devops-cli/actions/variables -f name=PROJECT_REVIEW_URL -f value=<base URL>. The value stays out of git. The release step of ci(release): link the project review from each release #4741 fails closed while the variable is empty. The URL works only after the files host of dan-petty/homelab#341 exists.devopsand uses Secretdevops/object-store-devopsof identitydevopsfrom feat(k8s): apply store buckets, keys and rules from git #4756. That identity writesreportsandreports-private, which the review needs, and alsocache. I push that Secret before the merge of feat(k8s): apply store buckets, keys and rules from git #4756.uv run devops k8s push-secrets --only devops/object-store-devops --plan. Merge only when every key showsunchanged. No new push is necessary.The same answer applies to the question of #4736.
devops-cli-service commentedon Nov 21, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 26, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.