Repository navigation
Avoid full checkouts for CGO front-door decisions - #78599
Conversation
Read bounded, SHA-pinned comparison evidence through the GitHub API and sparse-checkout only trusted selector inputs. Preserve all-suite fallback, account for evidence requests, and clarify suite-specific omission guidance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
| files.add(name); | ||
| affectedGroups.add(/\.(?:cjs|js)$/.test(name) ? "javascript" : name.endsWith(".go") ? "go" : "other"); | ||
| } | ||
| const evidence = `diff --git ${JSON.stringify(`a/${file.previous_filename || file.filename}`)} ${JSON.stringify(`b/${file.filename}`)}\n${patch}\n`; |
| const diff = fullRun | ||
| ? { files: [], patch: "", truncated: false, unavailable: false } | ||
| : process.env.CI_DIFF_BASE_SHA !== undefined | ||
| ? await summarizeGitHubDiff({ |
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
There was a problem hiding this comment.
🟡 Changes recommended
The CI documentation and researcher prompt describe an outdated credential and API request flow, and the UTF-8 truncation test does not exercise a multibyte boundary.
2 open issues
What changed in this PR
Optimizes CGO’s CI Front Door by replacing the PR-evidence checkout with a bounded GitHub compare request, while keeping selector code and configuration pinned to the trusted PR base.
Changes:
- Add SHA-pinned API diff evidence with rename tracking, response limits, and all-suite fallback.
- Reduce the trusted checkout to five files and count evidence API requests separately.
- Clarify per-suite omission rules and extend API and workflow tests.
| File | Description |
|---|---|
scripts/ci-front-door.test.cjs |
Tests API evidence, fallback cases, sparse execution, and request accounting. |
scripts/ci-front-door.cjs |
Integrates API evidence while preserving local replay support. |
scripts/ci-front-door-workflow.test.cjs |
Checks the sparse checkout and SHA-pinned evidence configuration. |
scripts/ci-front-door-diff.cjs |
Fetches, validates, and groups bounded compare API evidence. |
.github/workflows/cgo.yml |
Removes the evidence checkout and configures API inputs. |
.github/ci/decision-prompt.txt |
Clarifies independent suite assessment and eligible omission paths. |
Review effort: Max (adaptive)
| CI_DIFF_TOKEN: ${{ github.token }} | ||
| CI_DIFF_BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
| CI_DIFF_HEAD_SHA: ${{ github.sha }} |
| assert.equal(capped.summary.truncated, true); | ||
| assert.equal((await exercise({ diff: capped.summary })).result.fallback, true); | ||
| assert.match(diagnostics.join(""), /inventory may be truncated/); | ||
| const patch = "@@ -0,0 +1 @@\n+" + "a".repeat(LIMITS.groupPatch) + "\u{1f512}"; |
|
🎉 This pull request is included in a new release. Release: |

Why
The 24-hour CGO investigation found that the decision job's two checkouts consumed 28.8 runner-minutes across 63 decisions, while selection itself used about 2 minutes. Collect diff evidence without downloading a second working tree, and make the omission prompt more explicit about suite dependencies.
Changes
Safety and trade-offs
Mandatory suites, the 0.9 confidence threshold, deterministic eligibility, credential isolation, and all-suite fallback remain unchanged. API failures, malformed or incomplete patches, oversized responses, and comparisons reaching GitHub's 300-file cap run all suites. No new credentials or permissions are required.
Selector code and prompts still come from the trusted PR base. The updated behavior activates once that base contains this change; an initial rollout using older selector code safely runs all suites. Prompt efficacy and live latency improvements have not been measured.
Validation
make fmtmake agent-report-progressnode --test scripts/ci-front-door.test.cjs scripts/ci-front-door-workflow.test.cjs scripts/ci-front-door-researcher.test.cjs: 46 passed, with signing disabled only for disposable test repositories via process-scoped Git configuration.bash scripts/check-cgo-cjs-workflow-purity.sh .github/workflows/cgo.ymlpython3 scripts/check-instruction-prefixes.py .github/ci/decision-prompt.txtStatic security review: PASS, no confirmed vulnerabilities. No live workflow or model requests were dispatched for validation.