An escalation lands in blocked, and does not read as a failed run - #176
Merged
Conversation
Both found by running rdpapp R7 through the path added in #175. The agent refused an impossible item correctly, with citations, and the harness then mishandled the answer twice. **The state never reached the queue.** `Stop(state=BLOCKED)` was honoured only on the checks path, which copied `stop.state` across by hand; every other path left the item in `failed`. So R7 was recorded `escalated / item_impossible` with `attempts=0` — all correct — and sat in `failed`, where nothing looking for work that needs a person would ever find it. The state is now applied centrally, at the release call, beside `consumes_attempt` which was already read there. An empty `state` still means the caller chose, which is every path older than this taxonomy. **The run announced it as `FAIL R7`.** `ok` and `FAIL` were the whole vocabulary, so an outcome where nothing went wrong and no attempt was spent was reported as a failure — and set exit 1, which makes a queue of well-formed questions read to CI as a broken run. There is now a `YOU` marker, a closing `waiting on you, not on a retry` line, and `_is_failure` excludes `NEEDS_A_PERSON` from the exit status. The summary is extracted as `run_summary()` returning lines rather than printing them, because a formatting decision that only exists inside a print loop cannot be tested, and this one is a decision. One older test asserted `FAILED` for a clean tree while its own docstring said "that is a real answer, not a failure to paper over". It asserts `BLOCKED` now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two defects in #175, both found by running rdpapp R7 against it.
Stop(state=BLOCKED)never reached the queue. Only the checks path copiedstop.stateacross; every other path left the itemfailed. R7 was recordedescalated / item_impossible,attempts=0— all correct — and sat infailed, invisible to the person it was raised for. Now applied centrally at the release call.The run said
FAIL R7and set exit 1. Nothing went wrong and no attempt was spent. There is now aYOUmarker, awaiting on you, not on a retryline, and escalations are excluded from the exit status — otherwise a queue of well-formed questions reads to CI as a broken run.run_summary()is extracted and returns lines, so the decision can be tested rather than living inside a print loop.Four new tests; all four gates green locally.
🤖 Generated with Claude Code