Skip to content

Avoid full checkouts for CGO front-door decisions - #78599

Merged
pelikhan merged 1 commit into
mainfrom
pelikhan/solid-potato
Nov 17, 2026
Merged

pelikhan merged 1 commit into
mainfrom
pelikhan/solid-potato

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

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

  • Replace the PR-evidence checkout with one bounded GitHub compare API request pinned to the event's base and merge SHAs.
  • Keep a depth-1 sparse checkout containing only the five trusted selector, dependency, and configuration files.
  • Preserve renamed source paths, grouped patch bounds, local/offline replay, and separate accounting for evidence API requests.
  • Refine the prompt to assess optional suites independently and describe the existing isolated-path omission policy.

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 fmt
  • make agent-report-progress
  • node --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.yml
  • python3 scripts/check-instruction-prefixes.py .github/ci/decision-prompt.txt

Static security review: PASS, no confirmed vulnerabilities. No live workflow or model requests were dispatched for validation.

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`;
Comment thread scripts/ci-front-door.cjs
const diff = fullRun
? { files: [], patch: "", truncated: false, unavailable: false }
: process.env.CI_DIFF_BASE_SHA !== undefined
? await summarizeGitHubDiff({
@pelikhan
pelikhan marked this pull request as ready for review November 17, 2026 04:07
Copilot AI adaptive review requested due to automatic review settings November 17, 2026 04:07
@pelikhan
pelikhan merged commit ed1da18 into main Nov 17, 2026
87 checks passed
@pelikhan
pelikhan deleted the pelikhan/solid-potato branch November 17, 2026 04:07
Copilot stopped reviewing on behalf of pelikhan due to an error November 17, 2026 04:07
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_no_action

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.

Generated by PR Specification Reviewer for #78599 · copilot · gpt56 · ~1 AIC · ⌖ ~2 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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 analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

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.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated by Ponytail Reviewer for #78599 · codex · routed: gpt61 medium · ~5 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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)

Comment thread .github/workflows/cgo.yml
Comment on lines +121 to +123
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}";
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.1

Sign up for free to 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.

3 participants