Repository navigation
feat(roadmap): Retry a refused pull request body once - #5929
Conversation
|
The steps of the job: Stopped at group 2. Failure class:
Reason: Last message of the agent (a claim that no check verified): Group 2 is complete. Changes - 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
|
592d051 to
6eb9848
Compare
6eb9848 to
ced86c6
Compare
🤖 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>
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/