Skip to content

Add scheduled holistic reviews for all PRs and path-specific review instructions#130339

Merged
jeffhandley merged 18 commits into
dotnet:mainfrom
jeffhandley:jeffhandley/code-review-orchestration
Jul 19, 2026
Merged

Add scheduled holistic reviews for all PRs and path-specific review instructions#130339
jeffhandley merged 18 commits into
dotnet:mainfrom
jeffhandley:jeffhandley/code-review-orchestration

Conversation

@jeffhandley

@jeffhandley jeffhandley commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

Reworks the repository's customized code-review automation into two complementary parts:

  1. A deterministic orchestrator plus a per-PR agentic workflow that replaces the previous pull_request-triggered code-review.md
  2. Path-specific review instructions broken out of the code-review skill so GitHub's built-in Copilot code review agent applies the same dotnet/runtime-specific rules.

The dispatched agentic workflow submits a single, cumulative "Holistic Review" per commit range rather than a stateless diff-only pass, and it is designed to run alongside — not replace — the built-in Copilot reviewer.

Behavior: draft, ready, and closed pull requests

  • Ready (non-draft), open PRs are polled on a 10-minute schedule; the orchestrator dispatches one worker run per PR whenever it is new or its head commit changed since the last durable review.
  • Draft PRs are excluded from the scheduled poll. They can still be reviewed on demand: holistic-review-orchestrator's workflow_dispatch accepts a comma-separated pr_numbers input ("including drafts and retry-limited review targets") that bypasses the draft filter for exactly the requested PRs, and an unchanged head with an existing durable review is not reviewed again.
  • Scheduled runs skip forks while manual runs remain available. The dispatch job runs for workflow_dispatch or when the repository is not a fork, preventing scheduled fork runs without blocking explicit manual dispatch.
  • Manual and scheduled dispatch share the exact same state, retry, and dedup logic — there is no separate manual code path to keep in sync.

Coexistence with the built-in Copilot code review agent

The Holistic Review worker and GitHub's built-in Copilot code review agent are fully independent; neither waits on, hides, or edits the other's output, and both remain visible on the PR alongside human reviews. The path-specific instruction files under .github/instructions/ are consumed natively by both: the Holistic Review skill explicitly loads them, and Copilot's built-in reviewer already applies any .instructions.md file whose applyTo glob matches the changed paths. Every Holistic Review ends with an explicit disclosure distinguishing it from the built-in review and linking back to the holistic-review.md workflow source.

Reviews are strictly additive: the worker's only two safe outputs are up to 10 inline create_pull_request_review_comment calls and exactly one submit_pull_request_review, whose event is restricted to COMMENT. It never submits APPROVE or REQUEST_CHANGES, and it never modifies, hides, or supersedes an earlier review or comment from this workflow, the built-in reviewer, or a human.

Architecture: deterministic orchestrator + gh-aw worker

  • holistic-review-orchestrator.yml is a conventional, deterministic GitHub Actions workflow — not an agentic workflow. Its top-level permissions: {} grants only actions: write / pull-requests: write inside its single job, and it does nothing but call the GitHub REST API to decide what to dispatch and to read/write one managed state comment per PR. It never checks out PR content and never runs a model, keeping it secure even though it processes untrusted PR metadata.
  • holistic-review.md is the gh-aw-compiled agentic worker (compiled to holistic-review.lock.yml with gh-aw v0.82.6, pinned via .github/aw/actions-lock.json to github/gh-aw-actions/setup@v0.82.6). The orchestrator dispatches it once per PR via the Actions API with the PR number, base ref, head SHA, the previously reviewed head and base SHA (when re-reviewing), a bounded review-history JSON blob, and a complete synthetic aw_context (run_id, repo, workflow_id, item_type, item_number) so gh-aw's safe-output layer has full pull-request context even though the triggering event is workflow_dispatch, not pull_request.
  • The orchestrator and worker communicate only through workflow_dispatch inputs at dispatch time and the worker's own submitted review afterward, which the orchestrator discovers by matching the run's display_title (Holistic Review #<PR> (<head SHA>)) and by recognizing gh-aw's automatic <!-- gh-aw-agentic-workflow: Holistic Review, ... workflow_id: holistic-review --> review-footer marker.

See github/gh-aw's documentation on compiled agentic workflows, safe outputs, and workflow_dispatch-based dispatch, and GitHub's own workflow_dispatch and triggering-a-workflow documentation, for background on the primitives this design builds on.

Why review state lives in a pull request comment

Each PR carries exactly one managed, orchestrator-owned issue comment holding a versioned (version: 5) JSON state object: the last dispatched and last reviewed (commit, base ref, base SHA) pairs, the ID of the worker run that produced the last recorded review, a bounded initial-plus-latest review-history array, and a bounded review_attempt_count. Comments were chosen over gh-aw's repo-memory/cache mechanisms because gh-aw v0.82.6 supports deterministic reads of repo-memory/comment-memory but not deterministic write-back of durable state from a dispatch-triggered workflow. A pull-requests: write-scoped comment is visible, auditable state that survives reruns, needs no contents: write, and is trivially inspectable by anyone reading the PR. Crucially, a submitted, marker-tagged worker review is the authoritative record of what has actually been reviewed — not the state comment; the comment only suppresses duplicate in-flight dispatches, and legacy comment formats (including a pre-existing machine-only JSON format and an older HTML-marker format) are recognized once and migrated to the current schema in place.

Retries and durable-review authority

A worker run that completes without submitting a review — a transient provider error, a threat-detection replacement, or a safe-output formatting failure — is never treated as "reviewed." The orchestrator only advances last_reviewed_* when it finds a matching, marker-tagged submitted review for the exact dispatched commit and base; otherwise it clears that dispatch record and redispatches the same target. Retries for the same (head, base) target are bounded at MAX_REVIEW_ATTEMPTS = 5; once exhausted, the PR is reported as retry-limited in the workflow step summary rather than dispatched indefinitely, and it can still be retried explicitly through the manual pr_numbers input. Because attempts are keyed by (head commit, base branch), a rebase, force-push, or base retarget resets the attempt counter for the new target instead of inheriting an unrelated failure count.

Review scope: holistic initial review vs. patch-differential incremental review

A trusted, deterministic pre-agent step — not the model — computes the review scope before the agent starts: it resolves the current merge base, computes a patch ID for the PR's cumulative diff, and (for re-reviews) computes the previous merge base, a previous patch ID, a git range-diff, and a raw patch diff, writing all of it to metadata.json plus range-diff.txt/patch-diff.txt for the agent to read.

  • Initial review: analyzes the complete current_merge_base..head range — the PR's actual base-to-head diff, not its head compared against the current state of the base branch.
  • Re-review (incremental): uses two distinct scopes. It re-reads the complete current base-to-head range only to refresh the cumulative Motivation/Approach/Summary assessment, explicitly comparing against the initial and most recent recorded reviews (retrieved by ID, not rediscovered from the general review list) and stating whether each is unchanged or changed and why. Detailed/actionable findings are restricted to the prepared range-diff/patch-diff between the previous and current cumulative patches — not a raw tree diff between the two head commits — so a rebase that pulls in unrelated upstream changes cannot manufacture new findings. If the previous and current heads are identical but the merge base changed (a pure base retarget), the same prepared patch comparison is authoritative: only code whose inclusion or semantics changed because of the retarget is reviewed, and unchanged portions of the PR patch are not rediscovered. If the patch truly has not changed, the worker still submits a COMMENT review recording that fact and the refreshed Assessment History, so every successful run leaves a durable record.

Model selection

The workflow does not hard-code a model. engine.model resolves from the workflow-specific HOLISTIC_REVIEW_MODEL Actions variable, allowing the model to be selected at environment, repository, or organization scope without editing or recompiling the workflow.

Security model

  • Least privilege throughout. The orchestrator's job-scoped permissions are actions: write / pull-requests: write only; the worker's top-level permissions are contents: read, issues: read, pull-requests: read, and its actual review/comment capability comes from gh-aw's safe-output layer rather than a broadly scoped token held by the agent.
  • GitHub reads go through the job-scoped, read-only token. tools.github.github-token is pinned to ${{ secrets.GITHUB_TOKEN }}, so the agent's gh/GitHub-proxy calls cannot be backed by a broader GH_AW_GITHUB_* secret, and the declared read-only permissions are actually authoritative.
  • PR content — including its own configuration files — is treated as untrusted input. The worker checks out the dispatched head commit, then removes and restores every agent-configuration path gh-aw v0.82.6 recognizes (the complete .github tree, every supported engine configuration directory, and all recognized root instruction files) from main before loading any guidance, because a plain checkout alone would leave PR-added files in those paths behind. PR versions of those paths — along with PR descriptions, comments, source comments, test data, and other PR-controlled text — are treated strictly as untrusted review content, never as instructions; changed files under a trusted overlay path are still reviewed from an explicit commit read or the PR diff, never from the restored worktree copy.
  • A narrow, read-only shell allowlist with no build/test/execute capability. The worker cannot run builds or tests, restore or install dependencies, execute PR-provided scripts or binaries, or make direct outbound HTTP requests; there is no web-fetch tool. The allowlist further excludes general-purpose process-launch surfaces (awk, find, xargs, rg, sed, sort, gh) so an allowlisted command cannot spawn another process or modify the workspace; the prompt separately forbids Git/GitHub CLI aliases, hooks, pagers, external helpers, credential helpers, and other child-process-spawning options, and treats the remaining compiler-injected git/gh/sort surface honestly as defense in depth rather than a strict sandbox.
  • Egress is narrowed and routed through a CLI-side proxy. network.allowed is limited to defaults (no dotnet feed access, since builds/restores are disallowed), and tools.cli-proxy: true alongside tools.github.mode: gh-proxy ensures no native MCP endpoints remain mounted in the CLI — only the CLI-mounted safeoutputs server — avoiding a firewall interaction where native endpoints bypassed the intended proxy path and were denied.
  • Both safe outputs are bound to the exact dispatched PR, not a wildcard or an agent-supplied target: target: ${{ github.event.inputs.pr_number }} on both create-pull-request-review-comment and submit-pull-request-review. A review cannot be redirected to any PR other than the one the orchestrator dispatched.
  • Agent checkouts don't carry credentials. Because gh-aw strips Git credentials before the agent runs, pre-agent-steps perform a token-scoped fetch of exactly the commits the review needs (current head, prior head, and prior base) while a token is still available, so the agent operates only on local Git objects afterward, including across force-pushes and retargets.

Shared review instructions

The review rules that used to live entirely in .github/skills/code-review/SKILL.md are split into path-scoped .github/instructions/*.instructions.md files, each with an applyTo glob, so they're consumed identically by the Holistic Review skill and by GitHub's built-in Copilot code review agent:

  • review-all-src.instructions.md (src/**) — reviewer mindset, the Holistic PR Assessment (motivation, evidence, approach, cost-benefit, scope, risk, codebase fit), PR hygiene, code reuse, established conventions (including preserving pre-existing alphabetical ordering in modified .csproj item groups and similar lists, flagging only ordering regressions the PR introduces, not pre-existing unsorted entries), and documentation/comment rules.
  • review-csharp.instructions.md (**/*.cs) — C#-specific error handling, thread safety, security, correctness, performance/allocation, API design, and style rules.
  • review-native.instructions.md (C/C++/asm globs) — JIT-specific correctness, C++ style, VM/interpreter conventions, native size/offset overflow guarding, platform defines, and P/Invoke marshalling.
  • review-all-tests.instructions.md (test globs) — testing conventions and regression-test expectations.
  • review-core-runtime.instructions.md (src/coreclr/**,src/native/corehost/**) — CoreCLR/compiler/host-specific correctness, collectibility, allocation, and PR-prerequisite guidance that should not load for ordinary managed-library changes.

The broad C#, native, and test files explicitly state that PR-level gates are preparation guidance during authoring or local experimentation, not reasons to block exploratory work unless review is requested. SKILL.md retains the review process and points at these files for substantive guidance. Its area-agent discovery runs only when sub-agent tooling and matching agents actually exist; an instruction file does not imply an agent. The dispatched worker has no such tooling and explicitly skips agent discovery and multi-model fan-out.

Testing: multi-iteration time-travel replay simulation

Because this changes how and when reviews are triggered — not just what they say — it was validated by replaying real PR event timelines (opening commit, subsequent commits, and human review feedback) against the candidate workflow tree in a disposable simulation repository, resetting all simulation PRs and state between rounds and starting the next round only from a clean, freshly deployed tree.


Note

This PR description was drafted with the assistance of GitHub Copilot.

jeffhandley and others added 5 commits July 8, 2026 03:56
Move the general, language-agnostic review criteria (reviewer mindset, Holistic PR Assessment,
PR hygiene, codebase consistency, and documentation) verbatim out of
.github/skills/code-review/SKILL.md into a path-specific instruction file scoped to src/**,
and point the skill at the new file.

Copilot agents -- including the Copilot code review agent -- automatically respect
.github/instructions/**/*.instructions.md files whose applyTo glob matches the changed files, so
these rules now apply to native Copilot reviews in addition to the code-review skill.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the C# rules (error handling, thread safety, security, correctness patterns,
performance/allocations, API design, and code style) verbatim out of the skill into a file
scoped to **/*.cs, and add the loading reference.

Copilot agents -- including the Copilot code review agent -- automatically respect
.github/instructions/**/*.instructions.md files whose applyTo glob matches the changed files, so
these C# rules now apply to native Copilot reviews of C# files in addition to the code-review
skill.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the native rules (JIT-specific correctness, C++ style, runtime/VM patterns, native
performance, platform defines, and P/Invoke marshalling) verbatim out of the skill into a file
scoped to the C/C++/asm globs, and add the loading reference.

