Treat the oversized-review label as an explicit review request so a
maintainer can retry a failed review without waiting for another CI
completion or classification-state change.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Allow maintainers to retain an oversized-review opt-in without using
broad force mode.
Keep every review gate except the size exclusion, and rerun normal
classification and review on later pushes.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run protocol and skeptical reviews with Sonnet at high effort to reduce
model cost while retaining deliberate analysis.
Document the explicit model and effort configuration so operators can
verify the cost profile.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Give the skeptical review stage bounded PR descriptions and human
follow-up comments so it can evaluate preparatory changes against their
stated downstream use.
Keep the context tied to the reviewed head and treat it as untrusted
model evidence.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reject pull requests that remove `test = false` or `doctest = false`
from Cargo targets so tests remain centralized in the testsuite crates.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Classify pull requests by the larger changed-line or touched-file
bucket. Add `size/XXL` and reserve split guidance and review exclusion
for it.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Build every LLM evidence bundle from the merge base of the resolved pull
request base and head instead of the current `master` merge base. This
keeps model-visible paths aligned with GitHub's trusted pull request
file list when histories diverge without admitting base-only changes.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Legitimacy classifications are audit events, but later classifier runs
could delete the explanatory comment and replace the risk state.
Publish SHA-bound records through a persistent audit-comment path, add a
sticky triage label, and block automated review until a maintainer
clears it. Keep duplicate and XL notices on the transient reconciliation
path.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Model output is schema-bound, never reused as instructions, and escaped
before publication. Remove brittle prompt-injection keyword matching so
legitimate protocol requirements do not invalidate otherwise valid
review output.
Clarify commit conventions so fixes to CI, workflows, and automation use
`ci` rather than `fix`.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Attribute skipped reviews to the gate or contributor history so policy
decisions remain successful without hiding their blocker.
Notice transcript recovery after failed model steps and log bounded
output metadata instead of complete structured payloads.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Enforce repository title, scope, breaking-change, and footer rules from
the trusted base branch without rerunning code CI for metadata edits.
Keep pull request metadata in the GitHub event file so shell parsing
never interprets its contents.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Publish located findings only as inline comments, while retaining
findings without a valid diff location in the top-level review body.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Claude action failures can suppress otherwise usable step outputs.
Recover validated results and resume IDs from its bounded transcript.
Failed steps no longer discard successful output or block retries.
Raise the classifier's initial budget from 8 to 10 turns.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Move the native MSTSC testing skill into the repository's .agents
convention so it loads with the other local agent skills.
Replace brittle certificate and trace assumptions with behavior grounded
in
the ActiveX implementation. Clarify credential modes, process targeting,
bounded liveness checks, and safe teardown.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Group CI completion runs by their source commit so stale results cannot
cancel automation for a newer pull request head. Report interrupted
model calls as cancelled instead of treating missing output as
malformed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Rename the review orchestrator to the code-review entrypoint so GitHub
Copilot code review is more likely to load it automatically.
Use Microsoft Learn MCP as the protocol specification fallback when the
local windows-protocols skill is unavailable.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace the manual CI-only bypass with a workflow_dispatch force
mode. Forced classifier and reviewer runs bypass policy, quota, cache,
and eligibility gates while keeping head, output, protocol, and
stale-write validation intact.
Keep automatic routes unchanged. Forced classifications no longer start
reviews, and forced same-head reviews use run-specific publication
markers so distinct requests publish without duplicating reruns.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Document the automated review pipeline, failure recovery, trust
boundaries, labels, and routing so maintainers can operate it
consistently.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Prevent Claude Code Action artifacts from breaking the trusted Node
validators that process model output.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Cancelled workflow runs have no classifier result, not an unknown risk
assessment. Skip state resolution and writes after cancellation while
preserving the fallback for completed classifier failures.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resume each heavy review session once when its output is missing or
invalid. Validate selected output again before publication.
Report exhausted attempts with a neutral SHA-bound check without
advancing the AI review count. Preserve completed checks when an
ineligible review-route event cannot retrieve PR evidence.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Separate workflow-specific input and output contracts from reusable
review methodology. Inject trusted prompt files for each LLM pass and
stage the shared reviewer skills from `.agents/skills`.
The protocol reviewer skill now owns specification discovery and review
methodology, including optional use of `windows-protocols`; the workflow
prompts only describe trusted pipeline inputs and schema-bound outputs.
A regression test enforces this boundary.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Shared skills need a repeatable way to stay aligned with their upstream
repositories without creating unnecessary pull requests.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
A valid classifier result for PR #1564 was discarded because structured
output represented an empty string as the literal text `""`. That left
the PR at `risk/unknown` and hid the concrete validation failure from
maintainers.
This change canonicalizes that exact empty-string artifact in the shared
text normalizer used by classifier, protocol-analysis, and reviewer
outputs. Required prose still fails closed, while optional empty fields
normalize consistently. Classification failures now publish a neutral
SHA-bound `AI classification` check containing the precise validator or
prerequisite reason, without opening the automated review gate.
Regression coverage includes the PR #1564 payload, reviewer and protocol
text behavior, and neutral diagnostic check publication.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
`devolutionsbot` release-plz pull requests are reported as user
accounts, so they could enter PR classification and review automation.
Treat that account as a bot explicitly, alongside standard GitHub bot
identities.
Adds regression coverage for the user-typed release bot and documents
the exclusion.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Protocol-related pull requests are already identified for specialized
review, but that classification is not visible as a durable PR label.
Adds `kind/protocol` as a managed classifier output. It is applied when
`protocol_related` is true and removed after a later classification no
longer finds protocol impact. The label manifest now records the
supplied description, and automation coverage verifies both transitions.
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Octokit's pagination plugin normalizes check-run responses into page
arrays, so the PR automation writer crashed while trying to read a
nested `check_runs` property.
Consume the normalized arrays directly and add regression coverage that
verifies multi-page results select the newest matching check run.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Recent PR automation runs calculated deterministic labels correctly but
discarded their structured output, leaving PRs with only
`maintainer-required` and `risk/unknown`. `actions/github-script` owns
its `result` output and overwrote the workflow's custom value.
Use distinct structured output names for deterministic analysis, quota,
semver, and contributor history so the normalized state receives every
signal. Regression coverage verifies that all deterministic labels exist
in the bootstrap catalog and that a small `.github/**` change receives
`scope/tooling` and `size/XS`.
**Validation:** `node --test .github/pr-automation/automation.test.js`
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Claude rejects structured-output tool schemas that use a top-level
`allOf`, which prevented PR classification from running. Remove those
top-level conditional constraints from the classifier and both reviewer
schemas; the existing runtime validators continue to enforce the same
cross-field invariants.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Fix the isolated `cargo-semver-checks` invocation running as `nobody` by
resolving the active Rust toolchain, granting traversal only through the
required rustup parent directories, and granting read/execute access
only to that toolchain. The untrusted checkout and isolated Cargo state
remain owned by `nobody`.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Fixes the pull_request_target semver gate by using an isolated
runner-temp workspace and direct Rust toolchain binaries for the
unprivileged
obody process. This avoids the runner-owned working-directory and Rustup
permission failures in the labeler workflow.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
`cargo-semver-checks` could be unavailable while the public API
compatibility job still passed, hiding real API breaks such as PR #1530.
Install the checked binary in a run-scoped directory accessible to the
unprivileged analysis user, and make setup or any unexpected semver exit
status fail the job. Only cargo-semver-checks' documented results remain
accepted: `0` for compatible and `100` for an incompatibility.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The classifier can fail before producing structured output while the
Claude action suppresses the underlying provider error. This makes
recurring failures indistinguishable from malformed model output.
Adds a failure-only diagnostic after the classifier action that reads
its preserved execution result and logs bounded, redacted result
metadata and provider error strings. Full action output remains
disabled, so prompts, tool calls, and untrusted PR evidence are not
exposed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
### Motivation
- Prevent a malicious forked pull request from creating symlinks in the
`pr-head` checkout that could be followed by filesystem-reading LLM
tooling and disclose runner-local secrets such as API keys.
### Description
- Remove all symbolic links in the untrusted checkout by running `find
pr-head -type l -delete` immediately after checking out the head in
`.github/pr-automation/fetch-pr-evidence.sh`.
- Document the symlink-sanitization security boundary in
`.github/PR_AUTOMATION.md` while preserving symlink changes in the
generated diff evidence.
### Testing
- Ran `bash -n .github/pr-automation/fetch-pr-evidence.sh` which
succeeded.
- Ran `git diff --check` which reported no issues.
- Ran `node --test .github/pr-automation/automation.test.js` and all 34
tests passed.
- Executed an automated end-to-end malicious-symlink checkout test that
verified `pr-head/leak` symlink is removed while the change still
appears in `pr-evidence/changed-files.txt`.
- Attempted `cargo xtask check typos -v` but it could not run because
`typos-cli` is not installed in the environment.
------
[Codex
Task](https://chatgpt.com/codex/cloud/tasks/task_b_6a70cce561308329b74fd5dc01e146ec)
## Summary
- remove the unsupported Draft 2020-12 declaration from AI
structured-output schemas
- let the Claude action SDK use its supported default schema dialect for
classifier, protocol reviewer, and reviewer jobs
## Testing
- `node --test .github/pr-automation/automation.test.js`
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
## Why
Pull request automation spans multiple jobs and was difficult to
diagnose when a label, gate, or LLM stage produced an unexpected result.
## What changed
- Emit structured logs for PR resolution, gates, deterministic analysis,
normalized states, and final write decisions.
- Log the complete schema-bound output and outcome from each LLM stage.
- Record all upstream job outcomes in the final write trace so skipped
routes are visible.
- Document the trace and its untrusted-output handling.
## Notes
LLM output is logged through `core.info`, so untrusted model text is not
interpreted as a GitHub Actions command.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Introduce a staged pull request automation pipeline that labels changes,
gates on green CI, and runs protocol-aware and skeptical reviews.
Deterministic analysis assigns size, area, and semver signals. A cheap
classifier (sonnet, low effort) proposes labels, protocol relevance, and
a risk level; heavy reviewers (opus) run only behind an edge-triggered
gate that requires trusted classification state and a green CI run.
Risk encodes required human scrutiny: a cargo-semver-checks
incompatibility forces high, a classifier-only breaking signal keeps its
medium or high judgement and normalizes an incoherent low to medium.
Protocol-related changes are always reviewed regardless of risk; all
other gates still apply.
Reviews of size/XL pull requests are skipped deterministically, with
guidance to split the change using GitHub stacked pull requests. The
guidance is withdrawn once the pull request drops below the threshold.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Rename prebuilt binary assets to friendly os-arch names (e.g.
ironrdp-agent-<version>-linux-x64.tar.gz), dropping the Rust target
triple from the filename, and make the triple authoritative by passing
--target to cargo so a runner/target mismatch fails loudly instead of
silently mislabeling an asset.
Move the detailed download/verify instructions out of the READMEs and
into the GitHub Release body, generated by the workflow so they can
never drift from the actual assets. The block is injected idempotently
between sentinel markers, so re-running the workflow (the recovery path
for a failed matrix leg) replaces it in place rather than appending. The
READMEs are demoted to short evergreen pointers to the Releases page.
Extract the duplicated native-dependency install steps (Linux ALSA
headers, Windows NASM) into a shared .github/actions/install-build-deps
composite action reused by ci.yml and release-binaries.yml.