Repository navigation
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
✅ PR Specification Reviewer completed successfully! PR Specification 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 has completed the skills-based review. ✅ Matt Pocock Skills 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.
|
|
✅ 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.
|
|
✅ 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.
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Overview
Reviewed PR head 7a4e07bf3e2f2d36cc7d80b2352f0a910b4fbe9c against the Safe Outputs specification (Version 1.31.0). The implementation and reference documentation describe the new proof-evidence behavior, but the normative specification revision is not versioned.
Blocking issue
docs/src/content/docs/specs/safe-outputs-specification.md:4425: add a new specification version/publication date and Appendix F changelog entry for this normative contract. The current metadata remains 1.31.0 from 2026-11-19, so consumers cannot identify the revision containingproof-evidence.
No code or tests were changed by this review. Coverage was limited to the prefetched PR diff and relevant specification/reference sections; tests were not run per static-review policy.
Generated by PR Specification Reviewer for #79604 · copilot · gpt50 · ~5 AIC · ⌖ ~2 AIC · ⊞ 1.7K
Comment /review-specs to run again
| - `allowed-base-branches`: REQUIRED non-empty list of static destination branch patterns declared by the owner as non-consequential automated integration targets. Only `*` and `**` glob operators are supported. Expressions, negation, character classes, braces, extglobs, `?`, `+`, and backslash escapes MUST be rejected by the schema, compiler, and runtime. Patterns consisting only of `*` and `/`, such as `"*"`, `"**"`, `"*/*"`, and `"**/*"`, MUST be rejected. The live base branch MUST match at evaluation and final revalidation, including staged and cross-repository operations. Matching MUST be case-sensitive, with `*` restricted to one path segment and `**` spanning `/`. This policy MUST NOT override any other gate. Null/default-only merge configuration MUST be rejected; destination scope MUST NOT be inferred from `allowed-branches`. | ||
| - `required-checks`: Exact check-run names, unioned with branch-policy requirements. Each MUST complete with `success` on the evaluated head SHA. Missing, pending, skipped, neutral, failed, or wrong-revision checks block merging. Missing app identities or multiple apps publishing the same required name also block merging; this does not authenticate an expected producer. The compiler rejects overlap with the workflow's resolved agent-controlled `create-check-run` name. Legacy commit-status contexts are not supported. An empty or omitted list adds no workflow-owned CI requirement; if the union is empty, CI is not queried. | ||
| - `required-check-apps`: Optional map from names in `required-checks` to positive GitHub App IDs. For mapped names, every observed non-deployment check run MUST have the configured app ID, including during final revalidation. Unknown names and invalid IDs MUST fail compilation. App identity does not establish which workflow produced a check; CI workflow definitions still require independent protection. | ||
| - `proof-evidence`: Optional `{check, verifier-version, configuration-sha256}` deterministic verifier binding. The check MUST be required and App-pinned, and external authorization MUST be configured. Its selected successful check run MUST supply a strict `gh-aw.merge-proof.v1` JSON summary binding repository, PR number, head SHA, verifier version, configuration digest, and `result: passed`. Missing, failed, Unknown, unsupported, or mismatched evidence MUST block merging. The trusted binding MUST pass through existing resolved-effect authorization and MUST match again during final merge revalidation; a changed head invalidates it. Agent assertions MUST NOT supply proof. See [the proof evidence contract](../reference/safe-outputs-pull-requests.md#merge-pull-request-merge-pull-request) for transport details. |
There was a problem hiding this comment.
This adds a new normative proof-evidence contract, but the specification metadata and Appendix F history remain at Version 1.31.0 (2026-11-19), with no entry describing this requirement. Please bump the spec version/publication date and add a focused changelog entry (preserving the existing version-history convention) so published consumers can identify the contract revision.
There was a problem hiding this comment.
Addressed in 4d56bfb: bumped the specification to 1.32.0, updated the publication date, and added a focused changelog entry.
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
No actionable correctness, security, performance, or maintainability issues were identified in the changed lines. The proof-evidence flow is consistently bound to the selected check, exact head, resolved merge inputs, and final authorization revalidation.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~5 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (>100 new lines) but does not have a linked Architecture Decision Record (ADR). 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in 🔗 Related ADRs
|
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design and /grill-with-docs. No blocking defects found. The fail-closed proof path holds on the paths I traced, and the tests cover forged, duplicate-key, Unknown, failed, pending, agent-producer, replacement-run, and head-change cases. Four improvements are suggested inline.
📋 Key Themes & Highlights
Key Themes
- Proof-merge predicate is repeated: three call sites decide "is this a proof merge" independently (merge handler, pre-authorization gate, manager deferral). They agree today but could drift.
- Implicit return shape:
evaluateRequiredChecksaddsproof_evidenceonly when the optionalproofargument is passed. - Stale generated docs:
frontmatter-full.mdlacks theproof-evidenceblock thatscripts/generate-schema-docs.jsproduces.
Positive Highlights
- ✅ Proof is read only from the producer-pinned check, not from agent input.
- ✅ Strict JSON parsing with exact-key matching and a duplicate-key rejection test.
- ✅ Revalidation compares the full proof record, including
check_run_idandapp_id, so a replacement run is caught. - ✅ Staged previews skip authorization, as documented.
Not Verified
- JS tests were not run in this review (no
node_modules).
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~15 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| * @param {{policy: NonNullable<import('./types/handler-factory').HandlerConfig['proof_evidence']>, pullNumber: number}} [proof] | ||
| */ | ||
| async function evaluateRequiredChecks(githubClient, owner, repo, headSha, requiredChecks, requiredCheckApps = {}) { | ||
| async function evaluateRequiredChecks(githubClient, owner, repo, headSha, requiredChecks, requiredCheckApps = {}, proof) { |
There was a problem hiding this comment.
[/codebase-design] The trailing optional proof parameter makes the return shape depend on call arguments. The early return at line 450 always includes proof_evidence: undefined, while the main return adds the key only when proof is passed. Safety holds today because the proof-evidence validation (around line 630) requires the check to be in required-checks, which makes the early return unreachable for proof merges. That invariant lives in a different function, so consider passing an explicit policy and returning proof_evidence uniformly so the coupling is visible at the signature.
@copilot please address this.
There was a problem hiding this comment.
Addressed in 4d56bfb: evaluateRequiredChecks now receives the explicit proof policy and always returns the same shape, including proof_evidence.
| ...(message.commit_title === undefined ? {} : { commit_title: message.commit_title }), | ||
| ...(message.commit_message === undefined ? {} : { commit_message: message.commit_message }), | ||
| }; | ||
| if (checkSummary.proof_evidence && !isStaged) { |
There was a problem hiding this comment.
[/codebase-design] Three places independently decide whether this is a proof merge: checkSummary.proof_evidence here, proofPolicy at line 1071, and the manager gate using descriptor.proof_evidence. They agree today, but a change to one can silently desync the others. Derive one proofRequired flag once, and fail closed when it is set but checkSummary.proof_evidence is missing.
@copilot please address this.
There was a problem hiding this comment.
Addressed in 4d56bfb: the handler derives proofRequired once from the configured policy and fails closed if its trusted check evaluation lacks proof evidence.
| (preparedAdapter || | ||
| actionTypes.has(type) || | ||
| ["upload_artifact", "call_workflow", "upload_code_coverage"].includes(type) || | ||
| (type === "merge_pull_request" && !!descriptor.proof_evidence) || |
There was a problem hiding this comment.
[/codebase-design] This adds a merge_pull_request special case to a generic list of action types that controls when authorization is deferred, so the manager now needs merge-proof semantics. A handler-declared flag, such as deferred_authorization: true on the descriptor, would keep merge rules in the merge handler and make this predicate type-agnostic.
@copilot please address this.
There was a problem hiding this comment.
Addressed in 4d56bfb: the manager now uses the generic handler-declared deferred_authorization capability rather than a merge-specific authorization rule.
| "additionalProperties": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, | ||
| "description": "Expected GitHub App ID for each named check. Keys must also appear in required-checks. A missing or different producer blocks merging." | ||
| }, | ||
| "proof-evidence": { |
There was a problem hiding this comment.
[/grill-with-docs] docs/src/content/docs/reference/frontmatter-full.md is generated from this schema by node scripts/generate-schema-docs.js. Running it adds a 12-line proof-evidence block that is missing from the checked-in file, so the reference docs are stale. Regenerate and commit it, and check whether docs/public/editor/autocomplete-data.json needs the same update.
@copilot please address this.
There was a problem hiding this comment.
Addressed in 4d56bfb: regenerated the frontmatter reference from the schema and updated editor autocomplete data.
There was a problem hiding this comment.
🟡 Changes recommended
Proof-protected merges can reach GitHub after authorization expires because freshness is not rechecked after Claim preflight.
7 open issues
Recheck proof freshness after Claim preflight · New Mark required checks failed before proof evaluation · New Run read-only merge gates for staged previews · New Allowlist the proof-evidence failure diagnostic · New Bump the policy version for proof evidence · New Use a valid authorization object in the example · New Use the published route for the reference link · New
What changed in this PR
This PR adds opt-in verifier evidence to gh-aw’s pull-request merge safe output, binding trusted check results to the exact PR head and the existing external authorization protocol.
Changes:
- Adds App-pinned verifier settings with schema and compiler validation.
- Binds strict check-run evidence and exact merge inputs to authorization, then revalidates before merging.
- Documents the evidence contract and adds configuration, rejection, and authorization-flow coverage.
| File | Description |
|---|---|
pkg/workflow/safe_outputs_validation_merge_pull_request_test.go |
Tests proof policy validation and serialization. |
pkg/workflow/safe_outputs_handler_registry_pull_requests.go |
Emits compiled verifier settings. |
pkg/workflow/merge_pull_request.go |
Parses and validates proof configuration. |
pkg/parser/schemas/main_workflow_schema.json |
Defines the strict proof configuration schema. |
pkg/parser/schema_merge_pull_request_test.go |
Tests valid and rejected schema inputs. |
docs/src/content/docs/specs/safe-outputs-specification.md |
Specifies merge-proof requirements. |
docs/src/content/docs/reference/safe-outputs-pull-requests.md |
Documents configuration and evidence transport. |
actions/setup/js/types/safe-outputs-config.d.ts |
Types author-facing proof settings. |
actions/setup/js/types/handler-factory.d.ts |
Types compiled proof settings. |
actions/setup/js/safe_output_handler_manager.cjs |
Defers proof authorization until effect resolution. |
actions/setup/js/safe_output_execution.cjs |
Exposes authorization freshness checks. |
actions/setup/js/merge_pull_request.test.cjs |
Covers proof validation and authorization flows. |
actions/setup/js/merge_pull_request.cjs |
Enforces proof binding and final revalidation. |
actions/setup/js/merge_pull_request_evidence.cjs |
Validates verifier summaries and builds authorization scope. |
Review effort: Max (adaptive)
| } | ||
|
|
||
| phase = "merge"; | ||
| if (proofPolicy) assertSafeOutputAuthorizationFresh(); |
There was a problem hiding this comment.
Addressed in 4d56bfb: authorization freshness is checked after Claim resource/authorization preflight and immediately before the native effect.
| evidence.checks = { required: branchPolicy.requiredChecks, required_apps: requiredCheckApps }; | ||
| const checkSummary = await evaluateRequiredChecks(githubClient, owner, repo, pr.head.sha, branchPolicy.requiredChecks, requiredCheckApps); | ||
| const proofRequest = proofPolicy ? { policy: proofPolicy, pullNumber } : undefined; | ||
| const checkSummary = await evaluateRequiredChecks(githubClient, owner, repo, pr.head.sha, branchPolicy.requiredChecks, requiredCheckApps, proofRequest); |
There was a problem hiding this comment.
Addressed in 4d56bfb: proof-required checks are recorded as failed before evidence evaluation, and only overwritten after successful evaluation.
| ...(message.commit_title === undefined ? {} : { commit_title: message.commit_title }), | ||
| ...(message.commit_message === undefined ? {} : { commit_message: message.commit_message }), | ||
| }; | ||
| if (checkSummary.proof_evidence && !isStaged) { |
There was a problem hiding this comment.
Addressed in 4d56bfb: staged proof-enabled merges now run read-only gates and final revalidation, record the decision audit, and skip external authorization and the merge API.
| function readMergeProofEvidence(run, policy, repository, pullNumber, headSha) { | ||
| /** @returns {never} */ | ||
| const reject = () => { | ||
| throw new Error(`${SAFE_OUTPUT_E007}: Missing, unsupported, failed or mismatched merge proof evidence; obtain a passed result from the configured deterministic verifier for this exact head and configuration`); |
There was a problem hiding this comment.
Addressed in 4d56bfb: added the fixed proof-evidence rejection message to the manager's exact diagnostic allowlist.
| required_title_prefix: config.required_title_prefix || "", | ||
| required_checks: sorted(requiredChecks), | ||
| required_check_apps: Object.entries(config.required_check_apps || {}).sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)), | ||
| ...(config.proof_evidence ? { proof_evidence: config.proof_evidence } : {}), |
There was a problem hiding this comment.
Addressed in 4d56bfb: proof-aware fingerprints and audit records now use policy version 2; validation, fixtures, and specification were updated accordingly.
|
🍳 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": "20c8f220e80a0be0e91bfa3a317643cca4c60127",
"kind": "requested",
"schema_version": "1",
"state": "a326ecfa47102f5783fc2447dec0260769a1ed2d6534752050c7cd6d2907e74a",
"work": [
"590c22a0aad5a8eb40a998d55f82089f49501d780a6a5c902b7817f249b463a5",
"5c51be1a9ac80b436863af5145a60481cd2f68b253dfc8f71288b57d97998304",
"66e4f1d96d7f2e58ebc85dd5da5d80c163f0ffc2059c94754ef6818143e31e2e",
"7c49b67effd2be1a6db7e8ab49bb1291712a342723d012f20e9e587e9fc0fbbd",
"83e9f82ba3202849372dcdc2d604925049d09e43f679cdfe7572f4ce037f860f",
"a1b3d61e34b209909c68230aed6c1077769e94627fdabe7500ec55e4660cc458",
"a88b109984d02f918bdb24e9bd73ed328822b1ce260ae0ab3b3dd61f95a99353",
"adcbd84d581508e81370faed1800fa637c1a33c25e8c888d24113ee197acf691",
"becebcaf1eed8de038b66268890747608be76807199625d21c502ff8a865bc57",
"dd7ff89f610624b1559c389c6f5e4d08901165791df7808e02a4aba2b5f05a1c",
"f91d89fa2c4f8a05f5bfdbda9d35f3dc42ba22f6a64db0b910705cc02e8eb626",
"ffcc103117ec1c3f526675cc9e75e2e8c125a4dfad35f892493ceb9a1fe13276"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>



Why
Invocation-bound authorization and evidence references do not establish that a trusted verifier evaluated the exact PR head and invariant configuration being merged.
Changes
merge-pull-request.proof-evidenceconfiguration for a required, GitHub App-pinned verifier check, verifier version, and configuration SHA-256 digest.gh-aw.merge-proof.v1evidence from the selected check's output summary, never agent-authored assertions. Bind repository, PR number, head SHA, verifier version, configuration digest, result, check-run ID, and producer App ID.The independent verifier owns proof semantics. Its credentials, implementation, invariant configuration, and workflow policy must remain outside the acting agent's control. No second authorization system or embedded solver is introduced, and existing merge restrictions remain intact.
Syntax examples
Trusted workflow configuration
Example frontmatter fragment; replace the authority endpoint, App ID, verifier version, and digest with independently controlled values. The digest identifies the complete invariant/configuration set evaluated by the verifier.
Verifier-produced evidence
The selected
invariant-verifiercheck run must come from App12345, complete with conclusionsuccesson the evaluated head, and publish this JSON as itsoutput.summary. The summary itself contains no Markdown fences and permits no extra fields or duplicate keys.{ "version": "gh-aw.merge-proof.v1", "repository": "owner/repo", "pull_request_number": 42, "head_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "verifier_version": "1.2.3", "configuration_sha256": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "result": "passed" }The agent requests the effect, not its proof or policy:
{ "type": "merge_pull_request", "pull_request_number": 42, "merge_method": "squash" }Outcome examples
These are illustrative handler-result excerpts, not records of live merges.
Success
For PR
owner/repo#42targeting an allowedagent-work/*branch, all existing gates pass, the trusted check supplies the matching evidence above, and the external authority allows the resolved effect. Final revalidation observes the same head and proof binding, and the authorization remains fresh. The merge API receivessha: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.{ "success": true, "data_trust": "untrusted", "merged": true, "pull_request_number": 42 }Authorization uses
scope.binding: resolved_effect. Its refs include the repository, PR, exact head, check-run ID, App ID, verifier version, configuration digest, passed result, and complete-binding digest. The exact merge inputs and proof binding are also covered byinput_digest.Refused
Even with a green check conclusion, changing the verifier summary to
"result": "Unknown"refuses the merge before requesting external authorization:{ "success": false, "data_trust": "untrusted", "error": "E007: Missing, unsupported, failed or mismatched merge proof evidence; obtain a passed result from the configured deterministic verifier for this exact head and configuration", "decision_evidence": { "failure_phase": "required_checks" } }Pre-execution refusals do not necessarily include a
mergedfield; in these cases the merge API is not called.failed,Unknown, or any result other thanpassedsuccess.proof_evidenceobject but no valid trusted check evidenceaaaa..., but the PR changes tobbbb...before final revalidationrevalidation; a new evaluation and authorization are required.Omitting
proof-evidencepreserves existing behavior. Enabling it does not permit default/protected-branch merges or bypass review, file-protection, or other merge gates.Validation
go test ./pkg/workflow ./pkg/parser -run 'MergePullRequest' -count=1npm --prefix actions/setup/js run typecheckmake agent-report-progress-no-testgolangci-lint run --new-from-rev=origin/main ./pkg/parser ./pkg/workflowmake check-workflow-driftmake agent-report-progresswas attempted and its impacted Go tests passed. Missing lint tooling was restored and failed changed-code checks were corrected and rerun. Full custom Go lint still reports pre-existing diagnostics in unchanged files; none remain in the changed Go files.