Repository navigation
Closed
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/githubGitHub Projects v2, Views, Milestones, Labels, and PR automationscope/releaseThe release-please workflow, the changelog and the published artifactstype/featureType feature: a new function
Milestone
Description
Ready: implementation plan (refined 2026-10-17 at 3dd7fa6)
This section supersedes any text below that conflicts with it.
Decisions
- How a pass is requested:
gh pr edit <n> --add-reviewer @copilot, throughrun_gh. The pinned gh 2.102.0 (Dockerfile:17-19, and the devcontainer's gh) documents it ingh pr edit --help: "Add or re-request reviewers by their login. Use "@copilot" to request review from Copilot." The REST requested-reviewers route for the Copilot bot is not documented, so it is not used. - What counts against the budget: every Copilot review submitted on the pull request, whoever asked for it, plus a pass still running (
_detect_copilot_status,src/devops_cli/github/pr_monitor.py:399). A Copilot review is one whose author login is exactlycopilot-pull-request-reviewer[bot](REST) orcopilot-pull-request-reviewer(GraphQL), as read on feat(release): v0.2.28 #1283's 13 Copilot reviews. The logins go inconstants.py, and_is_copilot_review_dict(pr_monitor.py:290) uses them instead of matching "copilot" anywhere in a login, so the monitor and the budget agree. The automatic pass when the pull request opens is pass 1 whenever the ruleset gives one. feat(release): v0.2.34 #1566, feat(release): v0.2.35 #1581 and feat(release): v0.2.36 #1615 got no Copilot review at all, so today the command also requests the first pass. - Where the budget lives:
.github/roadmap.toml, keyrelease_copilot_passes, a field onRoadmapConfig(src/devops_cli/roadmap/config.py:38,extra="forbid") withge=1. Its default of 2 (DEFAULT_ROADMAP_RELEASE_COPILOT_PASSES) goes indefaults.py. It is read at the default branch, like every roadmap setting. - Per release pull request: the count comes from that pull request's reviews and nothing is stored, so a new release pull request starts with a fresh budget.
- Which pull requests: release pull requests only (
_is_release_pr,src/devops_cli/commands/pr.py:1462). Any other pull request is refused, which keeps ADR 0004's rule that Copilot reviews only pull requests intomain. devops releaserequests no pass: the first pass comes from the ruleset when the pull request opens, or fromdevops pr copilot-passwhen the ruleset gives none. So the new command is the only code that requests one.devops pr edithas no reviewer option (pr.py:756), so nothing goes around the budget.- When the budget is spent: the command requests nothing, prints "Copilot budget spent: N of N passes", and exits 1.
--dry-runmakes no request. - The
devops pr monitorgate once the budget is spent: the last Copilot review's "changes recommended" state no longer blocks (is_review_ready,pr_monitor.py:129-137). A pass still running, unresolved threads and a person's requested changes still block. No further pass could clear that state, and under the stop rule the threads are what block the release. If the reviews can't be read, the budget is unknown and the monitor blocks, as it does today for an unread state. - How threads become issues:
devops pr threads file-issues <pr>previews by default, reading but writing nothing.--confirmwrites, and--dry-runmakes no request and prints the requests it would make (the repository's--dry-runrule, feat(cli): reachable--dry-runpreviews for delegated commands #412).--keep <thread-id>, repeatable, leaves a thread open for a regression fixed in the release. Release pull requests only. - How an issue is filed: through
RoadmapStore.create_issue(src/devops_cli/roadmap/store.py:850), with no milestone and no priority. It is labeledsource/agent, because the text is a model's, so feat(roadmap): agent filing quota: release credit, ratio throttle, borrowing and per-release tuning #1153's quota applies when intake places it. Intake takes it as "an open issue not on the board" (src/devops_cli/roadmap/intake.py:3), and no model is called here.- Title:
chore(review): follow up <path>:<line> from #<pr>. - Body: the thread's comments inside a fenced block longer than any fence in the text, so no
@nameor#Nin them notifies or links, cut to a constant length; then<path>:<line>and the thread's link. - The link is the first comment's
url, which the thread queries add to their comment selection (src/devops_cli/github/pr_threads.py:110-117,:133-140) andReviewComment(:17-23) carries.
- Title:
- Order and reruns: file, then reply "Filed as #N" with a marker constant, then resolve. A rerun resolves a thread whose reply already holds the marker without filing again, so a run that stops part-way never files twice.
- The stop rule goes in
RELEASE_CYCLE.mdStep 3 (:199-210). ADR 0004's decision (line 3) anddocs/SDLC.md:299and:302say re-reviews go throughdevops pr copilot-passwithin the budget.
Delivery
- PR 1 (M): Refs feat(github): a release pull request gets a set number of copilot passes, and later review threads become follow-up issues #1345. The budget field and default,
src/devops_cli/github/copilot_budget.py(count the passes, decide, request), thedevops pr copilot-pass [<number>] [--dry-run]command, the monitor change, the stop rule and the policy text. Tests first:- In
tests/test_github_copilot_budget.py, over cannedpulls/{n}/reviewspayloads and a fakerun_gh, offline: no Copilot review means a pass is requested with--add-reviewer @copilot; one review out of 2 means a request; two reviews means no request, a "2 of 2" message and exit 1; a running pass counts; a user whose login contains "copilot" does not count; a pull request that is not a release pull request is refused; unread reviews fail with the read error;--dry-runmakes no request. - In
tests/test_roadmap_config.py:release_copilot_passesdefaults to 2, and 0 or an unknown key fails, naming the key. - In
tests/test_github_pr_monitor.py: once the budget is spent, changes recommended no longer block, while an unresolved thread and a running pass still do; a review by a user whose login contains "copilot" is not Copilot's. - Files:
src/devops_cli/github/copilot_budget.py,src/devops_cli/github/pr_monitor.py,src/devops_cli/commands/pr.py,src/devops_cli/roadmap/config.py,src/devops_cli/config/defaults.py,src/devops_cli/config/constants.py,src/devops_cli/lang/en/help.pyandmessages.py,.github/roadmap.toml(the key, commented),RELEASE_CYCLE.md,docs/adr/0004-ci-is-the-authoritative-gate.md,docs/SDLC.md, the generated command docs,changelog.d/1345.md, anddocs/agent/tasks/task-1345-*.md.
- In
- PR 2 (M): closes feat(github): a release pull request gets a set number of copilot passes, and later review threads become follow-up issues #1345.
devops pr threads file-issues. Tests first, intests/test_github_pr_threads.py, with a scripted GraphQL runner and the in-memory roadmap store (src/devops_cli/roadmap/memory_store.py:519), offline:- two unresolved threads give two issues with the fenced text,
path:lineand the thread URL, labelsource/agentand no milestone, then a reply naming each issue, then a resolve, in that order; --keepleaves its thread untouched;- the default mode writes nothing, and
--dry-runmakes no request; - a thread whose reply holds the marker is resolved and not filed again;
- a failed create stops before the reply and resolve of that thread;
- a thread that holds
@someoneand#12gives a body where both sit inside the fence. - Files:
src/devops_cli/github/pr_threads.py,src/devops_cli/commands/pr.py(threads_app,:2637),src/devops_cli/config/constants.py,src/devops_cli/lang/en/help.pyandmessages.py,tests/test_github_pr_threads.py,RELEASE_CYCLE.md, the generated command docs,changelog.d/1345.md(extended), and the task file.
- two unresolved threads give two issues with the fenced text,
Acceptance criteria
-
.github/roadmap.tomlcan setrelease_copilot_passes. The default is 2, and a value below 1 fails, naming the key. -
devops pr copilot-passrequests a Copilot pass on a release pull request only while the submitted plus running Copilot passes are below the budget. Otherwise it requests nothing, says "N of N", and exits 1. It refuses any other pull request. - Only reviews by the two exact Copilot logins count.
- No other code path requests a Copilot review:
rg -n '@copilot' srcfinds only the budget module and its constants. - Once the budget is spent,
devops pr monitoron the release pull request no longer waits on Copilot's changes-recommended state. It still waits on a running pass, on unresolved threads and on a person's requested changes. -
devops pr threads file-issues <pr> --confirmturns every unresolved thread not named by--keepinto one issue: fenced thread text,path:line, the thread link,source/agent, no milestone. It then replies with the issue number and resolves the thread. A rerun files nothing twice. - The default mode reads and writes nothing.
--dry-runmakes no request and lists the requests it would make. -
RELEASE_CYCLE.mdStep 3 states the stop rule: once the budget is spent, a remaining comment blocks the release only if it is a regression the release introduces, and every other comment becomes a follow-up issue throughfile-issues. - ADR 0004 and
docs/SDLC.mdsay re-reviews go throughdevops pr copilot-pass. - The tests run offline over canned GitHub payloads.
-
changelog.d/1345.mdrecords the change.CHANGELOG.mdanddocs/ROADMAP.mdare not edited. -
uv run devops cipasses. - Pending a person: on the v0.2.37 release pull request,
uv run devops pr copilot-pass <n>requests a pass that Copilot submits, and a third call says the budget is spent.
Current references
RoadmapConfig:src/devops_cli/roadmap/config.py:38; roadmap defaults:src/devops_cli/config/defaults.py:836-845;CONST_ROADMAP_CONFIG_PATH:src/devops_cli/config/constants.py:2265PRMonitorStatus,is_review_ready:src/devops_cli/github/pr_monitor.py:83,:129-137_is_copilot_review_dict, which today matches "copilot" anywhere in a login:src/devops_cli/github/pr_monitor.py:290_detect_copilot_status,_fetch_raw_reviews,get_pr_monitoring_status:src/devops_cli/github/pr_monitor.py:399,:500,:625ReviewComment, thread queries:src/devops_cli/github/pr_threads.py:17-23,:110-117,:133-140- List, reply, resolve:
src/devops_cli/github/pr_threads.py:246,:260,:275 _is_release_pr:src/devops_cli/commands/pr.py:1462;devops pr edit::756;threads_app::2637RoadmapStore.create_issue:src/devops_cli/roadmap/store.py:850; in-memory:src/devops_cli/roadmap/memory_store.py:519; GitHub:src/devops_cli/roadmap/github_store.py:1645source/agent:.github/labels.yml:137;CONST_ROADMAP_SOURCE_AGENT_LABEL:src/devops_cli/config/constants.py:2372- Release procedure Step 3:
RELEASE_CYCLE.md:199-210; ADR 0004 decision:docs/adr/0004-ci-is-the-authoritative-gate.md:3; Copilot gate text:docs/SDLC.md:294,:299,:302
Dependencies and order
- feat(release): v0.2.28 #1283 and fix(roadmap): a critical fix joins the current release while its release pull request is open, so the release branch holds every change before it merges #1294: closed.
- refactor(github): pr readiness is one verdict module that the pr commands, the monitor and mcp consume #998 (v0.2.37): land PR 1 first. refactor(github): pr readiness is one verdict module that the pr commands, the monitor and mcp consume #998 then moves the monitor's review gate, with the budget rule, into the one verdict module.
- fix(github): pr readiness exempts a chore/open release-process pull request only when it changes release-process files #1344 (v0.2.37): no shared code.
- feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137 (backlog): a review that can stand in for Copilot later. Not needed here.
- chore(service): the roadmap service stays at 0 replicas, and its development is blocked, while its machine account is suspended #1562 (Service suspended): no effect. A person runs both commands, and the filed issues wait for a person's
devops roadmap intake --confirmto be placed. - The cut-as-a-pull-request change (intake draft): no effect. The release pull request's head is still
release/vX.Y.Zintomain, and the budget counts that pull request's reviews.
Problem
Copilot reviews only the release pull request, on purpose and within the owner's budget (ADR 0004). Re-reviews are requested by hand.
On 2026-10-07, #1283 got 11 Copilot passes (12:43 to 22:28 UTC):
- Each fix pushed to the release branch led to another full pass over a diff of about 10k lines, and each pass found something new.
- Nothing bounded the number of passes or decided which comments block the release.
- Turning the threads that did not block it into follow-up issues (fix(ai): a web_fetch budget cut inside a code block closes the fence before the truncation note and boundary tag #1298-docs(agent): pending-a-person steps name only manifests that exist in the repository #1303) was done by hand: file the issue, reply in the thread, resolve it.
Acceptance criteria
- The release configuration sets how many Copilot passes a release pull request gets; the default is 2, one at the cut and one after fixes.
devops releaseanddevops prrequest a pass only while the budget lasts, and say when it is spent. - One command turns a release pull request's unresolved review threads into follow-up issues:
- each issue holds the thread's text, its path and line, and a link to the thread;
- the issue gets no milestone, so the roadmap tooling places it;
- the command replies in the thread with the issue number, then resolves the thread.
--dry-runlists the issues it would file and makes no request.
-
RELEASE_CYCLE.mdstates the stop rule: once the budget is spent, a remaining comment blocks the release only if it is a regression the release introduces; every other comment becomes a follow-up issue. - Tests cover the budget check and the thread-to-issue conversion over a recorded GitHub fake, offline.
-
changelog.d/<n>.mdrecords the change;CHANGELOG.mdanddocs/ROADMAP.mdare not edited. -
uv run devops cipasses.
Key questions
- Is the budget per release or per pull request? (proposed) Per release pull request. A re-cut gets a new budget.
Strategic alignment
- Milestone: none; the roadmap tooling places it. Related: feat(release): v0.2.28 #1283, fix(roadmap): a critical fix joins the current release while its release pull request is open, so the release branch holds every change before it merges #1294, feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137 (a review that can stand in for Copilot later).
Metadata
Metadata
Assignees
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/githubGitHub Projects v2, Views, Milestones, Labels, and PR automationscope/releaseThe release-please workflow, the changelog and the published artifactstype/featureType feature: a new function
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty-bot commentedon Oct 8, 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.
It reduces manual release-process work and prevents unbounded Copilot spend, but it does not block a release or fix a defect.Saves repeated manual thread-to-issue filing and caps Copilot budget waste on large release diffs, but the release still ships without it.Requires a budget check in two commands, a new thread-to-issue conversion command with dry-run, a doc update, and offline tests against a GitHub fake.dan-petty commentedon Oct 9, 2026
Folded in from the 2026-10-09 GitHub Actions warnings review
Evidence from 2026-10-09, checked against the live settings:
mainruleset (21466414) hascopilot_code_reviewwithreview_on_push: true, so each merge intorelease/v0.2.28re-ran Copilot on the release pull request.errorCode: quota): https://github.com/dan-petty/devops-cli/actions/runs/37703381734review_on_push: false. chore(github): Turn off AI Scan for pull requests to save allowance #1496 tracks that change and turns off AI Scan for pull requests, which spends the same allowance.devops releaseordevops prrequests a budgeted pass, the request has to come from an account that has an allowance (the owner's), and the budget should count that account's usage.dan-petty commentedon Oct 17, 2026
Readiness check for v0.2.37, against
release/v0.2.36at 22d8748. Line numbers are at that commit.Status: needs a split.
Today
src/requests a Copilot review: no code setsrequested_reviewers.RELEASE_CYCLE.md:199-210has no stop rule.docs/adr/0004-ci-is-the-authoritative-gate.md, line 3) says a person requests re-reviews.Code to reuse
_is_copilot_review_dictinsrc/devops_cli/github/pr_monitor.py:290.src/devops_cli/github/pr_threads.py:246,:260and:275. Its GraphQL query does not fetch thread URLs.RoadmapStore.create_issue(src/devops_cli/roadmap/store.py:850) and its in-memory fake (src/devops_cli/roadmap/memory_store.py:519).RoadmapConfig(src/devops_cli/roadmap/config.py:38), which usesextra="forbid".Dependencies: #1137 is related. #1283 and #1294 are closed.
Questions for the owner
gh pr edit --add-reviewer @copilot? Neither is verified yet.roadmap.toml?devops pr monitor(pr_monitor.py:133-138) stop blocking?Proposed split
RELEASE_CYCLE.md.devops pr threads file-issues [--dry-run].feat(github): a release pull request gets a set number of copilot pas…
feat(github): the release pull request's remaining review threads bec…
dan-petty commentedon Oct 19, 2026
What changed
#1695, merged into
release/v0.2.37as e17de25.20 file(s) changed.
How it was verified
Check runs at dea717f:
Acceptance Criteria of
docs/agent/tasks/task-1345-release-copilot-pass-budget.md:.github/roadmap.tomlcan setrelease_copilot_passes; the default is 2, and a value below 1 fails, naming the key (tests/test_roadmap_config.py), and the command holds to the value the file sets (test_the_command_holds_to_the_budget_the_file_sets).devops pr copilot-passrequests a pass on the release pull request only while its submitted and running Copilot passes are below the budget; otherwise it requests nothing, says "N of N" and exits 1, and it refuses any other pull request and a merged or closed one (tests/test_github_copilot_budget.py, among themtest_one_finished_pass_as_github_records_it_leaves_pass_2_to_request,test_a_pending_copilot_request_counts_as_one_pass,test_a_release_pull_request_that_is_not_open_is_refusedandtest_the_command_holds_to_the_budget_the_file_sets).test_a_user_whose_login_contains_copilot_does_not_count,test_a_review_counts_by_copilots_rest_or_graphql_login_and_by_no_other,test_a_review_by_a_user_whose_login_contains_copilot_is_not_copilots).rg -n '@copilot' srcfinds only the budget module and its constant.devops pr monitordoes not wait on Copilot's changes-recommended state once its threads are resolved, and still waits on a running pass, unresolved threads and a person's requested changes: the behaviour fix(github): treat copilot review as completed when zero unresolved threads remain #216 gave it, on feat(release): v0.2.28 #1283's recorded timeline (test_the_monitor_reads_1283s_recorded_copilot_passes: exit 0 once both passes have ended, 3 while a third runs, 2 with an unresolved thread;test_two_finished_copilot_passes_read_as_completed,test_pr_monitor_status_not_ready_changes_requested).RELEASE_CYCLE.mdStep 3 states the stop rule, and ADR 0004 anddocs/SDLC.mdsay re-reviews go throughdevops pr copilot-pass.devops pr threads file-issues <pr> --confirmturns every unresolved thread not named by--keepinto one issue (fenced thread text, location, the thread link, no milestone), then replies with the issue number and resolves the thread, in that order (tests/test_github_pr_threads.py:test_each_unresolved_thread_is_filed_then_replied_to_then_resolved,test_an_issue_holds_the_fenced_thread_its_location_and_its_link,test_a_mention_and_an_issue_reference_stay_inside_a_fence_longer_than_any_in_the_text,test_a_kept_thread_is_left_untouched,test_a_failed_issue_stops_the_run_before_its_reply_and_resolve).test_a_pull_request_that_is_not_the_release_pull_request_is_refused,test_a_release_pull_request_that_is_not_open_is_refused_before_its_threads_are_read).--keepid that names no unresolved thread is refused before any write, with and without--confirm, and the preview keeps a kept thread (test_a_keep_id_that_names_no_unresolved_thread_is_refused_before_any_write,test_the_preview_keeps_a_kept_thread).test_a_thread_the_viewer_already_filed_is_resolved_and_not_filed_again,test_a_marker_reply_past_the_first_page_of_comments_is_read,test_a_copilot_suggestion_quoting_the_marker_leaves_its_thread_to_be_filed,test_a_marker_reply_from_another_login_does_not_count).test_a_rerun_after_a_failed_reply_opens_no_second_issue,test_a_failure_part_way_reports_the_threads_already_filed). Through the GitHub session the issues are listed once a run, the open issue ending a line with the thread's link is the one named, not one whose link only begins with it nor a closed one, and a page that holds no list stops the run before any write (test_the_issues_are_listed_once_a_run_through_the_github_session,test_a_bad_page_of_the_issue_listing_stops_the_run_before_any_write).source/agentgoes only on a thread Copilot started (test_each_unresolved_thread_is_filed_then_replied_to_then_resolved,test_a_thread_a_person_started_is_filed_without_source_agent).ghost, a thread a push moved off the diff is placed by its original line, two threads on a whole file get titles that tell them apart, and the preview marks an outdated thread (test_a_deleted_author_is_named_ghost,test_a_thread_a_push_moved_off_the_diff_is_placed_by_its_original_line,test_two_threads_on_a_whole_file_get_titles_that_tell_them_apart,test_the_preview_marks_an_outdated_thread).--confirmthe command reads the threads and writes nothing, and--dry-runmakes no request and lists the requests it would make, the viewer, later comment pages and issue listing reads included (test_without_confirm_the_threads_are_read_and_nothing_is_written,test_dry_run_makes_no_request_and_lists_the_requests).changelog.d/1345.mdrecords both pull requests;CHANGELOG.mdanddocs/ROADMAP.mdare not edited.uv run devops pr copilot-pass <pr>requests a pass that Copilot submits, and once two passes are on it,uv run devops pr copilot-pass <pr>printsCopilot budget spent: 2 of 2 passesand exits 1.uv run devops pr threads file-issues <pr> --keep <regression-thread-id>lists each remaining thread and what it would do with it, the kept one kept; the same command with--confirmfiles the others and resolves them; and a second run with--confirmfiles nothing.feat(release): v0.2.37 (#1720)