Skip to content

Let frontdoor filter all CGO check jobs on pull requests - #79063

Merged
pelikhan merged 4 commits into
mainfrom
pelikhan/cgo-frontdoor-performance
Nov 18, 2026
Merged

pelikhan merged 4 commits into
mainfrom
pelikhan/cgo-frontdoor-performance

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Why

All 138 observed CGO frontdoor decisions in the investigated 24-hour window selected every suite. The old deterministic path allowlist and mandatory suite groups prevented useful PR filtering; generated locks also exhausted the compare API's 300-file inventory before filtering.

Changes

  • Make all 24 CGO check jobs independently eligible for frontdoor selection on PRs. Remove the path allowlist and mandatory check-job exemptions, including Go tests, security checks, linters and Windows. Source, dependency, test and script changes now receive model-driven relevance analysis.
  • Retain direct and transitive prerequisites of selected jobs. Validate selection against the actual job IDs and prerequisite graph before applying workflow conditions. An empty selection is valid; malformed or missing output runs all checks.
  • Wire every check job to frontdoor, including conformance, full Go unit shards, benchmarks, fuzzing and security scans. Selection controls both macOS and Windows together. Only checkout/cache, selection, and timing/cache cleanup remain outside selection.
  • Preserve non-PR full-run behavior and existing main-only restrictions outside PRs for benchmarks, fuzzing and security scans.
  • Retain only the first changed .lock.yml in sorted order as a representative generated sample; exclude other generated locks from retained inventories and patch budgets.
  • Recover capped comparisons through paginated immutable merge-commit evidence, validating the exact commit and first parent on every page. Missing source evidence, resource limits and transport failures fail open.
  • Skip inference for invalid, unavailable, incomplete or empty evidence and selector-policy changes. These conditions run all checks; ordinary source paths no longer force that outcome.
  • Update contributor documentation, the selection prompt, and the researcher contract; regenerate its compiled lock.

Trust and rollout

PR runs continue executing the selector from the trusted base SHA, never PR-controlled selector code with inference credentials. The new selector becomes active once it is in the PR base. This PR changes selector policy and intentionally runs all checks. Older trusted selector output is rejected by the expanded output validator and fails open during rollout.

Omissions still require probability at least 0.9. Invalid, missing, refused or uncertain model answers run all checks. Every check is eligible, but selected prerequisites cannot be omitted. This broadens filtering authority intentionally; no live-model safety or runner-savings claim is made.

Validation

  • All 52 focused selector, workflow-gating and researcher tests passed, including every individual job, empty/full selections, prerequisite closure, invalid-output fallback and non-PR behavior.
  • make agent-report-progress passed. No Go files changed, so impacted Go tests were skipped.
  • make recompile compiled all 366 workflows successfully; lock files are synchronized.
  • CGO actionlint and workflow-purity checks passed; instruction-prefix checks passed.
  • Earlier immutable evidence replay recovered 466 changed files, including 366 generated locks, from a capped comparison; missing source patches still failed open.
  • No real Decisions inference or workflow dispatch was performed for this change.

Retain one deterministic lock sample, recover capped inventories from immutable commit pages, and verify PR selection reaches optional job gates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review November 18, 2026 15:37
Copilot AI adaptive review requested due to automatic review settings November 18, 2026 15:37
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Nov 18, 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 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 18, 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 #79063 · codex · routed: gpt61 medium · ~6 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

Generated by PR Specification Reviewer for #79063 · copilot · gpt56 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.7K · ◷

@github-actions

github-actions Bot commented Nov 18, 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 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.

Review

No actionable correctness or maintainability issues found in the changed lines. The review was static; tests and builds were not run.

The delegated first-pass reviewer was unavailable because its file-read tool invocation was denied, so this assessment is based on the independent diff review.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.5K
Comment /review to run again

@github-actions github-actions Bot 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.

Review outcome

