Skip to content

feat(k8s): run the group and split rows on schedules #4821

Open

Description

@dan-petty

Problem or Motivation

The group and split rows must run on a schedule with no coordinator (owner requirement of 2026-11-11, #4780). No template runs them.

Proposed Solution & Architectural Design

  • WorkflowTemplate and CronWorkflow roadmap-group: schedules: ['45 3 * * *'] UTC, semaphore triage, activeDeadlineSeconds: 1800, no clone.
  • WorkflowTemplate and CronWorkflow roadmap-split: schedules: ['30 */6 * * *'] UTC, semaphore steward, activeDeadlineSeconds: 3000, a clone for the OpenSpec folders.
  • Both: concurrencyPolicy: Forbid, a mutex for each row, retryStrategy for exit code 75 only, the ADR 0022 labels, and no token in the main container.
  • ConfigMap keys roadmap.group.* and roadmap.split.*.
  • group uses plan mode for its first 2 runs. split uses plan mode for 2 weeks.

Target Subsystem

Kubernetes manifests (k8s/devops/).

Existing Tool Considered

Argo Workflows CronWorkflows and synchronization (installed). Cost to build: about 60,000 tokens and 1.5 hours.

Acceptance Criteria

  • The kustomize render holds the objects.
  • A server-side dry run passes.
  • The first runs in plan mode write only to Loki.

Dependencies

Source: #4780

Owner decision 2026-11-13

Group, split and resolve use the semaphore steward 1. The CronWorkflow schedules stay as ADR 0021 states. Source: tracker #5482.

  • Live proof: after the merge, each schedule runs one time as the App. A comment gives the result lines.

Alternatives check of 2026-12-01: in-use.
The repository already uses this tool.
Tool: Argo Workflows (https://github.com/argoproj/argo-workflows), Apache-2.0, last activity 2026-12-01, maintained.
Reason: Argo Workflows CronWorkflows, already the tool that the issue names, give UTC schedules, semaphore and mutex locks, Forbid concurrency, deadlines and exit-code retry; the other items are project configuration on top of it.

Covers:

  • CronWorkflow UTC schedules with concurrencyPolicy Forbid
  • Semaphore and mutex synchronization of runs
  • retryStrategy expression on an exit code
  • activeDeadlineSeconds per template
  • WorkflowTemplate referenced from a CronWorkflow

Lacks:

  • ConfigMap plan-mode keys and environment variables
  • Clone step for the OpenSpec folders
  • ADR 0022 label set on the rendered objects
  • Semaphore name and limit are project settings

Proposed design

Problem statement

The split roadmap row has no scheduled runner. The reply of 2026-12-01 closes #4813 as not planned, so this change covers the split row only. This change adds an Argo WorkflowTemplate and CronWorkflow roadmap-split. The row uses the steward semaphore, a row mutex, a 3000-second deadline, an exit-75 retry and a plan-mode key. The main container has no Kubernetes token.

Acceptance criteria

Requirement: Split schedule objects

The kustomize render of k8s/devops SHALL hold a WorkflowTemplate and a CronWorkflow named roadmap-split, and the CronWorkflow SHALL use the UTC schedule 30 */6 * * *.

Scenario: The k8s check renders the split objects

  • WHEN The command uv run devops ci --check --only k8s runs on the branch that holds the roadmap-split objects.
  • THEN The k8s check passes and reports no error for the render that holds the roadmap-split WorkflowTemplate and CronWorkflow with the schedule 30 */6 * * *.

Requirement: Split clone step

The roadmap-split WorkflowTemplate MUST hold a clone step that checks out the repository for the OpenSpec folders before the main step.

Scenario: The k8s check renders the clone step

  • WHEN The command uv run devops ci --check --only k8s runs on the branch that holds the roadmap-split template.
  • THEN The k8s check passes and reports no error for the template that holds the clone step before the main step.

Requirement: Steward semaphore

The roadmap-split CronWorkflow MUST use the semaphore steward with a limit of 1 and MUST NOT use the semaphore triage.

Scenario: The k8s check renders the semaphore

  • WHEN The command uv run devops ci --check --only k8s runs on the branch that holds the roadmap-split objects.
  • THEN The k8s check passes and reports no error for the CronWorkflow that holds the steward entry of value 1 and no triage entry.

Requirement: Row concurrency

The roadmap-split CronWorkflow MUST set concurrencyPolicy: Forbid and a mutex named split.

Scenario: The k8s check renders the concurrency policy

  • WHEN The command uv run devops ci --check --only k8s runs on the branch that holds the roadmap-split objects.
  • THEN The k8s check passes and reports no error for the CronWorkflow that holds concurrencyPolicy: Forbid and the mutex split.

Requirement: Retry and deadline

The roadmap-split WorkflowTemplate MUST set activeDeadlineSeconds: 3000 and a retryStrategy expression that retries exit code 75 only.

Scenario: The k8s check renders the retry policy

  • WHEN The command uv run devops ci --check --only k8s runs on the branch that holds the roadmap-split template.
  • THEN The k8s check passes and reports no error for the template that holds activeDeadlineSeconds: 3000 and the expression lastRetry.exitCode == 75.

Requirement: Plan-mode configuration

The roadmap-limits ConfigMap SHALL hold the key roadmap.split.plan_until as an RFC 3339 timestamp, and the roadmap-split WorkflowTemplate MUST read it as the environment variable ROADMAP_SPLIT_PLAN_UNTIL.

Scenario: The k8s check renders the plan-mode key

  • WHEN The command uv run devops ci --check --only k8s runs on the branch that holds the ConfigMap key and the template.
  • THEN The k8s check passes and reports no error for the ConfigMap key roadmap.split.plan_until and the environment variable ROADMAP_SPLIT_PLAN_UNTIL in the roadmap-split template.

Requirement: No main-container token

The main container of the roadmap-split workflow MUST run with no Kubernetes API token.

Scenario: The k8s check renders the token mount

  • WHEN The command uv run devops ci --check --only k8s runs on the branch that holds the roadmap-split template.
  • THEN The k8s check passes and reports no error for the template that holds automountServiceAccountToken: false and no serviceAccountToken volume mount in the main container.

Requirement: ADR 0022 labels

Each rendered roadmap-split WorkflowTemplate and CronWorkflow MUST carry the label set that ADR 0022 names.

Scenario: The k8s check renders the labels

  • WHEN The command uv run devops ci --check --only k8s runs on the branch that holds the roadmap-split objects.
  • THEN The k8s check passes and reports no error for the two objects that carry the ADR 0022 label set.

Requirement: Server-side dry run

The rendered roadmap-split objects MUST pass a server-side dry run.

Scenario: Dry-run the rendered objects

  • WHEN The command kustomize build k8s/devops | kubectl apply --dry-run=server -f - runs against the cluster.
  • THEN The command exits 0 and reports no error.

Requirement: Pending a person after the merge

After the merge, the roadmap-split schedule SHALL run one time as the App and write only to Loki while plan mode is active.

Scenario: Live proof of the first scheduled run

  • WHEN After the merge, a person reads the Loki lines for the first run of the roadmap-split schedule.
  • THEN The run happened one time as the App, and the result line shows plan mode and no write outside Loki.

Existing Tool Considered

Argo Workflows (argoproj/argo-workflows, Apache-2.0, maintained) has the verdict in-use; the alternatives check of 2026-12-01 in the issue body gives that result and lists what the tool covers and lacks. The proposal adds what the tool lacks: the roadmap-limits ConfigMap key roadmap.split.plan_until with the environment variable ROADMAP_SPLIT_PLAN_UNTIL, the clone step for the OpenSpec folders, and the ADR 0022 label set on the rendered objects. The semaphore name and limit are project settings: steward 1.

Key questions

  • Which semaphore and limit does the split row use?: The split row uses the semaphore steward with a limit of 1. The owner decision of 2026-11-13 sets this limit and overrides the triage semaphore in the proposed solution. (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: steward 1. The owner decision of 2026-11-13 and ADR 0021 put the split row on the one-slot steward semaphore.
    • Rejected: triage 2. The proposed solution predates the owner decision, which moves the split row to steward.
  • Which schedule does the split CronWorkflow use?: The split CronWorkflow uses the schedule 30 */6 * * * in UTC. The owner decision of 2026-11-13 keeps the CronWorkflow schedules that ADR 0021 states. (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: 30 */6 * * * UTC. The proposed solution gives this schedule, and the owner decision keeps the schedules that ADR 0021 states.
    • Rejected: A new schedule. The owner decision rejects a change of the schedules.
  • Which retry policy and deadline does the split row use?: The template retries exit code 75 only and sets activeDeadlineSeconds: 3000. (best practice) [sources: docs/guidelines/agentic-jobs.md, docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md]
    • Chosen: Exit 75 only. The guideline and ADR 0023 state that a step exits 75 for a later retry and that retryStrategy names the exit code.
    • Rejected: Retry all failures. It repeats permanent failures and hides defects.
  • How does the split workflow read its plan-mode key?: The roadmap-limits ConfigMap holds the key roadmap.split.plan_until as an RFC 3339 timestamp, set to 14 days after the date of the delivery commit. The split WorkflowTemplate reads the key as the environment variable ROADMAP_SPLIT_PLAN_UNTIL, and the entry command runs in plan mode while that time is in the future. The main container gets no API token, so no plan-gate step is needed. (best practice) [sources: CONTEXT.md, docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md]
    • Chosen: ConfigMap key and environment variable. It keeps the plan window in configuration and needs no API token and no new step.
    • Rejected: Plan-gate step that patches the ConfigMap. It needs a Kubernetes API token and code outside the manifest change.
    • Rejected: Hard-coded date in the template. It needs a manifest edit to end plan mode.
  • Which dependencies stay open?: feat(roadmap): the group row links a family and closes on a re-check #4813 is closed as not planned, so its dependency ends. feat(k8s): let Argo Workflows run roadmap pods in devops #4566 and docs(adr): add the resolve, group, split and step rows #4792 are delivered, because their change folders are archived. The item keeps the other dependencies that its Dependencies section lists: feat(roadmap): the split row files the parts of a stalled item #4819 and feat(roadmap): label Service Jobs by repository and item #4558. [sources: openspec/changes/archive/2026-11-30-4566-argo-roadmap-pods/proposal.md, openspec/changes/archive/2026-11-12-4792-add-the-resolve-group-split-and/design.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4819, #4558

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/feature
    scope/k8s
    status/new
    value/medium
    effort/medium
    on Nov 11, 2026
  3. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/k8s. The (k8s) scope of the title gives the scope.
    • Priority: P2-Medium. It is a planned automation with open dependencies and no user-facing outage.
    • Value: Medium. It automates two roadmap rows but they are not the most critical lanes.
    • Effort: Medium. Two CronWorkflows with semaphores, plan mode, and ConfigMap keys; the body estimates 1.5 hours.
    • Related: feat(k8s): let Argo Workflows run roadmap pods in devops #4566, which asks for a different change. Both define Argo Workflows in the devops namespace, but #4566 fixes the controller and image plumbing while the candidate adds two specific CronWorkflows.
  4. added
    priority/p2-medium
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Alternatives check: in-use

    Reason: The issue's own "Existing Tool Considered" names Argo Workflows CronWorkflows and its synchronization, which are installed, and the engine's CronWorkflow, semaphore/mutex and concurrencyPolicy features match every requirement in the body; no ADR rejects it (ADR 0008 and ADR 0021 chose Argo Workflows for the roadmap's scheduled work). Only the project-specific plan-mode gating and ConfigMap keys are left to write on top of it.

    The repository already uses this tool.

    Tool: argoproj/argo-workflows (https://github.com/argoproj/argo-workflows)

    • License: Apache-2.0
    • Last activity: 2026-11-14
    • Maintained: yes

    Covers:

    • CronWorkflow with UTC cron schedules ('45 3 * * *', '30 */6 * * *') for the group and split rows
    • concurrencyPolicy: Forbid so one run of a row at a time
    • Semaphores (triage, steward) and per-row mutexes for synchronization without a coordinator
    • activeDeadlineSeconds and retryStrategy on the workflow templates
    • WorkflowTemplate + CronWorkflow objects with labels, rendered by kustomize
    • Plan-mode and no-token pods are expressed in the same pod spec / template

    Lacks:

    • The run counter for plan mode ('first 2 runs' for group, '2 weeks' for split) and the roadmap.group.* / roadmap.split.* ConfigMap keys are project-side config to write, not engine features
    • The clone of the OpenSpec folders for split must be declared in the workflow spec
    • The ADR 0022 label scheme is a repository convention the manifests must add

    Tools considered:

    Searches run:

    • CronWorkflow activeDeadlineSeconds retryStrategy exit code 75 workflow template, results: 5
    • Argo Workflows CronWorkflow schedules concurrencyPolicy Forbid semaphore mutex synchronization, results: 5
    • argo-workflows.readthedocs.io cron workflows documentation, results: 5
    • argo workflows semaphore mutex synchronization documentation, results: 5
    • "CronWorkflow" argo workflows schedule documentation, results: 5
    • argoproj argo-workflows examples cron workflow schedule yaml, results: 5

    Sources:

    Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.

  6. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at e5dfddb 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.

  7. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    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.

  8. dan-petty commented on Dec 1, 2026

    @dan-petty
    OwnerAuthor

    Scope change of 2026-12-01: #4813 (the group row) is closed as not planned, with #4812 and #5815. So this item covers the split row only. Do not add the roadmap-group WorkflowTemplate, its CronWorkflow or the roadmap.group.* keys. The dependency on #4813 ends. The other dependencies stay.

  9. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/k8ssource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions