Repository navigation
Add fail-open CI Front Door and cache-first daily researcher - #77203
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
| try { | ||
| url = new URL(endpoint); | ||
| if (url.protocol !== "https:" || url.username || url.password || url.hash) throw new Error("invalid-endpoint"); | ||
| if (url.hostname === "api.github.com" || url.hostname === "github.com" || url.hostname.endsWith(".github.com")) throw new Error("github-api-forbidden"); |
| response = await decide( | ||
| endpoint, | ||
| { | ||
| diff_summary: diff, |
|
@copilot run pr-finisher skill |
|
🚀 PR Specification Reviewer has started processing this pull request |
|
🔬 Test Quality Sentinel is analyzing test quality on this pull request... |
|
✂️ Ponytail Reviewer has started processing this pull request |
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
|
🔎 PR Code Quality Reviewer is reviewing code quality for this pull request... |
|
🔍 Design Decision Gate 🏗️ is checking for design decision records on this pull request... |
Completed the finisher pass. No code changes were warranted: the two unresolved threads are from an out-of-scope reviewer under the skill’s eligibility rules. Formatting and lint passed; |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical guardrail gaps permit uncached GitHub access, bypass GitHub API endpoint blocking, and allow the Windows Defender security scan to be skipped.
6 open issues
Keep the Defender scan mandatory when builds are skipped · New Disable GitHub MCP to preserve the offline contract · New Strip trailing DNS dots before endpoint comparison · New Provide cached evidence for scheduled selector runs · New Disable automatic failure issue reporting · New Restrict researcher edits to the summarizer module · New
What changed in this PR
Adds CI Front Door to reduce gh-aw’s CGO pull-request test cost through suite selection, alongside cache-first research for improving selection policies.
Changes:
- Selects five optional CGO suites using a bounded local diff and one Decision API request, with conservative fallback behavior.
- Adds a daily restore-only researcher that proposes evidence-backed changes through draft PRs.
- Adds offline replay, conformance coverage, weekly full-run controls, and configuration documentation.
| File | Description |
|---|---|
scripts/ci-front-door.test.cjs |
Tests selection, request limits, fallbacks, workflow wiring, and replay metrics. |
scripts/ci-front-door.cjs |
Implements bounded diff summaries, decision validation, suite selection, and metrics. |
scripts/ci-front-door-researcher.test.cjs |
Checks researcher configuration and evidence/publication constraints. |
scripts/ci-front-door-evaluate.cjs |
Replays cached decisions and reports savings, misses, and evidence gaps. |
CONTRIBUTING.md |
Documents endpoint provisioning, fallback rules, and offline evaluation. |
.github/workflows/ci-front-door-researcher.md |
Defines daily cache-first research and draft-proposal requirements. |
.github/workflows/ci-front-door-researcher.lock.yml |
Provides the researcher’s compiled jobs, tools, permissions, and cache restoration. |
.github/workflows/cgo.yml |
Adds selector outputs, optional-suite gates, conformance checks, and weekly controls. |
.github/ci/suite-catalog.json |
Defines versioned suite IDs, mandatory flags, and duration metadata. |
.github/ci/decision-prompt.txt |
Establishes conservative selection rules for the Decision API. |
Review effort: Max (auto)
|
|
||
| cross-platform-build: | ||
| needs: [checkout-cache, build] | ||
| if: github.event_name != 'pull_request' || !needs.checkout-cache.outputs.suite_ids || contains(fromJSON(needs.checkout-cache.outputs.suite_ids), 'cross-platform-build') |
There was a problem hiding this comment.
No change needed: .github/workflows/cgo.yml keeps the Windows matrix entry even when cross-platform-build is omitted from the selected suites; only the macOS matrix leg is skipped. The Defender step is conditioned on runner.os == 'Windows', so it still runs.
| copilot-sdk: true | ||
| network: | ||
| allowed: [] | ||
| tools: |
There was a problem hiding this comment.
Already addressed in the current workflow: .github/workflows/ci-front-door-researcher.md sets tools.github: false, and the compiled lock manifest contains no GitHub MCP server. The researcher also declares network.allowed: [].
| description: Daily offline evaluation of CI Front Door using already cached PR and workflow evidence. | ||
| intent: Improve CI suite selection without missing regressions, downloading duplicate evidence, or weakening fail-open safeguards. | ||
| on: | ||
| schedule: daily |
There was a problem hiding this comment.
The researcher is manual-only and restore-only by design. Its instructions require reporting missing cached evidence and prohibit proposing efficacy changes unless matched replay/full-run evidence exists; this is the intended fail-closed behavior, so I did not add evidence downloads or alter the producer cache.
| - "git diff *" | ||
| - "git status *" | ||
| safe-outputs: | ||
| create-issue: false |
There was a problem hiding this comment.
Already addressed: the workflow disables failure, failed-job, missing-data, incomplete-report, and noop issue publication. The generated lock and conformance test verify the corresponding false settings; the old conformance assertion was corrected in a048e5c.
| allowed-files: | ||
| - ".github/ci/suite-catalog.json" | ||
| - ".github/ci/decision-prompt.txt" | ||
| - "scripts/ci-front-door.cjs" |
There was a problem hiding this comment.
Already addressed in the current source: allowed-files contains only the catalog, decision prompt, and scripts/ci-front-door-diff.cjs; the prompt explicitly forbids editing scripts/ci-front-door.cjs. The conformance test checks this exact allowlist.
|
@copilot review ci failures |
Reviewed checks for head Six reviewer workflows (PR Specification Reviewer, Design Decision Gate, Test Quality Sentinel, Matt Pocock Skills Reviewer, Ponytail Reviewer, and PR Code Quality Reviewer) all stop at |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "c93c4da19e710a8e18cf7577c34196870d759dbc",
"kind": "requested",
"schema_version": "1",
"state": "b68a6f8f8f6fdfe09df649e236f5535cab1e789ee7cd3ee92a1a7228dcf4e841",
"work": [
"34f38971738f6a752a646bd7797a6c8d47fb096e4eb6f91e946a91255433c8c4",
"51e2287c3d1ee41b7e13769862add61dcd292a623cf943abc5968c984e246bcf",
"a121abdb6f7ec1d78bbf7f04ffacc47490c3a82a0a8351c53214073a3902577d",
"f7883e8c8105930e955354caa741d783bcca067e66097fe9612fb72b90823998"
],
"workflow": "pr-sous-chef"
}
|
Merged the latest
|
| response = await decide( | ||
| endpoint, | ||
| { | ||
| diff_summary: diff, |
| let suiteIds = [...SUITE_IDS]; | ||
| if (!reason) { | ||
| try { | ||
| suiteIds = selectSuites(response, validCatalog); |
|
@copilot run pr-finisher skill |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
| response = await decide( | ||
| endpoint, | ||
| { | ||
| diff_summary: diff, |
| response = await decide( | ||
| endpoint, | ||
| { | ||
| diff_summary: diff, |
| url = new URL(endpoint); | ||
| if (url.protocol !== "https:" || url.username || url.password || url.hash) throw new Error("invalid-endpoint"); | ||
| const hostname = url.hostname.replace(/\.$/, ""); | ||
| if (hostname === "api.github.com" || hostname === "github.com" || hostname.endsWith(".github.com")) throw new Error("github-api-forbidden"); |
| let suiteIds = [...SUITE_IDS]; | ||
| if (!reason) { | ||
| try { | ||
| suiteIds = selectSuites(response, validCatalog); |
|
@copillot fix https://github.com/github/gh-aw/actions/runs/43360638450/job/131673042898?pr=77203 |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "6593c55ad9ed1cf16e29ac2e24b3b5812ccaa3e6",
"kind": "requested",
"schema_version": "1",
"state": "36bdbbaa169aa9d5b9203a908661bf2d652c577557ff8314be106a09fe825d78",
"work": [
"ace60f98d25c56a0f83778a3c49018a102c8c5bdf957de461ba202664a580645"
],
"workflow": "pr-sous-chef"
}
|
…-implementation Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Merged the latest |
| if (!reason && diff.files.some(file => file.startsWith(".github/ci/") || file.startsWith("scripts/ci-front-door") || file === ".github/workflows/cgo.yml")) reason = "policy-changed"; | ||
| if (!fullRun) { | ||
| try { | ||
| response = await decide( |
| if (!reason && diff.files.some(file => file.startsWith(".github/ci/") || file.startsWith("scripts/ci-front-door") || file === ".github/workflows/cgo.yml")) reason = "policy-changed"; | ||
| if (!fullRun) { | ||
| try { | ||
| response = await decide( |
|
@copilot run pr-finisher skill |
|
🎉 This pull request is included in a new release. Release: |


Reduce PR test cost using one Decision API request over a capped local diff and versioned suite catalog, with no other selector-side GitHub API calls. Uncertain decisions run all applicable suites; mandatory security checks remain unconditional.
needsoutputs. Reject redirects, retries, oversized responses, and malformed decisions.Configuration: Set
CI_DECISION_URLto an approved HTTPS service. Valid configuration permits exactly one POST; absent or invalid configuration makes zero requests and runs all applicable suites.Example decision response:
{"suite_ids":["build-wasm"],"confidence":0.95}Mandatory suites are added locally; optional reasoning is ignored. CJS and Windows CI remain unchanged.