Skip to content

fix(workflows): report PR content integrity blockers accurately - #69866

Merged
pelikhan merged 1 commit into
mainfrom
pelikhan-pr-integrity-alignment
Oct 18, 2026
Merged

pelikhan merged 1 commit into
mainfrom
pelikhan-pr-integrity-alignment

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

Summary

Mitigates the Daily PR Code Quality Review reporting failure in #69862 without weakening integrity protections. This is a reporting/fail-fast fix, not a restoration of meaningful diff review.

  • Require min-integrity: approved explicitly and bound discovery to five open-PR metadata records.
  • Stop content probes after the first integrity denial; distinguish Reviewed, Blocked, Unavailable, and Not attempted. Unattempted PRs are never reported as individually denied.
  • Publish coverage even when no diff can be reviewed, use N/A rather than clean quality signals for unread content, and retain report_incomplete whenever coverage is incomplete.
  • Add nine focused source/configuration contract regressions and regenerate the lock using the repository compiler.

Root cause and unresolved dependency

Run 39101615256 listed PR metadata but could not read diff/file content under approved integrity. Actual attempts: get_diff for #69848/#69831 and get_files for #69813. #69772/#69586 were not attempted.

The pinned MCPG v0.4.35 content-labeling boundary assigns none integrity to pull_request_read diff/file content independently of PR metadata trust. Selecting member-authored or same-repository PRs, or inventing approval labels, cannot resolve this. Meaningful diff review remains unavailable until the gateway provides content-specific trust compatible with approved. No alternate transport, trust mutation, integrity relaxation, live run, or membership/approval change is included.

Validation

  • python3 scripts/test_daily_pr_review_integrity.py: 9 passed.
  • make recompile: 344/344 workflows compiled; only this workflow's generated lock changed.
  • ./gh-aw compile daily-pr-review-cursor --dry-run --schedule-seed github/gh-aw --no-check-update: passed, including native ShellCheck; existing low-severity experimental-feature notice remains.
  • PATH="/opt/homebrew/bin:$PATH" make agent-report-progress: passed; no changed Go files, so impacted Go tests were skipped; all workflow locks are in sync.
  • Native offline zizmor: identical baseline/current findings (six low severity, none medium/high). Native actionlint is not a clean pass: baseline/current both have the same three existing unsupported concurrency.queue syntax diagnostics.
  • Final source, normal/dry-run locks, and regression test received read-only security review: all ten safety properties YES; no confirmed vulnerabilities. MCPG/AWF pins and detection-redaction gates are unchanged. An initial diagnostic from an older installed compiler was discarded; only the repository compiler's normal lock is committed.

Authored-source security overview

Markdown source Before → after Security impact
daily-pr-review-cursor.md:25–28 Automatic threshold → explicit approved. Retains the integrity boundary; no authored approval labels or trusted users.
daily-pr-review-cursor.md:62–102 Review every discovered PR → fail fast after content filtering and record remaining PRs as unattempted. Prevents repeated denied probes; forbids alternate retrieval and PR-code execution.
daily-pr-review-cursor.md:117–143 Review-only reporting → coverage-qualified report with retained incomplete status. Unread code cannot receive a clean quality signal; existing one-issue output, permissions, and expiry are unchanged.

Keep approved integrity, stop after the first content denial, and distinguish reviewed, blocked, unavailable, and unattempted PRs. Preserve incomplete status and explicitly retain the gateway content-trust dependency.

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

Copy link
Copy Markdown
Contributor

Unable to retrieve PR metadata.

Generated by ✅ Contribution Check · copilot · auto · 33 AIC · ⌖ 0.639 AIC · ⊞ 8.7K · ◷

@pelikhan
pelikhan marked this pull request as ready for review October 18, 2026 15:08
Copilot AI max review requested due to automatic review settings October 18, 2026 15:08
@pelikhan
pelikhan merged commit da50dbb into main Oct 18, 2026
50 checks passed
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Oct 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 from Ponytail Reviewer · gpt56 · 5.79 AIC · ⌖ 5.29 AIC · ⊞ 14.6K · ◷

Generated by Ponytail Reviewer for #69866

@github-actions

github-actions Bot commented Oct 18, 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 🏗️ · opus55 · 11.1 AIC · ⌖ 31.9 AIC · ◇ 13.3 AIC · ⊞ 1.9K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

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

Generated from Test Quality Sentinel · haiku45 · 13.2 AIC · ⌖ 11.2 AIC · ◇ 2.58 AIC · ⊞ 9.2K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-10-18T15:10:30Z
review_event: REQUEST_CHANGES
top_themes:
  - brittle MCP tool contract wording
  - discovery can fail before coverage reporting
