Skip to content

Fix merge outcome uncertainty and responsible AI audit evidence - #77463

Merged
pelikhan merged 10 commits into
mainfrom
pelikhan/merge-output-rai-review
Nov 13, 2026
Merged

pelikhan merged 10 commits into
mainfrom
pelikhan/merge-output-rai-review

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Address findings 1, 3, and 4 from the Microsoft Responsible AI principles review of merge-pull-request: a lost merge response could be recorded as a failed mutation, raw errors escaped through manager diagnostics, and persisted audits did not distinguish optional gates from verified authorization.

Changes

  • Reconcile unconfirmed merge responses with one read-only PR lookup, without retrying the mutation. Confirmed merges are marked as reconciled; unresolved outcomes retain merged: null and operation_outcome: "indeterminate" across processing results, audits, summaries, and unified sessions.
  • Share HandlerIndeterminateResult and the operation-outcome marker across safe-output types, with a specialized merge result requiring merged: null. Serialization, summaries, and the session schema support non-merge uncertain operations too.
  • Replace raw merge errors with fixed manager diagnostics, including initialization, returned failures, thrown exceptions, and deferred processing.
  • Persist a versioned resolved-policy fingerprint and bounded check, approval, protected-file, and final-revalidation outcomes. Update documentation, session schema, and release notes.

Important semantics

Indeterminate outcomes fail processing to block dependent outputs, but do not claim the merge did not happen. Reconciled success confirms repository state without attributing the merge to this run. Audit fingerprints support correlation, not independent authorization. CI and affirmative human approval remain optional; this PR does not address review finding 2 or change those defaults.

Validation

  • Focused merge, audit, manager, summary, outcome, dependency, and session-rendering suites: 910 passed, 3 skipped.
  • Type checking, generated session-schema checks, formatting, build, and diff checks passed.
  • The final repository gate initially stopped on missing lint dependencies. After restoring them, its lint/schema portions passed through the non-test gate; impacted Go tests were not repeated. No changed Go files required Go unit tests.
  • No live merge or workflow dispatch was performed.

@pelikhan
pelikhan marked this pull request as ready for review November 13, 2026 14:11
Copilot AI adaptive review requested due to automatic review settings November 13, 2026 14:11
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

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

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ PR Code Quality Reviewer failed to deliver outputs during 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.

Generated from PR Code Quality Reviewer · gpt56 · ~3 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 1.6K · ◷

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

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

Generated from Test Quality Sentinel · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.2K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Design Decision Gate 🏗️

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 from Design Decision Gate 🏗️ · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 8.6K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

❌ PR Specification Reviewer failed to deliver outputs. Please review the logs for details.

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 from PR Specification Reviewer · gpt56 · ~5 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 1.7K · ◷

Generated by PR Specification Reviewer for #77463

@github-actions

github-actions Bot commented Nov 13, 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 from Ponytail Reviewer · routed: gpt61 medium · ~5 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 182 · ◷

Generated by Ponytail Reviewer for #77463

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

Reviewed the current diff for correctness, regressions, audit handling, reconciliation, and outcome propagation. No actionable issues found in the changed lines. Static review only; no code execution performed.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.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 /diagnosing-bugs and /codebase-design. Requesting changes on error attribution and on how the indeterminate path classifies definitive rejections.

📋 Key Themes & Highlights

Key Themes

  • Misattributed errors: mergeProcessingError() is called with no result at the generic catches, so infrastructure failures report as gate failures. recordMergeDecision also overwrites the specific diagnostic on every failed merge.
  • Indeterminate scope: every exception after mergeAttempted is treated as unconfirmed, including definitive HTTP rejections. The 409 test does not assert merge_outcome.

Positive Highlights

  • ✅ Reconciliation is a single read-only lookup that never retries the mutation.
  • ✅ reconcileMerge requires a head SHA match and a 40/64-hex merge SHA.
  • ✅ The policy fingerprint is sorted, lowercases approvers, and excludes credentials.
  • ✅ Docs, spec, schema, and d.ts changes are consistent with the code.

Uncertainty

I did not run the test suite, so the claimed 906 passing tests are unverified.

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again

Comment thread actions/setup/js/merge_pull_request.cjs Resolved
@pelikhan

Copy link
Copy Markdown
Collaborator Author

Regarding the skills-review completion notice: the notice itself needs no source change. The three actionable findings in the subsequent review are handled individually in their inline threads.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Regarding the code-quality delivery failure: the safe-output logs report Built-in ledger requires an operation, not a record, while the published review reports no actionable issues. No source change is warranted here for that separate reviewer-publication failure; I did not rerun or modify the reviewer workflow.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Regarding the Test Quality Sentinel notice: no source change is needed because it reports no actionable finding. The concrete inline findings are covered by focused regression checks rather than treating this notice as validation evidence.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Regarding the Design Decision Gate notice: no source change is needed because it contains no requested design change or ADR correction. This completion notice is not being treated as maintainer approval.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Regarding the specification-review delivery failure: the safe-output logs report Ledger value does not match schema: (root) must be a object, not a delivered specification finding. No source change is warranted here for that separate reviewer-publication failure; I did not rerun or modify the reviewer workflow.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Regarding the Ponytail Reviewer notice: no source change is needed because it reports no actionable finding. Its completion status is not a substitute for focused validation of the requested fixes.

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

An unhandled rejection in the test mock can fail the test run, while production paths lose indeterminate markers, misstate required-check status, and omit pre-merge failure diagnostics.

3 open issues
What changed in this PR

Strengthens gh-aw’s merge safe output by distinguishing uncertain merge outcomes from confirmed failures and improving audit evidence. Optional CI and human-approval defaults remain unchanged.

