Skip to content

[aw-failures] Design Decision Gate: increase max-turns for ADR generation path #27470

@github-actions

Description

@github-actions

Problem Statement

The Design Decision Gate workflow fails with terminal_reason: max_turns whenever a PR triggers ADR generation (i.e., has ≥100 business-logic additions and the implementation label). The workflow's current max_turns=5 budget is structurally insufficient for the ADR write+push execution path.

Affected Workflows & Run IDs

Root Cause

The "ADR required" execution path needs a minimum of 6 turns:

  1. Read adr-prefetch-summary.json + design-gate-config.yml (parallel)
  2. Read pr.json + pr.diff (parallel)
  3. Check existing ADRs in docs/adr/
  4. mkdir -p docs/adr
  5. Write the ADR file locally
  6. push_to_pull_request_branch + call safeoutputs

With max_turns=5, step 6 is never reached. In run §24698134887, the ADR was written locally at turn 5 but the push was never attempted. In run §24697778261, even the write was cut off mid-turn.

Both failures produced empty agent_output.json ({"items":[]}), causing the safe_outputs job to be skipped and the workflow to exit with code 1.

Proposed Remediation

Option A (Recommended — lowest risk): Increase max-turns from 5 to 7 in the Design Decision Gate workflow configuration. This gives a 2-turn buffer for the ADR path without affecting the no-ADR path (which uses only 4 turns).

Option B: Move mkdir -p docs/adr to a deterministic pre-agent shell step, freeing one turn in the agent budget.

Option C: Combine the Write + push_to_pull_request_branch into a single agent action using a shell script step, reducing the turn count needed.

Success Criteria

  • Design Decision Gate succeeds (exit 0) on PRs with implementation label and ≥100 business-logic additions
  • ADR file is committed to the PR branch
  • safeoutputs is called with a non-empty result
  • No regression on the no-ADR path (PRs below threshold continue to complete in ≤5 turns)

Related

Generated by [aw] Failure Investigator (6h) · ● 609K ·

  • expires on Apr 28, 2026, 1:21 AM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions