You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make the Pre-fetch ADR gate PR context step tolerate large PRs: it currently shells the GitHub PR diff API directly, which returns HTTP 406 for PRs over 300 changed files, and the set -euo pipefail step then exits 1 — failing the whole agent job before the model runs.
Affected workflows and run IDs
Design Decision Gate 🏗️ — §27759964011 (pull_request, PR Mark all agentic workflows as private #40048). The deterministic pre-fetch step logs could not find pull request diff: HTTP 406: Sorry, the diff exceeded the maximum number of files (300). Consider using 'List pull requests files' API or locally cloning the repository instead. → PullRequest.diff too_large → ##[error]Process completed with exit code 1.
Probable root cause
PR Mark all agentic workflows as private #40048 ("Mark all agentic workflows as private") has 490 changed files, exceeding the GitHub diff API's 300-file cap. The pre-fetch script requests the unified diff with no fallback, so the API's 406 propagates as a fatal step error.
This is a workflow-definition bug, not an engine/provider issue — the failure is deterministic for any PR > 300 files and pre-empts the agent entirely (failure occurs in Pre-fetch ADR gate PR context, before Execute ... CLI).
Proposed remediation
On a 406 / too_large diff response, fall back to the List pull request files API (paginated) or a git diff against the merge base, and cap/summarize the context instead of aborting.
Make the pre-fetch step non-fatal on diff-fetch failure: emit a truncated/empty context with a warning so the ADR gate can still run (or skip cleanly) rather than failing the job.
Add a file-count guard that switches to the files-list path above a threshold (e.g. >300 files) before calling the diff endpoint.
Success criteria / verification
Design Decision Gate runs to completion (or skips cleanly) on a PR with >300 changed files; no HTTP 406 ... diff exceeded the maximum number of files step error.
The pre-fetch step degrades to a bounded file list / summary instead of exiting 1 when the diff is too large.
Parent report: #39883. Analyzed run: 27759964011 (PR #40048, 490 files).
Related to #39883
Problem statement
Make the
Pre-fetch ADR gate PR contextstep tolerate large PRs: it currently shells the GitHub PR diff API directly, which returns HTTP 406 for PRs over 300 changed files, and theset -euo pipefailstep then exits 1 — failing the wholeagentjob before the model runs.Affected workflows and run IDs
pull_request, PR Mark all agentic workflows as private #40048). The deterministic pre-fetch step logscould not find pull request diff: HTTP 406: Sorry, the diff exceeded the maximum number of files (300). Consider using 'List pull requests files' API or locally cloning the repository instead.→PullRequest.diff too_large→##[error]Process completed with exit code 1.Probable root cause
Pre-fetch ADR gate PR context, beforeExecute ... CLI).Proposed remediation
too_largediff response, fall back to the List pull request files API (paginated) or agit diffagainst the merge base, and cap/summarize the context instead of aborting.Success criteria / verification
HTTP 406 ... diff exceeded the maximum number of filesstep error.Parent report: #39883. Analyzed run: 27759964011 (PR #40048, 490 files).
Related to #39883