Reviewed head a63de9f13762782bc4e491fac4703e339f863036 (open, non-draft).

Finding

The updated GitHub diff path still calls the compare endpoint with per_page=1 and only enters the 300-file commit-pagination recovery when the returned array has at least 300 entries. GitHub therefore returns only one file for ordinary multi-file comparisons, allowing incomplete evidence to reach omission inference and potentially skip affected suites. This violates the CI Front Door contract requiring complete filename inventories and fail-open behavior for incomplete evidence. An inline comment is attached at scripts/ci-front-door-diff.cjs:105.

No specification-only synchronization is proposed; the required fix is implementation/conformance correction. The directly applicable contract is the CI Front Door researcher/selector contract in .github/workflows/ci-front-door-researcher.md and its contributor documentation; no separate formal spec document covers this surface.

Please request a bounded complete comparison inventory or explicitly detect pagination/truncation before using the recovery path.

Generated by PR Specification Reviewer for #79063 · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.7K
Comment /review-specs to run again

Comment thread scripts/ci-front-door-diff.cjs Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-5457fc78-9934-4702-9104-ce03c456ab60","parents":[],"payload":{"id":"ldg-b9c04595-d035-4a88-88c5-f0905800042d","operation":"append","value":{"finding_count":0,"head_sha":"a63de9f13762782bc4e491fac4703e339f863036","outcome":"no_findings"}},"sha":"sha256:c05fba946ada5dc139411d98cf85c1f9180409a9e0497b7d89310de7b87ea6d9","timestamp":"2026-11-18T15:44:08.483Z","type":"ledger_append","version":1}
History

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-dc8e66f1-6cc3-48ee-886e-eaeaa4e839a1","parents":[],"payload":{"id":"ldg-be17415e-39ba-4857-b919-5f1fdbe132ea","operation":"append","value":{"finding_count":1,"head_sha":"a63de9f13762782bc4e491fac4703e339f863036","outcome":"regression"}},"sha":"sha256:dd4b81ab633a3b3458e622f1b07a78bb65c96c4c90f79b82781c41c7a766ae35","timestamp":"2026-11-18T15:45:00.974Z","type":"ledger_append","version":1}
History

Remove path-based omission restrictions and mandatory check groups. Select each CGO check job independently, retain selected prerequisites, and preserve trusted-base execution and fail-open behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan pelikhan changed the title Reduce CGO frontdoor overhead and filter generated lock diffs Let frontdoor filter all CGO check jobs on pull requests Nov 18, 2026
@pelikhan
pelikhan enabled auto-merge (squash) November 18, 2026 15:58
@pelikhan
pelikhan disabled auto-merge November 18, 2026 15:58

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 conformance test uses an uncontrolled checkout diff that causes failures on this PR, while lockfile patches can exhaust the sampling budget and hide documentation hunks needed to establish safety.

1 open issue
What changed in this PR

Reduces CGO CI selector overhead while preserving trusted-base execution and running all suites when evidence cannot safely support omissions.

Changes:

  • Bypass inference when trusted policy requires every suite.
  • Retain one generated lock sample and recover capped comparisons through SHA-validated commit pagination.
  • Extend conformance tests and update selection guidance and the researcher contract.

Validation used focused offline checks; full tests and workflow compilation were not run during this review.

File Description
scripts/​ci-front-door.test.cjs Covers inference bypass, lock sampling, pagination, and failure handling.
scripts/​ci-front-door.cjs Skips unnecessary inference and classifies normal all-suite outcomes.
scripts/​ci-front-door-workflow.test.cjs Checks selector results against job gates and platform matrices.
scripts/​ci-front-door-researcher.test.cjs Updates researcher-contract assertions.
scripts/​ci-front-door-diff.cjs Adds lock sampling and bounded, validated commit pagination.
CONTRIBUTING.md Documents API evidence, inference bypass, and resource limits.
.github/​workflows/​ci-front-door-researcher.md Revises request-budget and generated-lock guidance.
.github/​workflows/​ci-front-door-researcher.lock.yml Refreshes generated body and admission hashes.
.github/​ci/​decision-prompt.txt Clarifies lock-sample handling and omission eligibility.

