Skip to content

feat(roadmap): Retry a refused pull request body once - #5929

Merged
dan-petty merged 8 commits into
mainfrom
feat/3599-retry-a-refused-pull-request-text
Nov 16, 2026
Merged

dan-petty merged 8 commits into
mainfrom
feat/3599-retry-a-refused-pull-request-text

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Retry a refused pull request body one time through the model with its problems and stop on a second refusal with the refused_reply failure class, so that actionable form defects are resolved without manual intervention.

Closes #3599

Change: openspec/changes/archive/2026-11-16-3599-retry-a-refused-pull-request-text/

@devops-cli-service devops-cli-service Bot added type/feature Type feature: a new function scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 16, 2026
@devops-cli-service

Copy link
Copy Markdown
Contributor Author

The steps of the job:

Stopped at group 2.

Failure class: tests_lost.
Action taken: none.
Action left: wait: wait for a person.

Step Status Attempts Tokens in/out Last failing command
group 1 done 1 1619284/8331 pytest on base: tests/roadmap/test_roadmap_pull_form.py
group 2 stopped 1 2403412/8040 -

Reason:

The agent removed tests that existed at the start of the step. A step may add tests. It may remove or rename a test only when the plan on the default branch names it in `## Weakened checks`.
tests/roadmap/test_roadmap_failure.py: test_the_classes_are_the_twenty_of_the_taxonomy

Last message of the agent (a claim that no check verified): Group 2 is complete. Changes - tests/roadmap/test_roadmap_failure.py: renamed test_the_classes_are_the_twenty_of_the_taxonomy to test_the_classes_are_the_twenty_one_of_the_taxonomy and added refused_reply to its set; added "refused_reply": "wait" to test_the_default_actions_are_the_ones_of_the_design; added FailureClass.REFUSED_REPLY to TYPED_BY_SITE, because the implement job sets that class and the classifier never returns it (test_the_classifier_never_returns_a_class_that_a_site_sets holds the union of the cases and the typed classes equal to the enum). - src/devops_cli/roadmap/failure.py: added REFUSED_REPLY = "refused_reply" after REFUSED_TOOL, the row FailureClass.REFUSED_REPLY: FailureAction.WAIT to ACTION_BY_CLASS, and named the class in the typed-class paragraph of the module docstring. - docs/ROADMAP_WORKFLOW.md: added the refused_reply row (wait) to the failure-class table, after refused_tool. - openspec/changes/3599-retry-a-refused-pull-request-text/tasks.md: ticked 2.1, 2.2 and 2.3. Verification - uv run devops ci test tests/roadmap/test_roadmap_failure.py before the code change: failed for the right reason — the two class tests reported refused_reply missing from the enum and the action table. - uv run devops ci test tests/roadmap/test_roadmap_failure.py tests/invariants/test_roadmap_workflow_doc.py: 217 passed (first run caught the un-updated TYPED_BY_SITE; green after the fix). - `uv run devops ci test test

The job discarded this work. Read it before you retry:

diff --git a/docs/ROADMAP_WORKFLOW.md b/docs/ROADMAP_WORKFLOW.md
index e45a6137e..44f9bf67b 100644
--- a/docs/ROADMAP_WORKFLOW.md
+++ b/docs/ROADMAP_WORKFLOW.md
@@ -213,6 +213,7 @@ A stop has a class (`roadmap/failure.py`, #3065). A stop site that knows its cau
 | `oom` | `raise_limit` | A process was killed for memory |
 | `timeout` | `retry` | A command, a model call or the watch of the checks ran out of time, or the step `fix-plan` spent its time budget (`roadmap.fix_plan.time_budget_seconds`) |
 | `refused_tool` | `wait` | A tool refused the calls of the agent, or came back as a retry too often, or the process runner refused a command of the job before it started (`SecurityError`) |
+| `refused_reply` | `wait` | The form check refused the title or the body of the pull request again after the job rebuilt it once from the model reply. A person edits the text or the proposal and comments `implement: retry` |
 | `conflict` | `wait` | A rebase or the pull request has a merge conflict |
 | `ci_infra` | `retry` | The infrastructure failed, and every failure that no other class matches |
 | `no_change_in_fix` | `wait` | A fix step changed no file, so the failed check is as it was. A person reads the failed check in the stop |
diff --git a/openspec/changes/3599-retry-a-refused-pull-request-text/tasks.md b/openspec/changes/3599-retry-a-refused-pull-request-text/tasks.md
index 92575c515..68660b3e6 100644
--- a/openspec/changes/3599-retry-a-refused-pull-request-text/tasks.md
+++ b/openspec/changes/3599-retry-a-refused-pull-request-text/tasks.md
@@ -13,11 +13,11 @@ Kind: behavior. Reads: `src/devops_cli/roadmap/pull_form.py`, `src/devops_cli/la
 
 Kind: behavior. Reads: `src/devops_cli/roadmap/failure.py`, `tests/roadmap/test_roadmap_failure.py`, `tests/roadmap/test_roadmap_stop_clear.py`, `docs/ROADMAP_WORKFLOW.md`. Changes: `src/devops_cli/roadmap/failure.py`, `tests/roadmap/test_roadmap_failure.py`, `docs/ROADMAP_WORKFLOW.md`.
 
