Skip to content

Soften Design Decision Gate invocation-cap failures - #51422

Closed
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/aw-failures-fix-max-turns-cap
Closed

Soften Design Decision Gate invocation-cap failures#51422
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/aw-failures-fix-max-turns-cap

Conversation

CopilotAI commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate was capped at 20 LLM invocations, causing complex ADR reviews to fail with non-retryable max_runs_exceeded before producing useful output.

  • Workflow budget

    • Raise max-turns from 20 to 50.
    • Recompile the generated lockfile.
  • Graceful cap handling

    • Opt the workflow into invocation-cap soft-fail behavior.
    • Teach the Claude harness to treat max_runs_exceeded as incomplete, not fatal, when explicitly enabled.
    • Preserve already-emitted task safe outputs; otherwise emit report_incomplete.
  • Prompt guardrails

    • Update Design Decision Gate instructions to stop near the cap.
    • Prefer partial ADR findings via add-comment; fall back to report_incomplete when no useful comment can be produced.
env:
GH_AW_SOFT_FAIL_INVOCATION_CAP: "true"max-turns: 50

CopilotAIand others added 2 commits August 8, 2026 16:57
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ Contribution Assessment: Aligned

Thanks for working on the Design Decision Gate reliability fix! This PR directly addresses the documented workflow failure in #51344 where the hardcoded max-turns: 20 cap was causing legitimate analysis runs to hit the invocation limit and fail outright.

What Looks Good

  • Focused scope — all changes center on raising the invocation budget and adding graceful partial-report handling for the Design Decision Gate workflow
  • Tests included — new test cases in both claude_harness.test.cjs (28 lines) and pkg/workflow/prompts_test.go (32 lines) provide coverage
  • Clear narrative — PR body shows completed steps (workflow recompilation, lockfile review) and links to the root-cause issue
  • Proper process — created by copilot-swe-agent following the agentic development pattern outlined in CONTRIBUTING.md

Status

This PR is ready for review. It's marked as draft (WIP), which is expected for work still in validation. Once the remaining checklist item ("Run targeted validation, secret scan, code review, and CodeQL") is complete and any CI feedback is addressed, this should be in good shape for merge.

Congratulations on the focused bug fix! 🎉

Generated by ✅ Contribution Check · auto · 66 AIC · ⌖ 3.95 AIC · ⊞ 8.7K ·

CopilotAI changed the title [WIP] Fix hardcoded max-turns cap in Design Decision GateSoften Design Decision Gate invocation-cap failuresAug 8, 2026
CopilotAI requested a review from pelikhanAugust 8, 2026 17:07
@pelikhanpelikhan closed this Aug 8, 2026
@github-actions
github-actionsBot deleted the copilot/aw-failures-fix-max-turns-cap branch August 16, 2026 02:27
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw-failures] Design Decision Gate fails 2/2 runs — hardcoded max-turns: 20 hits invocation cap on complex PRs

2 participants

@pelikhan