Skip to content

feat(roadmap): run the reconcile sweep on a cluster schedule #4574

Open

Description

@dan-petty

Problem or Motivation

After refine, alternatives and intake run in their own pods, the roadmap Service still runs the poll timer, the lane threads and the short rows (src/devops_cli/server/service.py:445-830). A timer in the router cannot run on 2 replicas without leader election. The clones and the poll tie the Service to a ReadWriteOnce volume and to Recreate.

Proposed Solution & Architectural Design

  • roadmap-sweep: a CronWorkflow with schedules: ["*/5 * * * *"], concurrencyPolicy: Forbid, startingDeadlineSeconds: 120, ServiceAccount roadmap-service, PVC roadmap-service-home. It runs the due table for each repository under roadmap:v1:lock:sweep:<owner>/<name> (renewed): the short rows in process (stage_ready, release_comments, retitle, implement submit and deadline, redeliver) and a submit for each long unit of work that it finds.
  • Intervals round up to 5-minute ticks (stage_ready 5, implement 10, release 15, metrics 15, refine 20, intake 30, stage 40, retitle 65). Each repository has an offset of index mod 5 minutes in the interval test.
  • Before it lists stage work, the sweep runs the orphan rule (stage_pending.py:52-62).
  • It reads the window before each row and skips the rows that are not urgent near the cap (metrics first); it does not wait.
  • With Valkey down, it runs only the implement deadline row.
  • Hints: the router creates a sweep of one repository named by the minute; on 409 or a held lock it sets roadmap:v1:due:<owner>/<name>:sweep; a sweep that ends reads the mark and creates one more sweep if the mark is newer than its start.
  • roadmap-metrics: every 15 minutes, its own clone directory on the same volume, each status page read one time for all repositories (today 7 times).
  • The clone path comes from RepoRef (<data>/roadmap/repos/<owner>/<name>/clone/, casefolded); _resolve_roadmap_repo_path (src/devops_cli/roadmap/run.py:322-340) moves into it.
  • Alerts: "no successful sweep in 15 minutes" (a dead-man alert), failed units, a stale due mark. They read recorded series. Rework the 6 Service alerts that read lane labels (k8s/monitoring/prometheus-values.yaml:693-764) in this pull request.
  • Related open items on the poll of today: feat(service): an idle repository polls less often #3672 (an idle repository polls less often), fix(service): each lane polls the issue events again #3942 (each lane polls the issue events again), fix(service): the metrics row sends too many counted requests #3941 (the metrics row sends too many counted requests). When this item merges, check each and close it as superseded with evidence, or keep the part that still applies.

Removes: RepoWorker (service.py:445-743), _tick_loop and _poll (service.py:805-830), service_jobs and the lanes (run.py:1614-1645), RequestBudget.poll_interval (service.py:315), the per-repository status page rows.

Target Subsystem

SDLC, Git & PR Governance (roadmap Service: src/devops_cli/roadmap/run.py, src/devops_cli/server/service.py, k8s/devops/).

Existing Tool Considered

Argo CronWorkflows (schedules, concurrencyPolicy) and valkey-py locks. A timer in the router is rejected (2 replicas would poll twice). One unit for each job of each repository on every tick is rejected (about 2,300 pods a day). Cost: about 200,000 tokens and 10 hours to build, about 15,000 tokens a month to keep, about 30,000 tokens to fix.

Acceptance Criteria

  • With roadmap-service at 0 replicas, the rows still run on schedule (live check).
  • A hint makes a sweep of its repository within 15 s; a second hint in the same minute makes one more sweep after the first.
  • Two sweeps of one repository never overlap.
  • The metric names that dashboards read stay, or the dashboards change in the same pull request.
  • Measure: row runs a day within 10 % of today (but stage_ready); GitHub requests a day at or under about 50,600; pods a day near about 1,100; API-server requests up by 15 % or less; head series within the series budget.

Dependencies

  • "feat(roadmap): keep schedules, intake and ledgers in Valkey".
  • "feat(roadmap): run each refine item in its own pod".
  • "feat(roadmap): run each alternatives check in its own pod".
  • "feat(roadmap): run intake and scoped intake in their own pods".

Source: #4517

Alternatives check of 2026-11-26: 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-25, maintained.
Reason: Searches found no tool that runs a per-repository due table. The Argo CronWorkflow that the issue already names covers the 5-minute cluster schedule and one run of a workflow, but no per-repository lock, offset or hint.

Covers:

  • */5 * * * * schedule with startingDeadlineSeconds: 120
  • concurrencyPolicy: Forbid keeps one run of the workflow
  • Runs each sweep as a pod with a ServiceAccount and PVC claim
  • No leader election needed in the router process

Lacks:

  • Due table with per-row intervals rounded to 5-minute ticks
  • Per-repository lock and the index mod 5 offset
  • Hint sweep and the 409 due mark
  • Valkey-down path that runs only the implement deadline row
  • Request window read before each row, metrics skipped first
  • One status-page read for all repositories in a second workflow

Owner decision 2026-11-13

The approved pipeline split (tracker #5482, Phase 4): the sweep runs due_jobs (#5504) over the incremental listing and the open roadmap PRs. It runs its deterministic steps in pipeline order in one pass, and it reads the item again after each step. No due mark and no sweep mark: on 409 or a held lock, the next scheduled sweep covers the item. A wake hint with no state comes only when the measured hop latency needs it.

  • Live proof: after the merge, the CronWorkflow runs as the App every 5 min for 24 h. A comment gives the result lines and one repeated create that got 409.

Proposed design

Problem statement

The roadmap Service still runs the poll timer, the lane threads and the short rows in its own process. A timer in the router cannot run on 2 replicas without leader election, and the clones and the poll tie the Service to a ReadWriteOnce volume and to Recreate. This change moves the reconcile sweep and the metrics row to cluster schedules: the sweep runs watch, ready, cleanup, status_sync, release_comments, redeliver, implement submit and deadline in pipeline order, submits a unit for each long step, creates a fix-checks unit for a failed bot pull request, and deletes a unit that waits too long. The owner decision of 2026-11-13 removes the sweep due mark and the sweep mark, so a 409 or a held lock leaves the item to the next scheduled sweep. The change removes the lanes, the poll, RepoWorker and the per-repository status-page reads.

Acceptance criteria

Requirement: Scheduled sweep

The roadmap SHALL run the reconcile sweep from a CronWorkflow named roadmap-sweep with schedule */5 * * * *, concurrencyPolicy: Forbid and startingDeadlineSeconds: 120.

Scenario: Rendered sweep workflow

  • WHEN uv run devops ci --check --only k8s renders the devops namespace.
  • THEN The check passes and renders roadmap-sweep with the schedule, Forbid, the deadline, ServiceAccount roadmap-service and claim roadmap-service-home.

Requirement: Pipeline order

The sweep SHALL get its due steps from due_jobs (#5504), which uses due_steps(state) of watch-row, and SHALL run them in pipeline order in one pass, reading the item again after each step.

Scenario: Due steps run in order

  • WHEN A test gives the sweep a state where watch and ready are due.
  • THEN The test records watch before ready, and the sweep reads the item again after each step.

Requirement: Repository lock and no due mark

A sweep MUST hold roadmap:v1:lock:sweep:<owner>/<name>, MUST run no row of a locked repository, and MUST write no sweep due mark.

Scenario: Held lock

  • WHEN A second sweep of dan-petty/devops-cli starts while the first sweep holds the lock.
  • THEN The second sweep runs no row and writes no roadmap:v1:due:dan-petty/devops-cli:sweep key.

Requirement: Row intervals

The sweep SHALL round each due step interval up to a 5-minute tick, so watch at 3 minutes is due every 5 and retitle at 61 minutes is due at 65.

Scenario: Retitle interval

  • WHEN A test sets the retitle row interval to 61 minutes.
  • THEN The due table holds 65 minutes for the retitle row.

Requirement: Repository offset

The sweep MUST offset the interval test of each repository by index mod 5 minutes.

Scenario: Third repository

  • WHEN A repository has index 3 and its release_comments row has an interval of 15 minutes.
  • THEN The row is due at minute 18 and not at minute 17.

Requirement: Long steps become units

The sweep SHALL run the deterministic steps in process and MUST submit one unit for each long step that has work and no unit.

Scenario: Refine step with no unit

  • WHEN The refine step of a repository has work and no unit of work.
  • THEN The sweep submits one unit of work and runs no model call in its own process.

Requirement: Valkey down

With Valkey down, the sweep MUST run only the implement deadline row.

Scenario: Valkey refuses the connection

  • WHEN The Valkey client raises a connection error at the start of a sweep.
  • THEN The sweep runs the implement deadline row for each repository and runs no other row.

Requirement: Orphan rule first

The sweep MUST run the orphan rule of stage_pending.py before it lists stage work.

Scenario: Stage listing order

  • WHEN A sweep starts a round for a repository.
  • THEN The orphan rule runs before the stage row lists an item, and the test asserts the call order.

Requirement: Request window

The sweep SHALL read the request window before each row and MUST skip a row that is not urgent near the cap, metrics first.

Scenario: Near the cap

  • WHEN The window holds fewer requests than the reserve, and the metrics workflow and the implement deadline row are due.
  • THEN The metrics workflow skips its status-page read, the sweep runs the implement deadline row, and neither waits for anything.

Requirement: Metrics workflow

The roadmap SHALL read each status page one time for all repositories in a CronWorkflow named roadmap-metrics every 15 minutes.

Scenario: Status page reads

  • WHEN roadmap-metrics runs for 7 repositories.
  • THEN It reads each status page one time and writes the result for all 7 repositories.

Requirement: Clone path

The sweep and the metrics workflow MUST use the clone path <data>/roadmap/repos/<owner>/<name>/clone/, built by RepoRef.

Scenario: Clone path

  • WHEN The code resolves the clone path of dan-petty/devops-cli.
  • THEN The path is <data>/roadmap/repos/dan-petty/devops-cli/clone/, and _resolve_roadmap_repo_path builds it from RepoRef.

Requirement: Alerts read recorded series

The roadmap Service alerts MUST read recorded series and MUST NOT select the lane label after this change.

Scenario: Rendered alert rules

  • WHEN uv run devops ci test tests/prometheus/test_k8s_monitoring_alerting.py runs.
  • THEN The test passes, no roadmap Service alert selects lane=, and the group holds the dead-man alert for no successful sweep in 15 minutes and the failed-unit alert.

Requirement: Dashboards match

Every metric that a monitoring dashboard queries MUST exist in the series that the code records.

Scenario: Dashboard queries

  • WHEN uv run devops ci test tests/prometheus/test_dashboard_queries.py runs.
  • THEN The test passes, and each dashboard query returns its expected samples from the recorded series.

Requirement: Lane removal

The change MUST remove RepoWorker, _tick_loop, _poll, service_jobs, the lanes and RequestBudget.poll_interval.

Scenario: Removed names

  • WHEN The code is imported and searched.
  • THEN src/devops_cli/server/service.py holds no RepoWorker, _tick_loop or _poll, and src/devops_cli/roadmap/run.py holds no service_jobs.

Requirement: Queue limit

The sweep MUST delete a unit that waits past the queue limit, apart from the unit deadline.

Scenario: Unit waits too long

  • WHEN A unit waits past the queue limit.
  • THEN The sweep deletes the unit and the item can get a new unit.

Requirement: Pending a person after the merge

After the merge, a person SHALL confirm the 24-hour CronWorkflow run and the fix-checks unit time.

Scenario: Live proof after the merge

  • WHEN A person runs the live checks after the merge.
  • THEN A comment gives the result lines of the 24-hour run, one repeated create that got 409, and the fix-checks unit time within 10 minutes.

Existing Tool Considered

Argo Workflows (argoproj/argo-workflows), the tool that the alternatives check in the issue body marks in-use; its block lists what the tool lacks. The change builds the sweep runner and its rows on top of the tool. Cost: about 200,000 tokens and 10 hours to build, about 15,000 tokens a month to keep, and about 30,000 tokens to fix.

Key questions

  • Which mechanism runs the reconcile sweep every 5 minutes without a leader in the Service?: A CronWorkflow named roadmap-sweep with concurrencyPolicy: Forbid and startingDeadlineSeconds: 120 runs the sweep with ServiceAccount roadmap-service and claim roadmap-service-home. The alternatives check in the issue body gives the in-use verdict for Argo Workflows and its block lists what the tool lacks. (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, docs/SERVICE_PATTERNS.md:52]
    • Chosen: CronWorkflow roadmap-sweep. The cluster schedule starts the sweep with no leader, and Forbid keeps one run of the workflow.
    • Rejected: Leader election in the router. The router needs 2 replicas for webhooks, and a timer there polls twice without leader election.
    • Rejected: One unit for each job of each repository on every tick. It starts about 2,300 pods a day.
  • Which deterministic steps does the sweep run, and in what order?: The sweep gets due steps from due_steps(state) of watch-row through due_jobs (feat(roadmap): one due_jobs function names the due jobs of an item #5504). It runs watch, ready, cleanup, status_sync (the Status writer), release_comments, redeliver, implement submit and deadline in pipeline order in one pass, and it reads the item again after each step. (best practice) [sources: src/devops_cli/roadmap/steps/watch.py:331, docs/CLUSTER.md:57, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:55, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:172]
    • Chosen: Pipeline order from watch-row. The owner scope update in the issue names this step list and the one-pass order.
    • Rejected: Old stage_ready and pr_conflicts list. The watch row replaces stage_ready and pr_conflicts.
    • Rejected: Separate unit for each step. It starts many pods and does not use the one-pass pipeline.
  • How does the sweep cover work that arrives between ticks?: Work that arrives between ticks waits for the next scheduled sweep, at most 5 minutes. The owner decision of 2026-11-13 removes the sweep due mark and the sweep mark: on a 409 or a held lock, the next scheduled sweep covers the item. The router may create a one-repository sweep only as a stateless wake hint, and that hint is added only when a measured hop latency shows it is needed. The sweep lock still keeps two sweeps of one repository apart. (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:36, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:56, CONTEXT.md:157, docs/SERVICE_PATTERNS.md:41]
    • Chosen: Next scheduled sweep. The owner decision removes the sweep due mark, so a 409 or a held lock leaves the item to the next 5-minute tick.
    • Rejected: Due mark on 409 or a held lock. The owner decision removes the sweep due mark.
    • Rejected: Poll in the router. The router needs 2 replicas, and a poll there needs leader election.
    • Rejected: Stateless wake hint now. The owner decision adds it only when a measured hop latency needs it.
  • How does one sweep of a repository exclude a second sweep of the same repository?: The sweep holds the Valkey lock roadmap:v1:lock:sweep:<owner>/<name> and renews it. concurrencyPolicy: Forbid alone excludes one run of the workflow, not one repository. (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:87, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:89, docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md:98, docs/SERVICE_PATTERNS.md:52, CONTEXT.md:154]
    • Chosen: Valkey lock for each repository. ADR 0021 puts the shared state in Valkey, and RepoRef names the key of one repository.
    • Rejected: concurrencyPolicy: Forbid alone. It holds across the whole workflow, so a sweep of another repository would wait.
    • Rejected: A Kubernetes Lease for each repository. It adds a second store of shared state beside Valkey.
  • Which intervals and offsets do the rows use?: Each interval rounds up to a 5-minute tick: watch 5, implement 10, release_comments 15, metrics 15, refine 20, intake 30, stage 40 and retitle 65 minutes. Each repository offsets the interval test by index mod 5 minutes, so the repositories spread over the five ticks. (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:315, src/devops_cli/config/defaults.py:1015, src/devops_cli/config/defaults.py:1235, src/devops_cli/config/defaults.py:1238, docs/SERVICE_PATTERNS.md:85]
    • Chosen: Round up to 5-minute ticks and offset by index mod 5. The sweep starts on a 5-minute schedule, and the offset spreads the repositories over the ticks so no tick starts every repository at once.
    • Rejected: Keep the current minute intervals. A row of 61 minutes needs a tick that the schedule does not have.
    • Rejected: One interval for every row. It runs the stage row as often as the watch row and raises the request count.
    • Rejected: No repository offset. Every repository is due on the same tick, which concentrates the requests and the pods.
    • Rejected: Random offset at each tick. The due test moves between ticks and can delay a row by up to 5 minutes each time.
  • Which rows run when Valkey is down?: Only the implement deadline row runs. Each other row reads or writes the shared state in Valkey. (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:89, docs/SERVICE_PATTERNS.md:99]
    • Chosen: Implement deadline row only. The deadline is a property of the item, and the row reads it from GitHub.
    • Rejected: No row. An expired deadline would wait for Valkey to return.
    • Rejected: Every row with a local fallback. It gives each row a second path and a second state.
  • Where does the clone of each repository live?: The clone lives at <data>/roadmap/repos/<owner>/<name>/clone/, casefolded. RepoRef.path_parts builds the path, and _resolve_roadmap_repo_path moves into it. (best practice) [sources: docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md:115, src/devops_cli/github/repo_ref.py:150, src/devops_cli/roadmap/run.py:465]
    • Chosen: RepoRef clone path. ADR 0022 gives the clone path to RepoRef in this item, so one rule names the path of each repository.
    • Rejected: Keep <base>/roadmap/<owner>/<name>/<leaf>. The sweep and the metrics row need one clone directory for each repository, and a leaf name does not give it.
  • How does the metrics row read each status page one time for all repositories?: A CronWorkflow named roadmap-metrics runs every 15 minutes with its own clone directory on the same volume. It reads each status page one time and writes the result for all repositories. (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:49, src/devops_cli/roadmap/run.py:1258, src/devops_cli/roadmap/run.py:1263, docs/CLUSTER.md:56]
    • Chosen: Own workflow every 15 minutes. One read for all repositories replaces 7 reads, and the row does not hold the sweep.
    • Rejected: Keep the row in the sweep. The sweep would read a status page for each repository on each tick that the row is due.
  • Which alerts replace the Service alerts that read lane labels?: The two Service alerts that select lane (RoadmapServiceJobsFailing and RoadmapServiceLaneStalled) are reworked in this pull request, and openspec/specs/roadmap-service-alerts/spec.md changes with them. A dead-man alert fires when no sweep succeeded for 15 minutes. Further alerts cover a failed unit and a unit that waits past the queue limit. (best practice) [sources: k8s/devops/monitoring/prometheus-rules-values.yaml:93, k8s/devops/monitoring/prometheus-rules-values.yaml:121, openspec/specs/roadmap-service-alerts/spec.md:55, docs/CLUSTER.md:145]
    • Chosen: Rework the alerts that select lane in this pull request. The lanes go in this change, so their series stop and their alerts must change in the same pull request.
    • Rejected: Keep the lane alerts until a later item. They would fire on a series that no longer exists.
  • Which metric names must stay for the dashboards?: The change keeps each metric name that a dashboard reads, or changes the dashboard in the same pull request. The row counter gains the labels repo, job and row. The dashboard k8s/devops/dashboards/roadmap-service-telemetry.json and the recording rule of the alert group change in the same pull request. (best practice) [sources: k8s/devops/dashboards/roadmap-service-telemetry.json:389, k8s/devops/monitoring/prometheus-rules-values.yaml:95, tests/prometheus/test_dashboard_queries.py]
    • Chosen: Keep the names and change the dashboards in the same pull request. A dashboard that reads a removed name shows no data, and the change that removes it must change the dashboard.
    • Rejected: Rename the metrics and update the dashboards later. The panels break between the two pull requests.
  • What happens to a unit of work that waits too long?: The sweep deletes a unit that waits past the queue limit, apart from the unit deadline. The watch row already deletes a fix Job that waited longer than roadmap.fix_checks.max_wait_minutes, with a log line (job_launcher.stale); the sweep applies the same rule to a unit that no free model place starts. (best practice) [sources: src/devops_cli/roadmap/fix_checks_row.py:21, src/devops_cli/roadmap/job_launcher.py:14, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:66]
    • Chosen: Delete the unit. A stale unit blocks its item and holds a place that a current unit can use.
    • Rejected: Leave it. It blocks the item until a person removes it.
    • Rejected: Raise the deadline. It spends tokens on work whose input has moved.
  • Which items must merge before this one?: The sweep needs feat(roadmap): keep schedules, intake and ledgers in Valkey #4565 (Valkey coordination), feat(k8s): let Argo Workflows run roadmap pods in devops #4566 (engine), feat(roadmap): run intake and scoped intake in their own pods #4567 (intake pods), feat(roadmap): run each refine item in its own pod #4568 (refine pods), feat(roadmap): run each alternatives check in its own pod #4573 (alternatives pods), refactor(roadmap): run the stage cleanup in the status lane #5026 (cleanup row) and feat(roadmap): one due_jobs function names the due jobs of an item #5504 (due_jobs). feat(roadmap): one watch row for plan and delivery PRs #5024 (watch row) has merged: watch is a row at src/devops_cli/roadmap/run.py:1231, and its OpenSpec change is archived, so it is no longer a dependency. (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:113, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:114, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:115, src/devops_cli/roadmap/run.py:1231, src/devops_cli/roadmap/fix_checks_row.py:5]
    • Chosen: Merge the open items first. The sweep reads due steps and locks in Valkey and creates units for the long steps.
    • Rejected: Build before the dependencies. The sweep would lack the due table, the watch row, the cleanup row and the engine.
    • Rejected: Keep feat(roadmap): one watch row for plan and delivery PRs #5024 as a dependency. The watch row has merged and its OpenSpec change is archived.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4565, #4566, #4567, #4568, #4573, #5026, #5504

Moved to new items

#4623

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/high
    effort/high
    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/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It removes the leader-election and ReadWriteOnce constraints but the current in-process scheduler still works, so it is not urgent.
    • Value: High. It lets the Service run at zero replicas, removes the Recreate strategy, and scales sweeps per repository without doubling polls.
    • Effort: High. It creates two CronWorkflows, removes five components, reworks six alerts, and must keep metric names stable in one pull request.
    • Related: feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981, which asks for a different change. Both schedule roadmap jobs, but #981 builds the in-process scheduler while the candidate replaces it with cluster-level CronWorkflows and removes RepoWorker and _tick_loop.
  4. added
    priority/p2-medium
    on Nov 11, 2026
  5. added
    status/ready
    and removed
    status/new
    on Nov 11, 2026
  6. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 818ac6f (see proposed design in issue body).

    Moved to new items: #4623.

  7. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    Scope update from the Service step jobs plan (#5014).

    The owner asked on 2026-11-12 for a separate job for each step that the Service jobs run the same way every time. This issue is the sweep-steps item of that plan. The plan is extract-first: each repeated step becomes one module and one command (devops roadmap step <name>) that every caller uses, and then the steps that cost most move to their own Jobs.

    Proposed title: feat(roadmap): run the reconcile sweep on a cluster schedule

    Problem (plan evidence)

    #4574 lists stage_ready, release_comments, retitle, implement submit and deadline, and redeliver as sweep steps. It does not list pr_conflicts, the cleanup or the status drift. After watch-row and cleanup-row these are status-lane rows that must move too.

    Added scope

    Change the step list of #4574: watch (in place of stage_ready and pr_conflicts), ready, cleanup, status drift (the Status writer), release_comments, redeliver (#4560), submit and deadlines. The reconcile uses due_steps(state) of watch-row. A queue limit, apart from the unit deadline, deletes a unit that waits too long (the measurement of engine). Router events (#4575, #4413, #4416) only make the sweep due sooner.

    Added acceptance

    Merge first

  8. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Reason: Searches surfaced Argo Workflows, an open (Apache-2.0), actively maintained workflow engine whose CronWorkflow resource supplies the cluster-side 5-minute schedule, concurrencyPolicy: Forbid and startingDeadlineSeconds that this item needs instead of an in-router timer. It covers only the scheduling half: it has no per-repository due table, per-repository lock or due mark, so the sweep runner, the Valkey locks (valkey-py gives only the lock primitive) and the row logic still have to be built.

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

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

    Covers:

    • Starts a sweep pod on a cluster cron schedule (*/5 * * * *) with no leader election or timer in the router
    • concurrencyPolicy: Forbid stops a second run of the same CronWorkflow while one is running
    • startingDeadlineSeconds bounds how late a missed schedule may start
    • Runs the sweep pod with a chosen ServiceAccount and a PersistentVolumeClaim (the roadmap-service SA and roadmap-service-home claim)

    Lacks:

    • No per-repository due table (row intervals rounded to 5-minute ticks plus an index mod 5 offset)
    • No per-repository exclusion: Forbid holds for the whole workflow, not for one repository, so roadmap:v1:lock:sweep:<owner>/<name> in Valkey is still needed
    • No hint/due-mark path (roadmap:v1:due:<owner>/<name>:sweep) for running one repository before its next tick
    • No request-window/rate-cap skipping of rows, no orphan-rule ordering and no Valkey-down fallback
    • No implementation of the short rows (stage_ready, release_comments, retitle, implement submit/deadline, redeliver) or of the long-row unit submission

    Tools considered:

    Searches run:

    • Kubernetes CronJob concurrencyPolicy Forbid schedule non-overlapping, results: 5
    • Argo Workflows CronWorkflow concurrencyPolicy schedule documentation, results: 5
    • argoproj argo-workflows cron workflows docs schedules, results: 5
    • "CronWorkflow" argo workflows "startingDeadlineSeconds", results: 5
    • argo-workflows cron-workflow.md docs fields schedules concurrencyPolicy, results: 5
    • argo workflows cron workflow, results: 5
    • kubernetes CronJob concurrencyPolicy Forbid, results: 5
    • Argo Workflows CronWorkflow documentation readthedocs, results: 5
    • argo-workflows.readthedocs.io cron workflows fields schedules concurrencyPolicy startingDeadlineSeconds, results: 5

    Sources:

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

  9. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: partly, tool https://github.com/argoproj/argo-workflows. A person decides what the new result means for the item.

    Searches (5)

    Tools considered:

    Searches run:

    • open source scheduler with per-key distributed lock and cron schedule Kubernetes, results: 5
    • Argo Workflows CronWorkflow concurrencyPolicy startingDeadlineSeconds schedule, results: 5
    • Argo Workflows CronWorkflow docs concurrencyPolicy Forbid, results: 5
    • argo-workflows.readthedocs.io CronWorkflow fields schedules concurrencyPolicy, results: 5
    • "CronWorkflow" Argo Workflows "The workflow engine for Kubernetes" documentation, results: 5

    Sources:

  10. added
    status/new
    and removed
    status/ready
    on Nov 26, 2026
  11. 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.

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/highpriority/p2-mediumscope/roadmapsource/agentstatus/newtype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions