Skip to content

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

Description

@dan-petty

Requested by the owner, 2026-10-09, after the Service stalled with every repository's round queued.

Problem

Checked at release/v0.2.33 (after #1515) and in the running Service (v0.2.32), read-only.

Proposed remedy

Acceptance criteria

  • With a model-lane round blocked on a slow fake model, a pull_request-closed trigger for the same repository runs close within one poll and closes the delivered item; a ship still starts the next release.
  • Each lane runs at most one round at a time per repository; schedule.json records each job's last success as today.
  • Metrics report queue depth per lane, so a stalled model lane is visible.
  • AGENTS.md's roadmap-service section and ADR 0003 describe the two lanes; changelog.d/<issue>.md.

Activity

  1. added
    type/bug
    scope/roadmap
    on Oct 9, 2026
  2. dan-petty commented on Oct 9, 2026

    @dan-petty
    OwnerAuthor

    Placed in v0.2.33 by the owner, 2026-10-09, as a blocker: it lands before v0.2.33's release PR merges, so hourly refine (#1515) and the separate release lane go live together.

  3. added this to the v0.2.33 milestone on Oct 9, 2026
  4. dan-petty-bot commented on Oct 10, 2026

    @dan-petty-bot
    Collaborator

    What changed

    #1536, merged into release/v0.2.33 as 2f3ed2a.

    Summary

    • The roadmap Service runs two lanes per repository, each with its own worker and queue: the release lane runs close, reprioritize and metrics, and the model lane runs intake and refine. A release-lane round never waits for a model-bound round. Both lanes get every poll and webhook, and the shared round pause (fix(roadmap): a GraphQL budget refusal pauses every Service worker until the reset, and each Service round ends with its spend line #1400) holds both.
    • server/service.py: one RepoWorker per repository and lane. create_service_app(jobs=...) and ServiceManager(jobs=...) replace job=, and app.state.jobs replaces app.state.job. queue_depth, jobs_total, job_seconds_total and job_start_timestamp_seconds carry a lane label. The span keeps its name service.job <repo> and gains the attribute service.lane. The round-failure and worker-crash log lines carry lane. triggers_total still counts once per repository.
    • roadmap/run.py: RELEASE_LANE_ROWS and MODEL_LANE_ROWS; DEFAULT_DUE_TABLE is the two combined, so devops roadmap run, its --dry-run and the MCP mirror are unchanged. SERVICE_JOBS binds service_job(batch, *, table, clone_dirname) to each lane.
    • schedule.json: _record_success writes one job's success under a lock, so the lanes no longer overwrite each other's last successes.
    • Refine gains a due rule, so a reprioritize success in the release lane makes refine due at the model lane's next poll.
    • roadmap/github_store.py: one process-wide lock covers each job-record read-modify-write (set_field, set_marks, set_run_record, `set_card_fi…

    24 file(s) changed.

    How it was verified

    Check runs at 3539656:

    • Prune PR DevContainer Images: pass
    • bandit: pass
    • devops-cli: pass
    • CodeQL: pass
    • Static Analysis: pass
    • Analyze (actions): pass
    • Analyze (python): pass
    • Tests & Coverage: pass
    • Changed-Test Independence: pass
    • DevContainer Image: skipping
    • Service Image: skipping
    • Dependency Freshness: skipping

    Acceptance Criteria of docs/agent/tasks/task-1532-service-release-and-model-lanes.md:

    • With a model-lane round blocked through a stub refine runner standing in for a slow model, a pull_request closed trigger for the same repository runs close within one poll and closes the delivered item, and a ship's release published trigger still makes reprioritize start the next release, while the refine round is still running (tests/test_roadmap_run.py::test_a_blocked_model_lane_holds_back_neither_a_delivered_items_close_nor_a_ships_start: two lanes in a ServiceManager, the real close and reprioritize adapters over the in-memory store, check verdicts patched at devops_cli.github.check_verdict.fetch_pr_check_verdicts; the model lane's refine row gets the stub through the JobRow runner seam, since _run_refine_adapter builds its own LLMClient and needs a clone, so a blocking fake model has no seam there without new plumbing). Through the HTTP app, a signed pull_request closed webhook runs a release-lane round while the model lane's round is still active (tests/test_server_service.py::test_a_webhook_runs_the_release_lane_while_the_model_lanes_round_is_blocked).
    • Each lane runs at most one round at a time per repository, and the triggers that arrive during a blocked model round wait as one model-lane batch (the same service test). schedule.json records each job's last success as before, and every success stays when the lanes' rounds interleave (test_each_lanes_success_stays_in_schedule_json_when_their_rounds_interleave, which fails on the whole-snapshot write). A reprioritize success the release lane records makes refine due at the model lane's next poll, and refine is not due again once it has succeeded since (test_a_reprioritize_success_makes_refine_due_at_the_model_lanes_next_poll, which fails without _refine_due). Each lane updates only its own clone, and a model-lane round leaves a change in clone alone (test_each_lane_updates_only_its_own_clone, against a bare remote).
    • Two stores marking one card at once keep each other's marks: refine's body hash, written between reprioritize's card read and its write, stays beside reprioritize's Pending (tests/test_roadmap_github_store.py::test_two_lanes_marking_one_card_at_once_keep_each_others_marks, two stores over the shared GitHubFake, which fails without _JOB_RECORD_LOCK). Of two stores setting one item's Release at once, the later raises RoadmapCardChangedError naming the earlier's milestone, which stays (test_two_lanes_placing_one_item_at_once_never_replace_a_release_unseen, which fails with the milestone check outside the lock).
    • Metrics report queue depth per lane: while the model lane is blocked with a trigger waiting, /metrics shows devops_cli_service_queue_depth{lane="model",repo=...} 1.0 beside {lane="release",...} 0.0, and the release lane's jobs_total and job_seconds_total carry its lane (test_metrics_show_a_stalled_model_lane_by_its_queue_depth). A budget refusal in the model lane holds the release lane's next round through the shared pause until the reset (test_a_budget_refusal_in_the_model_lane_holds_the_release_lane_too).
    • AGENTS.md's roadmap-service section, ADR 0003 and CONTEXT.md (Lane) describe the two lanes; changelog.d/1532.md holds the entry.
    • tests/test_swallowed_failures_ratchet.py passes with the ceilings unchanged (src/devops_cli/roadmap/run.py 6, src/devops_cli/server/service.py 5). The new tests reach no network or DNS and wait on events with short timeouts.
    • uv run devops ci is the pull request's gate.
    • Pending a person, once v0.2.33 merges to main and Argo CD deploys its image: kubectl -n devops rollout status deploy/roadmap-service --timeout=180s, then kubectl -n devops exec deploy/roadmap-service -- curl -s -f http://localhost:8000/healthz and .../readyz both answer 200.
    • Pending a person: kubectl -n devops exec deploy/roadmap-service -- curl -s http://localhost:8000/metrics | grep -E 'service_(queue_depth|jobs_total|job_seconds_total|job_start_timestamp_seconds)' lists each series with lane="release" and with lane="model" for every repository in service.repos.
    • Pending a person: while a model round runs (devops_cli_service_queue_depth{lane="model"} at 1, or a job_start_timestamp_seconds{lane="model"} older than 300 s), devops_cli_service_jobs_total{lane="release",result="success"} still rises at every poll. Only a failed round's Service job execution failed line and a worker crash's line carry "lane", so kubectl -n devops logs deploy/roadmap-service -c service --since=10m shows one only when a round failed.
    • Pending a person: a merged pull request's delivered item closes within one poll (300 s) while a refine round runs.
    • Pending a person: kubectl -n devops exec deploy/roadmap-service -- sh -c 'ls -d /home/devops/.data/roadmap/*/*/model-clone' prints one line per repository, the clone directories are unchanged, and the PVC's use grows by about one more set of clones (about 117 MB on 2026-10-09).
    • Pending a person: kubectl -n devops exec deploy/roadmap-service -- sh -c 'cat /home/devops/.data/roadmap/*/*/schedule.json' lists close, reprioritize, metrics, intake and refine for each repository. Each refine time follows its reprioritize time once the model lane has finished a round that started after that reprioritize; until then a model round is in progress or due at the next poll (devops_cli_service_queue_depth{lane="model"} or devops_cli_service_job_start_timestamp_seconds{lane="model"}), and while refine keeps failing it stays behind (Known limits).
    • Pending a person: for the GraphQL budget, kubectl -n devops logs deploy/roadmap-service -c service --since=3h | grep 'GraphQL,' and take the lowest "N left" before each hourly reset, not the sum of the round lines: concurrent rounds count each other's points. It stays well under 5,000 points an hour (1,178 to 1,413 on 2026-10-09, 19-21 UTC); if it nears the budget, raise service.poll_interval_seconds.
    • Pending a person, for the REST core budget: every poll and webhook now runs a round in each lane, and each round reads the issue-event, pull-request and Release listings, so core reads about double: roughly 480 more requests an hour at 8 repositories, 12 polls an hour and about 5 reads a round, all through the one pacer. On the old pod before Argo CD rolls the image out, and on the new one an hour after, count the pauses with kubectl -n devops logs deploy/roadmap-service -c service --since=1h | grep -c "Mandatory pause for 'core'" and take their largest delay with ... | grep "Mandatory pause for 'core'" | grep -o 'delaying [0-9.]*' | sort -k2 -n | tail -1 (at most 5.30 s on 2026-10-09), or read core's used before its hourly reset with kubectl -n devops exec deploy/roadmap-service -- gh api rate_limit --jq .resources.core. Core stays well under 5,000 requests an hour and its pauses stay near their earlier size; if either grows toward its limit, raise service.poll_interval_seconds.
    • Pending a person: kubectl -n devops top pod -l app.kubernetes.io/name=roadmap-service stays well under the 1Gi memory limit (362Mi before this change).
  5. added a commit that references this issue on Oct 10, 2026
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

    scope/roadmaptype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions