Skip to content

Bind merge verifier evidence to exact-head authorization - #79604

Closed
pelikhan wants to merge 4 commits into
mainfrom
pelikhan/literate-giggle
Closed

pelikhan wants to merge 4 commits into
mainfrom
pelikhan/literate-giggle

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Add opt-in merge-pull-request.proof-evidence configuration for a required, GitHub App-pinned verifier check, verifier version, and configuration SHA-256 digest.
  • Read strict gh-aw.merge-proof.v1 evidence 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.
  • Pass the binding and exact merge inputs through the existing external authorization protocol as one resolved-effect request. Reuse final merge revalidation and check authorization freshness before execution.
  • Block missing, failed, malformed, unsupported/Unknown, or mismatched evidence and changed heads. Preserve behavior when proof enforcement is not configured.

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.

safe-outputs:
  merge-pull-request:
    target: "*"
    allowed-base-branches: ["agent-work/*"]
    authorization:
      endpoint: https://authority.example/authorize
      audience: merge-proof
    required-checks: ["invariant-verifier"]
    required-check-apps:
      invariant-verifier: 12345
    proof-evidence:
      check: invariant-verifier
      verifier-version: "1.2.3"
      configuration-sha256: "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"

Verifier-produced evidence

The selected invariant-verifier check run must come from App 12345, complete with conclusion success on the evaluated head, and publish this JSON as its output.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#42 targeting an allowed agent-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 receives sha: 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 by input_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 merged field; in these cases the merge API is not called.

Situation Outcome
Missing verifier check or summary; failed/pending check Refused before external authorization.
Summary reports failed, Unknown, or any result other than passed Refused, including when the check conclusion is success.
Repository, PR number, head, verifier version, configuration digest, or evidence schema version does not match Refused before external authorization.
Agent supplies a forged proof_evidence object but no valid trusted check evidence Refused; agent evidence is never consumed as proof.
Same-named check comes from a different App Refused by existing required-check producer enforcement.
Authority allows head aaaa..., but the PR changes to bbbb... before final revalidation Refused during revalidation; a new evaluation and authorization are required.
Selected check run or proof binding changes during final revalidation Refused; the earlier authorization cannot authorize replacement evidence.
Authority denies the effect or its decision expires before execution Refused; passing proof alone does not authorize the merge.

Omitting proof-evidence preserves 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=1
  • npm --prefix actions/setup/js run typecheck
  • Six targeted JavaScript suites: 800 tests passed, including real manager/authorization-protocol fixtures for passing proof, denied authorization, changed-head rejection, forged agent evidence, and Unknown results.
  • make agent-report-progress-no-test
  • golangci-lint run --new-from-rev=origin/main ./pkg/parser ./pkg/workflow
  • make check-workflow-drift

make agent-report-progress was 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.

@pelikhan
pelikhan marked this pull request as ready for review November 21, 2026 00:03
Copilot AI adaptive review requested due to automatic review settings November 21, 2026 00:04
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification 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.

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

@github-actions

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

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

Matt Pocock Skills 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.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~15 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@github-actions

github-actions Bot commented Nov 21, 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 · ~5 AIC · ⌖ ~1 AIC · ⊞ 1.6K · ◷

@github-actions

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

This comment has been minimized.

@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.

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 containing proof-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.

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.

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.

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.

Addressed in 4d56bfb: bumped the specification to 1.32.0, updated the publication date, and added a focused changelog entry.

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-91bef183-a39d-4268-8216-94bca11887b3","parents":[],"payload":{"id":"ldg-ddc2e919-0349-49fc-8655-23e681befb63","operation":"append","value":{"finding_count":1,"head_sha":"7a4e07bf3e2f2d36cc7d80b2352f0a910b4fbe9c","outcome":"regression"}},"sha":"sha256:143f0dd24bca86656d19f2793f994e071e3b6d639945b874610ba6f9275d6f77","timestamp":"2026-11-21T00:11:07.657Z","type":"ledger_append","version":1}
History

@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.

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

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-d90b9b29-478e-4ff3-ab6d-869c10444e5d","parents":[],"payload":{"id":"ldg-32bcbb58-6bae-4b9b-9360-ec9ffcf6d78e","operation":"append","value":{"finding_count":0,"head_sha":"7a4e07bf3e2f2d36cc7d80b2352f0a910b4fbe9c","outcome":"no_findings"}},"sha":"sha256:6fc48295032f0d32f3132e0528e27a43293f0f15bd11e3a50b38e61d87dab9b8","timestamp":"2026-11-21T00:13:33.253Z","type":"ledger_append","version":1}
History

@github-actions

Copy link
Copy Markdown
Contributor

🏗️ Design Decision Gate — ADR Required

This PR makes significant changes to core business logic (>100 new lines) but does not have a linked Architecture Decision Record (ADR).

📄 Draft ADR committed: docs/adr/79604-bind-merge-proof-to-exact-head.md — review and complete it before merging.

🔒 This PR cannot merge until an ADR is linked in the PR body.

📋 What to do next
  1. Review the draft ADR committed to your branch. It was generated from the PR diff and PR body.

  2. Complete the missing sections: confirm the Context and Decision, and list the alternatives you actually considered. Resolve the [TODO: verify] item on staged previews skipping the resolved-effect authorization call.

  3. Commit the finalized ADR to docs/adr/ on your branch.

  4. Reference the ADR in this PR body by adding a line such as:

    ADR: ADR-79604: Bind Opt-In Merge Proof Evidence to Exact-Head Authorization (link unavailable: invalid HTTPS URL)

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 Reference

An ADR must contain these four sections to be considered complete:

  • Context: What is the problem? What forces are at play?
  • Decision: What did you decide? Why?
  • Alternatives Considered: What else could have been done?
  • Consequences: What are the trade-offs (positive and negative)?

All ADRs are stored in docs/adr/ and numbered by PR number, for example 79083-add-jsonl-reporting-to-update-and-upgrade.md for PR #79083.

🔗 Related ADRs
  • ADR-73922 (link unavailable: invalid HTTPS URL): Bind PR merges to the evaluated head
  • ADR-76771 (link unavailable: invalid HTTPS URL): Protected-file checks for merge-pull-request
  • ADR-77371 (link unavailable: invalid HTTPS URL): Scoped base branches for merge-pull-request
  • ADR-79029 (link unavailable: invalid HTTPS URL): External authorization for safe outputs

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 8.6K · ◷
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.

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: evaluateRequiredChecks adds proof_evidence only when the optional proof argument is passed.
  • Stale generated docs: frontmatter-full.md lacks the proof-evidence block that scripts/generate-schema-docs.js produces.

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_id and app_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

Comment thread actions/setup/js/merge_pull_request.cjs Outdated
* @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) {

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.

[/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.

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.

Addressed in 4d56bfb: evaluateRequiredChecks now receives the explicit proof policy and always returns the same shape, including proof_evidence.

Comment thread actions/setup/js/merge_pull_request.cjs Outdated
...(message.commit_title === undefined ? {} : { commit_title: message.commit_title }),
...(message.commit_message === undefined ? {} : { commit_message: message.commit_message }),
};
if (checkSummary.proof_evidence && !isStaged) {

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.

[/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.

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.

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

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.

[/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.

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.

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": {

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.

[/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.

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.

Addressed in 4d56bfb: regenerated the frontmatter reference from the schema and updated editor autocomplete data.

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

Proof-protected merges can reach GitHub after authorization expires because freshness is not rechecked after Claim preflight.

7 open issues
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)

Comment thread actions/setup/js/merge_pull_request.cjs Outdated
}

phase = "merge";
if (proofPolicy) assertSafeOutputAuthorizationFresh();

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.

Addressed in 4d56bfb: authorization freshness is checked after Claim resource/authorization preflight and immediately before the native effect.

Comment thread actions/setup/js/merge_pull_request.cjs Outdated
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);

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.

Addressed in 4d56bfb: proof-required checks are recorded as failed before evidence evaluation, and only overwritten after successful evaluation.

Comment thread actions/setup/js/merge_pull_request.cjs Outdated
...(message.commit_title === undefined ? {} : { commit_title: message.commit_title }),
...(message.commit_message === undefined ? {} : { commit_message: message.commit_message }),
};
if (checkSummary.proof_evidence && !isStaged) {

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.

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`);

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.

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 } : {}),

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.

Addressed in 4d56bfb: proof-aware fingerprints and audit records now use policy version 2; validation, fixtures, and specification were updated accordingly.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (docs/src/content/docs/specs/safe-outputs-specification.md:4425): address unresolved feedback - Review comment
  3. Review (actions/setup/js/merge_pull_request.cjs:447): address unresolved feedback - Review comment
  4. Review (actions/setup/js/merge_pull_request.cjs:993): address unresolved feedback - Review comment
  5. Review (actions/setup/js/safe_output_handler_manager.cjs:1463): address unresolved feedback - Review comment
  6. Review (pkg/parser/schemas/main_workflow_schema.json:11031): address unresolved feedback - Review comment
  7. Review (actions/setup/js/merge_pull_request.cjs:1071): address unresolved feedback - Review comment
  8. Review (actions/setup/js/merge_pull_request.cjs:895): address unresolved feedback - Review comment
  9. Review (actions/setup/js/merge_pull_request.cjs:993): address unresolved feedback - Review comment
  10. Review (actions/setup/js/merge_pull_request_evidence.cjs:20): address unresolved feedback - Review comment
  11. Review (actions/setup/js/merge_pull_request_evidence.cjs:89): address unresolved feedback - Review comment
  12. Review (docs/src/content/docs/reference/safe-outputs-pull-requests.md:305): address unresolved feedback - Review comment
  13. Review (docs/src/content/docs/specs/safe-outputs-specification.md:4425): address unresolved feedback - Review comment

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"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

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.

4 participants