Changes:

  • Adds one read-only reconciliation lookup after an unconfirmed merge response, without retrying the mutation.
  • Introduces shared indeterminate-outcome reporting and fixed manager diagnostics.
  • Adds versioned policy fingerprints, bounded gate outcomes, tests, and documentation.
File Description
docs/​src/​content/​docs/​specs/​safe-outputs-specification.md Defines reconciliation, uncertainty, and authorization-evidence requirements.
docs/​src/​content/​docs/​reference/​safe-outputs-pull-requests.md Explains merge outcomes, audit fields, and recovery guidance.
docs/​public/​schemas/​unified-session.schema.json Allows the indeterminate operation-outcome marker.
actions/​setup/​js/​unified_session_render.cjs Displays operation uncertainty in session outcomes.
actions/​setup/​js/​types/​unified_session.d.ts Types the shared operation-outcome field.
actions/​setup/​js/​types/​merge-pull-request.type-test.ts Checks generic and merge-specific indeterminate result types.
actions/​setup/​js/​types/​handler-factory.d.ts Exports indeterminate handler-result contracts.
actions/​setup/​js/​safe_output_summary.test.cjs Covers uncertain outcomes and reconciled-success wording.
actions/​setup/​js/​safe_output_summary.cjs Adds uncertainty warnings and reconciliation explanations.
actions/​setup/​js/​safe_output_outcomes.test.cjs Covers marker serialization and session propagation.
actions/​setup/​js/​safe_output_outcomes.cjs Preserves allowlisted uncertainty metadata.
actions/​setup/​js/​safe_output_manifest.test.cjs Tests authorization-evidence validation and minimization.
actions/​setup/​js/​safe_output_manifest.cjs Persists authorization evidence and uncertain merge states.
actions/​setup/​js/​safe_output_handler_manager.test.cjs Covers fixed diagnostics, initialization failures, and uncertain results.
actions/​setup/​js/​safe_output_handler_manager.cjs Minimizes merge diagnostics and projects uncertain failures.
actions/​setup/​js/​merge_pull_request.test.cjs Covers reconciliation, policy fingerprints, and gate outcomes.
actions/​setup/​js/​merge_pull_request.cjs Integrates reconciliation and authorization-evidence tracking.
actions/​setup/​js/​merge_pull_request_evidence.cjs Implements policy hashing and read-only reconciliation.
.changeset/​merge-rai-outcome-evidence.md Adds the patch release note.

Review effort: Max (dynamic)

Comment thread actions/setup/js/merge_pull_request.cjs Resolved
Comment thread actions/setup/js/merge_pull_request.cjs Resolved
@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. Fix failing check push_ledger_changes (FAILURE): Check run.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "cdb59014abd9a2aa8fabb094b55e5abd6940a8d6",
  "kind": "requested",
  "schema_version": "1",
  "state": "bbf24494e87ad5a612e640a6655236da87e2b8da1f817d6dfcbc0732217a8988",
  "work": [
    "2ec1c55a56c3bbc3d439b0f0d819e0f964a9c8ea5c8bbe45cc9676c7e7802a18"
  ],
  "workflow": "pr-sous-chef"
}

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

Copilot AI commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@copilot

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

Merged main and fixed the ledger job to run only when safe_outputs succeeded, preventing a missing transaction artifact from failing the run when safe outputs were skipped. The regression test and repository gate pass.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

@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. Fix failing check impacted-go-tests (FAILURE): Check run.
  3. Fix failing check JS Tests (shard 5/8) (FAILURE): Check run.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "1e6d697d5c8d69272d3d8628bba0333dbdc840bc",
  "kind": "requested",
  "schema_version": "1",
  "state": "bf29d9b611725b00ab3b1fa406e541382ecc2029794ba5c9d70d0407c52e8a7e",
  "work": [
    "42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac",
    "78cff96338665a216aed174395db53962090e0167d19046c48b8353c0696ba8f"
  ],
  "workflow": "pr-sous-chef"
}

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

pelikhan and others added 2 commits November 13, 2026 08:24
Preserve the success-only ledger persistence prerequisite and regenerate workflow conflicts from merged sources.

Co-authored-by: Copilot App <[email protected]>
@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reviewed this earlier response: it requests no additional change; the original skills-review findings were already fixed and resolved, and the three newer Copilot findings are addressed separately.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reviewed this earlier response: no further change is requested, and the reviewer ledger-publication issue remains distinct from this PR's merge-output fixes.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reviewed this earlier response: it contains no additional test request; the new concrete findings have focused regression coverage.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reviewed this earlier response: no additional design or ADR change is requested, and completion notices are still not treated as maintainer approval.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reviewed this earlier response: it requests no additional source change; a reviewer publication failure is not evidence of a delivered specification finding.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reviewed this earlier response: no additional action is requested; the current fixes were validated directly rather than relying on reviewer completion status.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Addressed the branch-update and ledger follow-up: merged the latest origin/main, resolved the ledger condition conflict while preserving the success-only safe-output prerequisite, and regenerated workflow locks. Build, all 367 workflow compilations, focused ledger/compiler checks, and JavaScript regressions passed; no workflow dispatch or PR merge was performed.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Verified and preserved the earlier ledger fix while merging the two newer base commits. The resolved job still requires safe_outputs success, and both comment-backed and other ledger configuration tests enforce that condition.

Copilot AI commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

The branch already includes the current main through merge commit 75f9295; its second parent matches the PR base SHA, and there are no unmerged paths.

@pelikhan
pelikhan merged commit 4716fe1 into main Nov 13, 2026
67 checks passed
@pelikhan
pelikhan deleted the pelikhan/merge-output-rai-review branch November 13, 2026 16:43
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.0

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