Repository navigation
Description
Requested by the owner, 2026-10-09 (roadmap Service improvements).
Problem
Checked at release/v0.2.32 (a9d7fd8). The Service's schedule and logs and board 2 were read on 2026-10-09 (read-only).
The owner asked (2026-10-09):
Keep the next milestone that will be worked in a ready state before the release so that there is minimal delay in starting the next release, but we can still utilize our slow, background llm services
Today refine can't do that.
It has no cadence of its own.
- The refine row (
roadmap/run.py:646-651) has no interval. Refine runs only in a round where reprioritize succeeded, or where intake placed a P0 or a critical fix (_refine_cross_job,:387-394). - Reprioritize is due on a current-release change, or once a day (
is_due,roadmap/reprioritize.py:2441). A change to an item in a planned release does not make it due. - In the 24 h to 2026-10-09 18:00Z, reprioritize failed in 4 rounds, and refine was skipped in each of them.
It looks one release ahead, then stops.
select_candidates(roadmap/refine.py:705-762) takes the New items of the next planned release only (_find_next_planned_release,:674-680).- It then takes New backlog items only while fewer than
DEFAULT_ROADMAP_RELEASE_CAPitems are Ready across the next planned release and the whole backlog (:756-758). - That count is 109 today (10 in the release, 99 in the backlog), so the backlog step never runs.
- v0.2.33 has no New item. So the last Service refine round selected nothing and made no model call.
What waits as a result. None of these items has a refine section:
- v0.2.34's 6 New P1 items (feat(github): defect prs carry their hardening readiness blocker and post-merge audit #697, feat(cli): sandbox enforcement audit declared vs engine vs enforced (
devops sandbox audit) #698, feat(cli): worktree inventory & safe orphan reclamation (devops repos worktrees) #700, refactor(review): one rulebook for known false positives #770, refactor(review): review session store that owns layout, fingerprints and verdicts #771, fix(k8s): tunnel sync and url setup still overwrite settings they should keep #794); - v0.2.35's 7 New P2 items;
- P0 chore(github): Turn off AI Scan for pull requests to save allowance #1496;
- 28 New P1 items in the backlog.
Refine looks at them only once v0.2.33 starts, and then 3 per run. A start sends an item that is still New to the backlog ((PLANNED, NEW_AT_START) -> TO_BACKLOG, reprioritize.py:364). v0.2.28's start did that to #857, #861 and #983.
The configured cap is ignored. plan_refine receives the repository's config but never reads release_cap. Refine uses the default constant instead.
Throughput is not the limit. One item takes about 7-12 min on the background model: two calls, research then proposal. At 3 an hour that is about 70 items a day, and releases now ship every 8-24 h (v0.2.29 to v0.2.31).
Proposed remedy
Two changes in two files. No new job, record or setting.
- An hourly cadence.
- The refine row gets
interval=timedelta(minutes=DEFAULT_ROADMAP_REFINE_INTERVAL_MINUTES)andfirst_run_due=True, and keeps its cross-job trigger. The new constant is 60, beside the intake and closure intervals inconfig/defaults.py. - A round with nothing to refine makes no model call, because
plan_refinealready returns early. - A round of 3 items keeps this repository's worker busy for about 20-35 min, as refine after reprioritize does today. Each repository has its own worker.
- The refine row gets
- Selection by place, nearest first.
select_candidatestakes items in this order, up to the limit of 3, and still skips unchanged items:- New items in the current release: critical fixes and items a person placed there. This step covers what intake's refine hook was for; fix(roadmap): intake keeps the fields a person set on a card added during its planning #1404 deletes that hook.
- New items in each open planned release, nearest release first, by priority within each release.
- New P0 and P1 items in the backlog, by priority. This step finds none once feat(roadmap): reprioritize places every open p0 and p1 item in an open release, from the backlog and at a release start #882 keeps those items in releases.
- Other New backlog items, while fewer than the configured
release_capitems are Ready across the next planned release and the backlog. This is today's rule, now with the config value.
- Docs:
- the
refineandrunhelp texts (lang/en/help.py); docs/commands/roadmap.md, regenerated;- the refine module docstring;
- a
changelog.dfragment.
- the
Related:
- fix(roadmap): intake keeps the fields a person set on a card added during its planning #1404: removes the intake hook.
- fix(roadmap): refine writes its section's end marker, so a re-refined item keeps one design section instead of two #1470: a re-refined item gets one design section. That matters once a person answers an item's open question.
- feat(roadmap): reprioritize places every open p0 and p1 item in an open release, from the backlog and at a release start #882: places P0/P1 items in planned releases, which this then readies.
- feat(ai): item refinement to ready with proposed decisions (
devops roadmap refine) #744: the origin of today's rule.
Acceptance criteria
- With no reprioritize run in the round, refine is due 60 min after its last success, and on a first run.
devops roadmap run --dry-runnames the interval as the reason (stub-table tests). - On the in-memory store, when the next planned release is all Ready and a later planned release holds New P1 items, refine selects the later release's items, highest priority first, up to 3.
- A New critical fix in the current release is selected before any planned-release item.
- A New P1 backlog item is selected before a New P2 backlog item. P2 and P3 backlog items are selected only while fewer than
release_capitems, read from the config, are Ready across the next planned release and the backlog. One test setsrelease_cap = 3. - An item whose body and section are unchanged since its last refine is still skipped. A round that selects nothing makes no model call: the scripted gateway sees zero requests.
- Tests are offline and each takes under 1 s.
uv run devops cipasses. - Person check after deploy:
- the Service's first refine round selects 3 of v0.2.34's New P1 items;
- within a day, every New item in v0.2.34 and v0.2.35 has either a refine section or a refine comment naming its open question;
schedule.jsonshows refine's last success within the last 2 h.
Proposed design
Problem statement
The roadmap refine job has no cadence of its own: it runs only when reprioritize succeeds or intake places a P0/critical fix, and it selects only New items from the single next planned release. As a result, items in later planned releases and the backlog are never refined until the current release starts, and the configured release_cap is ignored in favour of a hard-coded constant. The owner needs the next milestone kept in a ready state before its release starts so that starting the next release causes minimal delay, while still using the slow background LLM services.
Acceptance criteria
- Criterion 1: Refine is due on its own 60-minute interval independent of reprioritize, and on first run.
Verification: Stub-table tests assert thatdevops roadmap run --dry-runnames the 60-minute interval as the reason refine is due when reprioritize did not run in the round, and that a first run is due. - Criterion 2: When the next planned release is all Ready and a later planned release holds New P1 items, refine selects the later release's items, highest priority first, up to 3.
Verification: In-memory store test: set the next planned release to all Ready, place New P1 items in a later planned release; assert select_candidates returns those items in priority order, capped at 3. - Criterion 3: A New critical fix in the current release is selected before any planned-release item.
Verification: In-memory store test: place a New critical fix in the current release and New items in a planned release; assert the critical fix appears first in the candidate list. - Criterion 4: A New P1 backlog item is selected before a New P2 backlog item; P2 and P3 backlog items are selected only while fewer than the configured release_cap items are Ready across the next planned release and the backlog.
Verification: In-memory store test with release_cap set to 3: place New P1 and P2 backlog items; assert P1 is selected first and P2 is selected only when the Ready count is below 3. - Criterion 5: An item whose body and section are unchanged since its last refine is still skipped; a round that selects nothing makes no model call.
Verification: Test with an unchanged item asserts it is absent from the candidate list; test with no candidates asserts the scripted gateway sees zero requests. - Criterion 6: Tests are offline and each takes under 1 second; the full CI suite passes.
Verification:uv run devops cipasses with all tests running offline and each individual test completing in under 1 second. - Criterion 7: After deploy, the Service's first refine round selects 3 of v0.2.34's New P1 items; within a day every New item in v0.2.34 and v0.2.35 has a refine section or a refine comment naming its open question; schedule.json shows refine's last success within the last 2 hours.
Verification: Person inspects the Service logs, the project board, and schedule.json after deployment.
Key questions
None.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
[end-marker]
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty-bot commentedon Oct 9, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
The owner explicitly requested it to reduce release-start delay, but it is a workflow improvement rather than a correctness or security defect.Without it, items in upcoming releases sit unrefined until the release starts, directly delaying every subsequent release.Two files change (a new interval constant plus selection reordering), plus docs and a changelog fragment, but no new job, record, or schema is introduced.dan-petty-bot commentedon Oct 9, 2026
Status set to Ready at 198a273 (see proposed design in issue body).
dan-petty commentedon Oct 9, 2026
Owner finding, 2026-10-09: the Service sat idle while unrefined items looked Ready
The research items #273-#278 (2 P0, 4 P1) were placed in v0.2.33 on 2026-10-09 with board Status Ready, yet none has ever been refined: no
devops-roadmap-refinesection, bodies of about 1 KB each. They have sat in the backlog since they lost their v0.3.x milestones on 2026-10-04 (the #739 migration also left their Status at Ready), and the Service was idle the whole time. Their v0.2.33 assessment then had to send them back.The owner's expectation: the Service keeps working, in small batches each interval, until every open item is prioritized (intake, delivered), every P0/P1 has an open milestone (#882), and every item in a planned release is ready to be worked before that release becomes current (this item). Two additions to this item's criteria:
select_candidatesalso takes items whose Status is Ready but whose body has no refine section (Ready set by migrate, sync or a person without a design), in the same nearest-release-first order, so refine either confirms them Ready with a design or sets them back to New with its open questions.A release start still pulls only Ready items; with the first addition, Ready can no longer mean "never looked at".
dan-petty commentedon Oct 9, 2026
Decisions before the build (2026-10-09)
roadmap run --dry-runnames the interval as the reason"): proven through the due tuple (due at 60 min, not at 59, due on a first run,Due: refinein the CLI dry run). A per-job reason line would reshape_Poll.is_due, the dry-run return and the MCP parse that feat(cli): reachable--dry-runpreviews for delegated commands #412 is changing now, so it is noted on feat(cli): reachable--dry-runpreviews for delegated commands #412 rather than built here.feat(roadmap): refine runs every hour and readies the new items of ev…
dan-petty-bot commentedon Oct 9, 2026
What changed
#1531, merged into
release/v0.2.33as 9acf127.13 file(s) changed.
How it was verified
Check runs at d9f2d79:
Acceptance Criteria of
docs/agent/tasks/task-1515-refine-hourly-nearest-release-first.md:devops roadmap run --dry-runprintsDue: refine(tests/test_roadmap_run.py::test_refine_is_due_an_hour_after_its_last_success_and_on_a_first_run)._Poll.is_due, the dry-run return and the MCP parse that feat(cli): reachable--dry-runpreviews for delegated commands #412 is changing.test_due_table_scenariosandtest_order_and_cross_job_triggerspin refine's last success at 59 min, with the same expected tuples, and a new case with nothing else due gives().test_idle_records_zero_or_one_store_callspins refine at 30 min.tests/test_roadmap_refine.py::test_a_later_planned_release_is_refined_once_the_next_one_is_ready).test_a_critical_fix_in_the_current_release_goes_before_any_planned_item).release_cap = 3, read from.github/roadmap.tomlthroughplan_refine, are Ready across the next planned release and the backlog (test_backlog_p2_and_p3_wait_for_the_configured_release_cap, with 3 and 1 Ready items).test_a_round_after_refine_left_items_new_skips_them_and_calls_no_model).test_ready_items_refine_never_saw_are_taken_in_planned_releases_and_backlog_p0_p1).test_a_ready_item_refine_finds_not_ready_goes_back_to_new_and_is_then_skipped).[end-marker]section followed by refine's marked one) is skipped at selection with the person-edit reason, and the New item behind it gets the round's one place (test_an_item_refine_would_skip_for_a_person_edit_takes_no_place).test_selection_next_release_backlog_priorities_and_cap, the_seed_new_itemscases) pass unchanged. The new tests are offline, and each takes under 1 s.uv run devops ciis the pull request's gate.gh project item-list 2 --owner dan-petty --limit 1000 --format json --jq '.items[] | select(.milestone.title == "v0.2.35" and ((.status == "New" and (.content.body | contains("<!-- devops-roadmap-refine:end -->") | not)) or (.status == "Ready" and ((."job record" // "") | contains("refine.section_hash") | not)))) | .content.number'prints nothing: every New item in v0.2.35 holds a refine section, and every Ready one has a refine record. On 2026-10-09 it printed feat(ai): llm gateway tuning render and apply configuration with rollback #478, feat(cli): oci container image packaging, standardized metadata & ghcr package integration #438, feat(cli): outward-facing capability & upstream maturity survey #425, feat(cli): blind exception handling policy #423, feat(ai): synthetic prompt adversaries for injection resistance #417, feat(cli): structured fuzzing of parsers and schema boundaries #416, feat(cli): output format adoption across the command surface #411 and feat(cli): local-path provisioner volume reclaim failures #410.kubectl -n devops exec deploy/roadmap-service -- cat /home/devops/.data/roadmap/dan-petty/devops-cli/schedule.jsonshows arefinetime less than 2 h old. If it is older,kubectl -n devops logs deploy/roadmap-service -c service --since=2h | grep 'Refine skipped'names the item whose model call keeps failing (the first known limit below).kubectl -n devops logs deploy/roadmap-service -c service --since=3h | grep -E "dan-petty/devops-cli: GraphQL|No repository starts a Service round"prints a spend line for each round and no pause line: the hourly refine rounds do not run the account's GraphQL points out.dan-petty commentedon Oct 9, 2026
Note (2026-10-09): with this item's hourly cadence, refine keeps the slow background model busy across all 8 repositories, and a repository's close and reprioritize wait behind its refine round (seen live today with the daily cadence: about 40 queued model calls held every repository's round for 40+ minutes). The fix is filed as the two-lane change linked below; it should land before or with this item reaching the Service.
feat(release): v0.2.33 (#1537)
fix(roadmap): refine gives every item it cannot ready a next step ins…
fix(roadmap): a backlog full of ready items does not stop refine befo…