Draft
Fix Design Decision Gate false failures caused by the LLM invocation cap#52836
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate Design Decision Gate merge-blocking failure
Fix Design Decision Gate false failures caused by the LLM invocation cap
Aug 15, 2026
Contributor
PR TriageCategory: bug | Risk: high | Score: 82/100
Recommended action:
|
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.
Three independent monitors flagged the merge-blocking
Design Decision Gate 🏗️workflow failing at a high rate while still burning real token spend — aTurns=0-style crash signature that turned out to be something else entirely.Root cause
max-turnsdoubles as the AWF API proxy's hard per-run LLM invocation cap. This gate's ADR-review task typically needs ~20-22 turns to complete, butmax-turnswas set to 20 — so it reliably hit429 Maximum LLM invocations exceeded (20/20). Worse, the agent had often already written a valid safe-output (e.g. anadd_commentwith the completed ADR review) before hitting the cap, but every harness (claude/codex/copilot) treated the cap error as an unconditional hard failure and discarded that completed work.Changes
max-turnsfrom 20 → 30 indesign-decision-gate.md(recompiled lock file) to give headroom above the observed completion point.claude_harness.cjs,codex_harness.cjs,copilot_harness.cjs: when the invocation cap is saturated but safe-outputs already contain a terminal/expected result, exit 0 instead of failing — mirroring the existing suppression pattern already used for "numerous permission-denied" and "partial execution" cases.