Copilot agents -- including the Copilot code review agent -- automatically respect
.github/instructions/**/*.instructions.md files whose applyTo glob matches the changed files, so
these native rules now apply to native Copilot reviews of native files in addition to the
code-review skill.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the testing rules verbatim out of the skill into a file scoped to the test globs, and add
the loading reference. The skill now contains only the review process and points to the
path-specific instruction files.

Copilot agents -- including the Copilot code review agent -- automatically respect
.github/instructions/**/*.instructions.md files whose applyTo glob matches the changed files, so
these test rules now apply to native Copilot reviews of test files in addition to the
code-review skill.

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

- Add code-review-orchestrator.md: on a 10-minute schedule (and workflow_dispatch) it polls
  open PRs, computes the new/updated set deterministically from a reviewed-SHA actions/cache,
  and dispatches the code-review workflow per PR via the dispatch-workflow safe output.
- Rework code-review.md from a pull_request-triggered workflow into a per-PR worker
  (workflow_dispatch) dispatched by the orchestrator; it reviews one PR using the code-review
  skill and posts a single holistic comment.
- Both import the Copilot PAT pool; update .github/aw/actions-lock.json for the pinned actions
  the new locks use.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

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.

Pull request overview

This PR restructures the repo’s customized Copilot-based review automation into a scheduled “orchestrator + per-PR worker” model and moves detailed review guidance into path-scoped .github/instructions/*.instructions.md files so both the custom workflow and GitHub’s built-in Copilot code review can share the same rule source.

Changes:

  • Converts code-review into a workflow_dispatch per-PR worker and adds a scheduled orchestrator that deterministically selects PRs needing (re)review and dispatches the worker.
  • Splits language-/area-specific review guidance out of the code-review skill into path-scoped instruction files under .github/instructions/.
  • Updates the Agentic Workflows action pinning to include actions/cache/*@v4 to support the new orchestrator’s state caching.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/code-review.md Reworks the workflow into a per-PR workflow_dispatch worker with updated safe-outputs / concurrency and PAT-pool handling.
.github/workflows/code-review.lock.yml Regenerated lockfile reflecting the worker model and updated tool/container configuration.
.github/workflows/code-review-orchestrator.md New scheduled orchestrator that computes a deterministic dispatch list and fans out worker dispatches.
.github/workflows/code-review-orchestrator.lock.yml New lockfile for the orchestrator workflow.
.github/skills/code-review/SKILL.md Slims the skill to process + points at path-scoped instruction files; updates output header text.
.github/instructions/review-all-src.instructions.md New “general” source review criteria for src/**.
.github/instructions/review-csharp.instructions.md New C#-specific review criteria (**/*.cs).
.github/instructions/review-native.instructions.md New native/interop review criteria (C/C++/asm globs).
.github/instructions/review-all-tests.instructions.md New test review criteria (tests globs).
.github/aw/actions-lock.json Adds pinned SHAs for actions/cache/restore@v4 and actions/cache/save@v4.

