Summary
Stage 1-pre's subsumption check in .qwen/skills/triage/references/pr-workflow.md is prescribed as one contents-API call per production file (gh api "repos/$REPO/contents/<path>?ref=$DEFAULT_BRANCH"), each downloading the entire file as base64-in-JSON. The endpoint has a silent ceiling: measured against the live API, a 1,017,923-byte file returns content_len: 1,379,853 base64 (~1.36x raw), while files at 1,199,685 / 1,244,804 / 4,025,780 / 5,728,000 bytes all return HTTP 200 with content_len: 0, encoding: "none", and no error. Any production file at or above ~1 MiB therefore can never be judged subsumed, and the comparison silently breaks down exactly on large files.
On a multi-file production diff (Stage 0 explicitly contemplates "10+ files" sweeps) the stage also issues 10+ serial requests against the shared CI PAT's rate limit and transits every full blob through the agent's context.
Proposed scope
Replace the per-file downloads with one constant-cost comparison, e.g. gh pr diff "$PR_NUMBER" vs gh pr diff "$MERGED_PR" (two calls for any N), or fetch the default branch once and diff locally (note the triage checkout is refs/pull/N/merge at fetch-depth: 1, so git fetch --depth 1 --filter=blob:none origin <default-branch> first). This also makes the verdict atomic with respect to base-branch movement during the check.
Source
Review thread PRRT_kwDOPB-92c6c3VLc on #10292 (Stage 1-pre spec review). Deferred from that PR to keep its diff bounded.
Summary
Stage 1-pre's subsumption check in
.qwen/skills/triage/references/pr-workflow.mdis prescribed as one contents-API call per production file (gh api "repos/$REPO/contents/<path>?ref=$DEFAULT_BRANCH"), each downloading the entire file as base64-in-JSON. The endpoint has a silent ceiling: measured against the live API, a 1,017,923-byte file returnscontent_len: 1,379,853base64 (~1.36x raw), while files at 1,199,685 / 1,244,804 / 4,025,780 / 5,728,000 bytes all return HTTP 200 withcontent_len: 0,encoding: "none", and no error. Any production file at or above ~1 MiB therefore can never be judged subsumed, and the comparison silently breaks down exactly on large files.On a multi-file production diff (Stage 0 explicitly contemplates "10+ files" sweeps) the stage also issues 10+ serial requests against the shared CI PAT's rate limit and transits every full blob through the agent's context.
Proposed scope
Replace the per-file downloads with one constant-cost comparison, e.g.
gh pr diff "$PR_NUMBER"vsgh pr diff "$MERGED_PR"(two calls for any N), or fetch the default branch once and diff locally (note the triage checkout isrefs/pull/N/mergeatfetch-depth: 1, sogit fetch --depth 1 --filter=blob:none origin <default-branch>first). This also makes the verdict atomic with respect to base-branch movement during the check.Source
Review thread
PRRT_kwDOPB-92c6c3VLcon #10292 (Stage 1-pre spec review). Deferred from that PR to keep its diff bounded.