Skip to content

fix(roadmap): refine sends a judge refusal to an agent round - #4874

Merged
dan-petty merged 2 commits into
mainfrom
fix/4798-refine-refusal-agent-round
Nov 12, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/4798-refine-refusal-agent-round

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The review of refine refused 28 of 36 bot items in the census of 2026-11-11, and each refused item then waited for a person to edit the body (median 6.0 days). The owner rule says that bot-filed work goes on with an agentic judge and no person.

A refusal of the review is now a job failure of refine with the check judge_refused. The job record keeps the open findings in refine.judge_findings. The next round refines the item again and gives the findings to the model as judge_findings. The 3 tries on the same body bound the rounds; at the limit the step is failed and the inbox lists the item. A refusal writes no comment, so no comment asks a person for a body edit. An item of a person gets no review, so it does not change.

Closes #4798

Change: openspec/changes/archive/2026-11-12-4798-refine-judge-refusal-agent-round/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 12, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

fail-to-pass

uv run devops ci fail-to-pass --base origin/main (base bbb952e, 7 min): 6 failed on base, 39 passed, 0 errored, in tests/roadmap/refine/test_roadmap_refine_trust.py and tests/roadmap/test_roadmap_limit_classes.py. All pass on the head.

Failed on base:

  • test_a_refusal_is_a_job_failure_that_records_each_finding_and_asks_no_person (no RefineRecordKey.JUDGE_FINDINGS)
  • test_the_next_round_refines_a_refused_item_again_with_the_findings_and_an_approval_sets_it_ready (one proposal call: the refused item waited)
  • test_the_third_refusal_fails_the_job_and_the_inbox_lists_the_item (no second round)
  • test_a_failed_refusal_ends_with_a_body_edit ((2, 'edit', None) in place of (4, 'retry', '1'))
  • test_a_review_that_refuses_the_edited_text_sets_the_item_back_to_new (step edit in place of retry)
  • test_every_numeric_limit_of_the_roadmap_jobs_has_a_class (the new limit CONST_ROADMAP_REFINE_JUDGE_FINDINGS_MAX_CHARS)

Local run of the touched areas: tests/roadmap/refine, the inbox, the explain, the trust and the store contract tests: 772 passed.

@dan-petty
dan-petty marked this pull request as ready for review November 12, 2026 00:44
@devops-cli-service

Copy link
Copy Markdown
Contributor

Pull request #4874 has merge conflicts with main at commit 3f9d31783bc2. GitHub cannot merge it. Rebase the branch onto the current main, resolve the conflicts and push the branch.

@dan-petty

Copy link
Copy Markdown
Owner Author

Measurements

Before: the census of 2026-11-11T17:30Z (job records of 437 open issues)

Measure Value
Bot items with a verdict of the review 36
Approved 8 (22 %)
Refused, then New with the step edit 28 (78 %): 20 of the Service App, 8 of github-actions[bot]
Time in the Status of the refused items median 6.0 days, max 9.5 days
Refused items with no free comment 25 of 28
Refused items that left the wait with no person 0

On 2026-11-12, 20 of the 28 are still open, New and edit. The other 8 closed.

After: a read-only replay of the new route

I ran plan_refine from this branch (the code of the head) for 8 refused items with no writer, through a store proxy that refuses each write method. The proxy put the findings of the last refusal comment of each item in refine.judge_findings, as the new route records them. So each run is the first agent round with the findings in the request. The models are the analysis and verification task slots of the local configuration, not the ones of the Service.

Item Result of one agent round Next step Time
#3162 the review approved ready 340 s
#3950 the review approved ready 300 s
#4375 the review approved ready 559 s
#3753 the proposal names the open dependency #4635 blocked 243 s
#3565 the review refused again (false_premise) retry, try 1 of 3 238 s
#3600 the investigation stopped (investigation_stopped,missing_source) retry, try 1 of 3 315 s
#4135 no result: the context git grep timed out after 15 s (filed as #4878, not caused by this change) none 89 s
#3530 closed since the census none 3 s
  • Of the 6 items that gave a result, 3 became Ready (50 %) and 1 waits on a dependency. 4 of 6 left the wait on a person in one round. The other 2 go on to the next try with no person.
  • Before this change, 0 of 28 refused items left the wait with no person.
  • Estimate, not a measurement: with 3 of 6 approvals in one round, the share of the 36 judged bot items that the review approves goes from 22 % (8 of 36) to about 61 % ((8 + 0.5 x 28) / 36) after one agent round. The 3 tries can raise it more. The sample is small, so treat this as a direction.
  • The cost of one round in this replay was 4 to 9 minutes of model time for each item, and at most 3 rounds for each body.

@dan-petty

Copy link
Copy Markdown
Owner Author

Live steps after the merge

No ConfigMap, Secret or manifest changes. The Service takes the new route when its image holds this commit.

The items that a refusal left with the step edit before this change keep that wait. This change adds no shim for old records. One round on the new route moves each one. After the Service image holds the merge commit, run this once from a checkout of main at or after the merge (20 open items on 2026-11-12):

for n in 3162 3491 3565 3578 3583 3584 3600 3604 3609 3611 3706 3753 3950 3956 3985 4016 4135 4145 4373 4375; do
  uv run devops roadmap refine --item $n --confirm
done

An item that the review refuses again gets the step retry, and the rounds of the Service take it from there. Check the result with uv run devops roadmap inbox (class failed after 3 tries) and uv run devops roadmap explain <n>.

A refusal of the review of a bot item is a job failure with the check
judge_refused. The job record keeps the open findings in
refine.judge_findings, the next request gives them to the model as
judge_findings, and the limit of 3 tries on the body ends the rounds.
No comment asks a person for a body edit.
@dan-petty
dan-petty force-pushed the fix/4798-refine-refusal-agent-round branch from 3f9d317 to a831060 Compare November 12, 2026 01:48
@dan-petty
dan-petty merged commit e4fc6a9 into main Nov 12, 2026
27 checks passed
@dan-petty
dan-petty deleted the fix/4798-refine-refusal-agent-round branch November 12, 2026 01:58
dan-petty pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.115.0](v0.114.1...v0.115.0)
(2026-11-12)


### Features

* **design:** add the design tokens and their build
([#4811](#4811))
([db4b19a](db4b19a))
* **roadmap:** find symbol definitions with tree-sitter
([#4820](#4820))
([3b3fddc](3b3fddc))


### Bug Fixes

* **ai:** the gateway group that answered decides the local label
([#4907](#4907))
([0da637f](0da637f))
* **ci:** replay a changed gate check in fail-to-pass
([#4898](#4898))
([59bfc57](59bfc57))
* **config:** read each config file as YAML 1.2
([#4858](#4858))
([c3130a3](c3130a3))
* **roadmap:** loosen the caps that turn a stage refusal into a loss
([#4869](#4869))
([4492fc3](4492fc3))
* **roadmap:** refine reads a dependency named by title
([#4877](#4877))
([2829f9c](2829f9c))
* **roadmap:** refine sends a judge refusal to an agent round
([#4874](#4874))
([e4fc6a9](e4fc6a9))
* **tests:** refuse test writes under the real home
([#4857](#4857))
([0f6ac1b](0f6ac1b))
* **tests:** the plain-Python helper test keeps PYTHONPATH
([#4914](#4914))
([99c109d](99c109d))


### Performance Improvements

* **ci:** direct pytest runs wait for a gate slot
([#4901](#4901))
([e80db62](e80db62))
* **roadmap:** status lane reads the snapshot, skips idle stops
([#4887](#4887))
([f285cf8](f285cf8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): refine sends a judge refusal to an agent round

1 participant