Comment thread .github/skills/code-review/SKILL.md Outdated
@jeffhandley jeffhandley added area-skills Agent Skills and removed area-Infrastructure labels Jul 8, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 09:00

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.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/code-review.md Outdated
Comment thread .github/skills/code-review/SKILL.md Outdated
Comment thread .github/instructions/review-native.instructions.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 09:17

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.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/code-review.md Outdated
Comment thread .github/skills/code-review/SKILL.md Outdated
Comment thread .github/workflows/code-review-orchestrator.md Outdated
jeffhandley and others added 2 commits July 8, 2026 05:29
# Conflicts:
#	.github/workflows/code-review.lock.yml
#	.github/workflows/code-review.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 09:35
…hestration' into jeffhandley/code-review-orchestration

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.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/code-review.md Outdated
Comment thread .github/workflows/code-review.md Outdated
Copilot AI review requested due to automatic review settings July 8, 2026 09:44
# Conflicts:
#	.github/skills/code-review/SKILL.md
Regenerate the PR-owned workflows with the pinned v0.82.6 compiler after merging current main.

Acquisition command:
gh extension install github/gh-aw --pin v0.82.6

Repository-wide compile command:
gh aw compile --validate --schedule-seed dotnet/runtime

Targeted commands used for this commit:
gh aw compile code-review-orchestrator --validate --schedule-seed dotnet/runtime
gh aw compile code-review --validate --schedule-seed dotnet/runtime

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