-- [ ] 2.1 Change `test_the_classes_are_the_twenty_of_the_taxonomy` in `tests/roadmap/test_roadmap_failure.py` to `test_the_classes_are_the_twenty_one_of_the_taxonomy` with `refused_reply` in the set, and add `"refused_reply": "wait"` to `test_the_default_actions_are_the_ones_of_the_design`; both fail on the base because `FailureClass.REFUSED_REPLY` does not exist. Keep `test_a_new_digest_does_not_clear_a_stop_for_a_lost_test` in `tests/roadmap/test_roadmap_stop_clear.py` green, so `tests_lost` keeps the action `wait` and the base scenario `A new runner image and a lost test` still holds
+- [x] 2.1 Change `test_the_classes_are_the_twenty_of_the_taxonomy` in `tests/roadmap/test_roadmap_failure.py` to `test_the_classes_are_the_twenty_one_of_the_taxonomy` with `refused_reply` in the set, and add `"refused_reply": "wait"` to `test_the_default_actions_are_the_ones_of_the_design`; both fail on the base because `FailureClass.REFUSED_REPLY` does not exist. Keep `test_a_new_digest_does_not_clear_a_stop_for_a_lost_test` in `tests/roadmap/test_roadmap_stop_clear.py` green, so `tests_lost` keeps the action `wait` and the base scenario `A new runner image and a lost test` still holds
   - Verification: `$ uv run devops ci test tests/roadmap/test_roadmap_failure.py tests/invariants/test_roadmap_workflow_doc.py` fails on the base
-- [ ] 2.2 Add `REFUSED_REPLY = "refused_reply"` to `FailureClass` after `REFUSED_TOOL`, and `FailureClass.REFUSED_REPLY: FailureAction.WAIT` to `ACTION_BY_CLASS` in `src/devops_cli/roadmap/failure.py`, so a body that the model cannot repair twice waits for a person. Name the class in the typed-class paragraph of the module docstring. Add its row to the class table of `docs/ROADMAP_WORKFLOW.md`, and keep `test_each_class_has_exactly_one_default_action_in_one_table` equal to the enum
+- [x] 2.2 Add `REFUSED_REPLY = "refused_reply"` to `FailureClass` after `REFUSED_TOOL`, and `FailureClass.REFUSED_REPLY: FailureAction.WAIT` to `ACTION_BY_CLASS` in `src/devops_cli/roadmap/failure.py`, so a body that the model cannot repair twice waits for a person. Name the class in the typed-class paragraph of the module docstring. Add its row to the class table of `docs/ROADMAP_WORKFLOW.md`, and keep `test_each_class_has_exactly_one_default_action_in_one_table` equal to the enum
   - Verification: `$ uv run devops ci test tests/roadmap/test_roadmap_failure.py tests/invariants/test_roadmap_workflow_doc.py` passes
-- [ ] 2.3 Edit `docs/ROADMAP_WORKFLOW.md` to add the `refused_reply` row to the class table
+- [x] 2.3 Edit `docs/ROADMAP_WORKFLOW.md` to add the `refused_reply` row to the class table
   - Verification: `$ uv run devops ci docs` passes
 
 ## 3. Add the one-retry rebuild of a refused body
diff --git a/src/devops_cli/roadmap/failure.py b/src/devops_cli/roadmap/failure.py
index 21e56a43e..b66e211cc 100644
--- a/src/devops_cli/roadmap/failure.py
+++ b/src/devops_cli/roadmap/failure.py
@@ -12,7 +12,8 @@ table of defaults: each class has exactly one `FailureAction`.
 `tests_lost`, `head_moved`, `output_cap`, `limit_reached` and `outside_plan` come from the step, and
 `git_config` from the check of the git settings of the implement job; no rule below makes them. A
 command of the implement job that the process runner refuses (`SecurityError`) gives `refused_tool`,
-which a rule below also reads from the text.
+which a rule below also reads from the text. The implement job gives `refused_reply` to a pull
+request body that the form check refused again after the job rebuilt it once from the model reply.
 The rules are the fallback for a stop whose cause has no class of its own.
 
 **Order of the rules.** The first rule that matches wins, and the order goes from the cause that is
@@ -70,6 +71,7 @@ class FailureClass(StrEnum):
     OOM = "oom"
     TIMEOUT = "timeout"
     REFUSED_TOOL = "refused_tool"
+    REFUSED_REPLY = "refused_reply"
     CONFLICT = "conflict"
     CI_INFRA = "ci_infra"
     NO_CHANGE_IN_FIX = "no_change_in_fix"
@@ -131,6 +133,7 @@ ACTION_BY_CLASS: Final[Mapping[FailureClass, FailureAction]] = MappingProxyType(
         FailureClass.OOM: FailureAction.RAISE_LIMIT,
         FailureClass.TIMEOUT: FailureAction.RETRY,
         FailureClass.REFUSED_TOOL: FailureAction.WAIT,
+        FailureClass.REFUSED_REPLY: FailureAction.WAIT,
         FailureClass.CONFLICT: FailureAction.WAIT,
         FailureClass.CI_INFRA: FailureAction.RETRY,
         FailureClass.NO_CHANGE_IN_FIX: FailureAction.WAIT,
diff --git a/tests/roadmap/test_roadmap_failure.py b/tests/roadmap/test_roadmap_failure.py
index cfe6bba59..b37fae2d6 100644
--- a/tests/roadmap/test_roadmap_failure.py
+++ b/tests/roadmap/test_roadmap_failure.py
@@ -416,6 +416,7 @@ TYPED_BY_SITE = {
     FailureClass.LIMIT_REACHED,
     FailureClass.OUTSIDE_PLAN,
     FailureClass.GIT_CONFIG,
+    FailureClass.REFUSED_REPLY,
     *(
         (getattr(FailureClass, "PLAN_UNREADABLE"),)
         if hasattr(FailureClass, "PLAN_UNREADABLE")
@@ -484,7 +485,7 @@ def test_a_signal_exit_status_beats_the_text() -> None:
     assert classify_failure(FailureEvidence(text="ruff failed", exit_status=1)) is FailureClass.LINT
 
 
-def test_the_classes_are_the_twenty_of_the_taxonomy() -> None:
+def test_the_classes_are_the_twenty_one_of_the_taxonomy() -> None:
     expected = {
         "provider",
         "parser",
@@ -506,6 +507,7 @@ def test_the_classes_are_the_twenty_of_the_taxonomy() -> None:
         "limit_reached",
         "outside_plan",
         "git_config",
+        "refused_reply",
     }
     if hasattr(FailureClass, "PLAN_UNREADABLE"):
         expected.add("plan_unreadable")
@@ -539,6 +541,7 @@ def test_the_default_actions_are_the_ones_of_the_design() -> None:
         "limit_reached": "raise_limit",
         "outside_plan": "wait",
         "git_config": "wait",
+        "refused_reply": "wait",
     }
     if hasattr(FailureClass, "PLAN_UNREADABLE"):
         expected["plan_unreadable"] = "wait"

The item is Blocked, and the job will not run it. Fix the cause. Then comment implement: retry. The Service clears the stop on its own when a new runner image rolls out, but only if a retry can fix the class of the stop and the limits of roadmap.implement.digest_clears_per_class and roadmap.implement.digest_clears_per_item allow it.

Step Status Attempts Tokens in/out Last failing command
group 1 done 1 1619284/8331 pytest on base: tests/roadmap/test_roadmap_pull_form.py
group 2 stopped 1 2403412/8040 -
  • fail-to-pass of group 1: fails on the base commit. Tests that fail on the base commit: tests.roadmap.test_roadmap_pull_form::test_a_body_text_that_ends_with_a_cut_mark_is_refused[...], tests.roadmap.test_roadmap_pull_form::test_a_body_text_that_ends_with_a_cut_mark_is_refused[\u2026].

@dan-petty
dan-petty force-pushed the feat/3599-retry-a-refused-pull-request-text branch from 6eb9848 to ced86c6 Compare November 16, 2026 16:20
@dan-petty
dan-petty marked this pull request as ready for review November 16, 2026 16:58
@dan-petty
dan-petty self-requested a review as a code owner November 16, 2026 16:58
@dan-petty
dan-petty merged commit 8ebf3ce into main Nov 16, 2026
24 checks passed
@dan-petty
dan-petty deleted the feat/3599-retry-a-refused-pull-request-text branch November 16, 2026 17:01
dan-petty pushed a commit that referenced this pull request Nov 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.166.0](v0.165.2...v0.166.0)
(2026-11-16)


### Features

* **ai:** Route DeepSeek calls around a stalled provider
([#5995](#5995))
([183a75a](183a75a))
* **github:** write a Renovate App installation token to a file
([#5994](#5994))
([b2c6264](b2c6264)),
closes [#4897](#4897)
* **roadmap:** Check each PR attribute in the open step
([#5981](#5981))
([69bf1aa](69bf1aa))
* **roadmap:** Retry a refused pull request body once
([#5929](#5929))
([8ebf3ce](8ebf3ce))
* **roadmap:** show a stopped item's class and next action
([#5946](#5946))
([4bd6128](4bd6128))


### Bug Fixes

* **ci:** Pin the devcontainer feature releases
([#5936](#5936))
([efbfc05](efbfc05))
* **roadmap:** Keep the Planned limit in the stage job
([#5940](#5940))
([4758ddd](4758ddd))

---
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/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(roadmap): retry a refused pull request text once

1 participant