files_reviewed:
  - .github/workflows/daily-pr-review-cursor.md
  - .github/workflows/daily-pr-review-cursor.lock.yml
  - scripts/test_daily_pr_review_integrity.py
comment_count: 1

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 51.1 AIC · ⌖ 6.01 AIC · ⊞ 15.9K · ◷
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.

Verdict

The integrity/coverage direction is better, but one of the new instructions is still brittle enough to break discovery before the workflow reaches the reporting logic.

Blocking theme
  • The prompt now reads like it expects list_pull_requests to support response field projection. If the agent turns that into extra request parameters, the run fails for a tool-contract reason instead of producing the bounded coverage report this PR is trying to guarantee.

Static review only; I did not execute the workflow.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 51.1 AIC · ⌖ 6.01 AIC · ⊞ 15.9K
Comment /review to run again

Use GitHub MCP tools to list open pull requests from `${{ github.repository }}` with at most
`perPage: 5`, ordered by `created_at` descending. Record:
Use GitHub MCP `list_pull_requests` for `${{ github.repository }}` with `state: open`,
`sort: created`, `direction: desc`, and `perPage: 5`. Request only metadata fields:

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 wording reads like an instruction to pass a field-selection argument to list_pull_requests, which can make discovery fail before the workflow even reaches the new coverage/reporting logic.

💡 Why this is risky and how to fix it

The MCP call contract here was previously just sort/pagination. Adding Request only metadata fields is easy for an agent to interpret as "ask the tool for a reduced schema", but the workflow does not establish that list_pull_requests supports field projection. If the agent tries to send unsupported selector parameters, the run degrades into an immediate tool-call error and reports incomplete coverage for the wrong reason.

Please rephrase this to operate on the response instead of on the request, for example: "From the returned metadata, record only number, title, user, and html_url." That preserves the bounded-discovery rule without steering the agent toward an invalid API shape.

@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 (root-cause fix of reporting failure in #69862) and /grill-with-docs (new concepts: four coverage states, integrity-content boundary). No blocking issues found.

📋 Verification performed
  • Ran the new scripts/test_daily_pr_review_integrity.py against the actual committed PR content (the local working tree had unrelated uncommitted reverts that initially made it look failing — verified against git show HEAD:... instead): all 9 tests pass.
  • Confirmed min-integrity and guard-policies are real, supported compiler fields (pkg/workflow/cache_integrity.go, compiler_difc_proxy.go), not invented config.
  • Confirmed the pinned gh-aw-mcpg v0.4.35 reference in the prompt matches constants.DefaultMCPGatewayVersion in pkg/constants/version_constants.go — the stated content-labeling boundary claim is accurate, not stale.
  • Confirmed report_incomplete is auto-defaulted/built-in (pkg/workflow/imports.go, missing_issue_reporting.go), so the prompt correctly relies on it without a new frontmatter declaration.
  • The string-matching regression-test style (asserting exact prose fragments against the compiled prompt) follows existing precedent in scripts/test_model_routing_golden.py and scripts/test_super_linter_scope.py, consistent with repo conventions.
✅ Positive highlights
  • Clear separation of the four coverage states (Reviewed/Blocked/Unavailable/Not attempted) prevents the exact failure mode from run 39101615256 (treating unattempted PRs as denied).
  • Explicit prohibition on alternate transports (get_files, shell, local checkout, raw URLs, pre-fetched patches) after a denial closes an obvious workaround path.
  • PR body is transparent about the unresolved dependency (gateway content trust) rather than overclaiming the fix restores meaningful diff review.

Approving — no actionable issues identified on the high-impact files (daily-pr-review-cursor.md, the new test script, and the regenerated lock).

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 63.7 AIC · ⌖ 14.8 AIC · ⊞ 10.1K
Comment /matt to run again

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 compiled policy broadens repository access on visibility-check failures, and the new regression suite is not registered for automated validation.

2 open issues
What changed in this PR

Updates daily PR quality reporting for #69862 to distinguish integrity blockers from unattempted reviews. Meaningful diff review remains unavailable.

Changes:

  • Makes approved integrity explicit and bounds discovery to five PRs.
  • Stops after the first integrity denial and reports coverage accurately.
  • Adds nine contract checks and regenerates the workflow lock.
File Description
scripts/​test_daily_pr_review_integrity.py Adds integrity and coverage contract checks.
.github/​workflows/​daily-pr-review-cursor.md Defines bounded reads, coverage statuses, and incomplete reporting.
.github/​workflows/​daily-pr-review-cursor.lock.yml Regenerates executable workflow configuration.

Review effort: Max

github:
mode: local
toolsets: [repos, pull_requests]
min-integrity: approved
Comment on lines +105 to +106
if __name__ == "__main__":
unittest.main()
Copilot AI pushed a commit that referenced this pull request Oct 18, 2026
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.92.6

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.

2 participants