Copilot-Session: 9b64a66b-759f-412a-80ed-9a73f02b17bd
Comment thread .github/instructions/review-csharp.instructions.md
Consolidate the deterministic scheduled orchestrator and COMMENT-only worker reviews with trusted main-branch agent configuration, schema-v5 comment-backed state, exact run provenance, bounded retries, and draft/manual targeting semantics.

Bind reviews to the trusted numeric dispatch input, precompute cumulative patch scope safely across rebases and retargeting, route tools through the firewall CLI and gh proxies, honor CODE_REVIEW_WORKFLOW_MODEL, and retry reviews replaced by threat-detection caution banners.

Regenerate holistic-review.lock.yml with gh-aw v0.82.6 and --schedule-seed dotnet/runtime.

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

Copilot-Session: 9b64a66b-759f-412a-80ed-9a73f02b17bd
Consolidate the tannergooding feedback across the split review instructions and code-review skill, including authoring-safe PR gates, precise overflow guidance, modern test conventions, and native-specific assertion and GC-EE interface rules.

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

Copilot-Session: 9b64a66b-759f-412a-80ed-9a73f02b17bd
Call out alphabetized csproj item groups and limit findings to ordering regressions introduced by the pull request.

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

Copilot-Session: 9b64a66b-759f-412a-80ed-9a73f02b17bd
Copilot AI review requested due to automatic review settings July 19, 2026 00:23
@jeffhandley jeffhandley changed the title Add a scheduled code-review orchestrator and path-specific review instructions Add scheduled holistic reviews for all PRs and path-specific review instructions Jul 19, 2026

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.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/holistic-review-orchestrator.yml
Comment thread .github/workflows/holistic-review-orchestrator.yml