Review effort: Max (adaptive)

Comment thread scripts/ci-front-door-diff.cjs Resolved
Comment thread scripts/ci-front-door.cjs Resolved
Document that per_page limits commits, while the first comparison page carries up to 300 changed files for the entire comparison.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): No code change is needed because this announces review activity rather than requesting a change. It is not treated as a validation result.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): The underlying static review found no actionable correctness or maintainability issues and did not run tests or builds. No code change is needed based on the reported_action status alone.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): No code change is needed because this completion notification contains no actionable request. The no-action outcome is not treated as independent validation of the changes.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): This completion notification needs no separate code change; its associated pagination finding was evaluated against GitHub's documented API semantics. The requested functional change was declined, and 21214c2 documents why first-page file coverage is independent of the commit page size.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): No code change is requested by this test-analysis completion notification. Its no-action outcome is not treated as a passing test result or proof that all required work completed.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): No code change is needed because this ledger records the historical review outcome for a63de9f, not validation of the current head. The historical ledger remains unchanged.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): This historical ledger remains unchanged and needs no separate code change. The associated pagination finding was declined after checking GitHub's documented semantics, with an explanatory source comment published in 21214c2.

Comment thread scripts/ci-front-door.cjs Resolved
Comment thread .github/workflows/cgo.yml Resolved
Process lock-only API entries after source evidence so a large sample cannot consume documentation patch budgets. Cover both API response orders and renames across the generated-lock boundary.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): The previous no-change disposition stands because this is a review-activity notification, not an actionable request or validation result.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): No code change follows from reported_action alone. The underlying review found no actionable issues through static inspection and did not run tests or builds.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): No actionable request is included, so no change is needed. The no-action status is not independent evidence of completion or publication.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): This completion notification needs no separate change. Its associated pagination finding was already answered using the documented distinction between commit pagination and first-page file coverage.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): No code change is requested. The no-action status does not establish passing tests or completion of all required work.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): This ledger remains unchanged as a historical result for a63de9f. It does not validate the current head and requires no separate code change.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): The historical finding count and regression outcome remain unchanged. The ledger itself requires no separate code change or retrospective rewrite.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): Agreed; the prior disposition stands because the source comment announces activity rather than requesting a change. No further code change is needed.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): The prior disposition stands: the underlying review was static, reported no actionable issues, and did not run tests or builds. This acknowledgment requires no code change.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): Agreed; the prior no-change disposition stands. A no-action status is not independent validation.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): The documented pagination disposition and explanatory commit 21214c2 remain applicable. This acknowledgment introduces no new code change or validation claim.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): Agreed; no code change was requested by the source notification. Its no-action status does not establish passing tests or completed work.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): Agreed; the historical ledger remains unchanged and is not current-head validation. No further code change is needed.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

In response to #79063 (comment): The historical ledger and previously recorded pagination disposition remain unchanged. This acknowledgment requires no code change and adds no validation claim.

Comment thread .github/workflows/cgo.yml
security:
needs: [checkout-cache, build]
needs: [checkout-cache, build, front-door-decision]
if: always() && !cancelled() && needs.checkout-cache.result == 'success' && needs.build.result == 'success' && (github.event_name != 'pull_request' || needs.front-door-decision.result != 'success' || !needs.front-door-decision.outputs.suite_ids || contains(fromJSON(needs.front-door-decision.outputs.suite_ids), 'security'))
@pelikhan
pelikhan merged commit a245939 into main Nov 18, 2026
88 of 90 checks passed
@pelikhan
pelikhan deleted the pelikhan/cgo-frontdoor-performance branch November 18, 2026 16:58
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