@tannergooding tannergooding left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few structural notes on the instructions/skill/worker split, focused on where content is applied vs. where it should live. Individual points inline.

Note

These review comments were drafted with the assistance of GitHub Copilot.

Comment thread .github/instructions/review-csharp.instructions.md
Comment thread .github/instructions/review-csharp.instructions.md Outdated
Comment thread .github/skills/code-review/SKILL.md Outdated
Comment thread .github/workflows/holistic-review.md
@tannergooding

Copy link
Copy Markdown
Member

Not for this PR -- flagging as potential future work since it's pre-existing in main and out of scope here.

.github/skills/code-review/SKILL.md bakes in transient, environment-specific guidance that will age poorly in a durable, source-controlled skill:

  • The Multi-Model Review section hard-codes Do not use gpt-5.4 -- known reliability issues causing sub-agent timeouts in >90% of affected runs. A specific model version + failure-rate belongs in config/ops state, not a checked-in review skill; it's stale the moment that model is fixed or retired.
  • More broadly, Step 2: Discover Area-Specific Agents and Multi-Model Review both assume an interactive environment that can fan out sub-agents. As this PR now routes the dispatched single-engine worker through the same skill (see my inline note on holistic-review.md), it's worth a follow-up to either data-drive the model blocklist or gate those sections on sub-agent support so both consumers read cleanly.

Note

This comment was drafted with the assistance of GitHub Copilot.

@tannergooding tannergooding left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM and the remaining nits are mostly pre-existing, so I'm not going to block on it. We can handle it in a follow up after this big refactoring

Guard scheduled fork runs and keep dispatched reviews within the worker's available tooling. Scope core-runtime review criteria and clarify authoring and agent-discovery guidance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0d4ecd6f-4602-4e1f-9485-e9ac231cdda4
Copilot AI review requested due to automatic review settings July 19, 2026 02:27

@jeffhandley jeffhandley left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @T-Gro, @tannergooding, and @PranavSenthilnathan — I’ve incorporated the in-scope feedback and replied inline on each thread.

The final design now:

  • uses a conventional deterministic orchestrator, with scheduled runs skipped on forks while manual dispatch remains available;
  • stores durable, retry-bounded state in one managed PR comment while treating submitted reviews as authoritative;
  • submits additive, non-blocking COMMENT reviews with line-anchored findings and never hides earlier feedback;
  • computes initial and incremental scope deterministically from cumulative PR patches, correctly handling rebases and base retargets;
  • restores trusted agent configuration from main, binds safe outputs to the dispatched PR, and narrows GitHub, network, and tool access;
  • splits review guidance into general, C#, native, test, and core-runtime scopes, with authoring caveats in the broad instruction files;
  • gates area-agent discovery on actual tooling and available agents, while the dispatched worker explicitly skips fan-out.

I validated the workflow with pinned gh-aw v0.82.6, deterministic recompilation, YAML and Bash syntax checks, and the multi-iteration simulation. The simulation also confirmed that pull-requests: write is sufficient for the managed PR state comment; issues: write is not required.

The model-specific reliability guidance called out in the follow-up comment remains intentionally deferred as separate work.

Note

This summary was drafted with GitHub Copilot on behalf of the PR author.

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.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated no new comments.

@jeffhandley
jeffhandley merged commit cb84c85 into dotnet:main Jul 19, 2026
24 checks passed
@jeffhandley
jeffhandley deleted the jeffhandley/code-review-orchestration branch July 19, 2026 02:48
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-skills Agent Skills

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants