Skip to content

Bound PR review inputs for native readers - #70058

Merged
PureWeen merged 6 commits into
mainfrom
pureween-fix-pr-review-transport
Oct 28, 2026
Merged

PureWeen merged 6 commits into
mainfrom
pureween-fix-pr-review-transport

Conversation

@PureWeen

@PureWeen PureWeen commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Bound PR review inputs for native readers

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Project frozen review inputs for reliable native reads

Description

This projects GitHub review data into a compact frozen bundle, removes duplicate files[].patch, externalizes multiline required text as integrity-checked .source files, and gives each routed guide a disjoint exact-file assignment. The latest replacement aligns worker consumption with the evaluator contract: workers trust producer/checker-validated assignment metadata, read every assigned non-source file to EOF through native view/read_file, never invoke bash, shell, or powershell, and use native search only beneath assigned frozen source roots.

The complete coordinator bundle, frozen target identities, independent adjudication, source roles, routing provenance, tamper/reuse checks, diff reconstruction, and explicit BLOCKED failures remain intact. This does not add trace parsing, a sandbox, worker receipts, generalized chunking, or a second live-read architecture; #70055 continues to own post-read native trace grading.

Stable bundle and worker contract
  • diff.patch is authoritative; projected files.json contains changed-file metadata without duplicate patches.
  • Pull/feedback/policy/exclusion bodies are inert .source files referenced by bundle-relative path, UTF-8 byte length, and SHA-256.
  • Each guides[].assignment.files[] entry is exactly { kind, path, utf8Bytes, sha256 }; assignment.sourceRoles[] names only assigned frozen source roles.
  • The coordinator supplies the trusted absolute bundle root, verbatim assignment, frozen target identities, and only sources[role].root mappings for assigned roles.
  • Workers do not recompute assignment lengths or hashes. They read each assigned non-source file to EOF with native view/read_file, paging with view_range or equivalent offset/limit until the final line; truncation is a required-input failure.
  • Workers never use bash, shell, or powershell. Native rg/grep/glob is permitted only beneath assigned frozen source roots.
  • Parent/shared bundle enumeration, sibling inference, unassigned paths, and intermediate output derived from those scopes remain prohibited.
  • Per-guide policies and exclusions are physically projected beneath disjoint required/guides/<guide-index>/... paths.
  • The hosted /review dispatch passes references rather than duplicated inline guide/policy/exclusion/diff/changed-file contents.
Compatibility and bounded unresolved behavior
  • The projected bundle shape changes under manifest v2. Acceptance is revision-bound by the exact producer SHA, so an older same-version bundle is rejected before shape validation; no independent in-repo compatibility consumer was found. Out-of-repo consumers are unknown.
  • The 2,048-byte serialized/required-text line limit is a conservative producer fail-closed bound derived from retained long-line native-reader failures, not a measured platform cutoff. At 2,048 bytes preparation succeeds; at 2,049 bytes it fails before writing a manifest.
  • diff.patch and routed guide .source long-line behavior remains an unresolved, unverified boundary and is not redesigned here.
  • Closed or merged PR review is intentionally unsupported; all supported workflow entry points require the frozen PR state to be open.
  • Required text is not deterministically wrapped or chunked because inserting newlines can change Markdown, code, table, link, or HTML semantics.
Deterministic red/green and validation evidence

Red-before focused controls failed for the expected missing contract clauses before each correction: native exact-file/no-shell wording, paging-to-final-line behavior, and the retained native-local-coordinator --allow-all-paths prohibition.

Green results:

  • Focused worker-contract test: 1/1 passed, 0 failed/skipped.
  • Complete deterministic suite: 90/90 passed, 0 failed/skipped.
  • Full command: . .\activate.ps1; dotnet run --project .github\skills\review-pull-request\scripts\PrepareReview.Tests.csproj -- -preEnumerateTheories -reporter quiet.
  • Skill validation passed.
  • Verified gh-aw v0.92.0 compile passed for pull-request-review.
  • Strict workflow validation passed with validate pull-request-review --strict --no-check-update.
  • Generated workflow lock drift is only body_hash: 9fd5253a988aaa0f297951b838de12517d98fe7fd76fbb6a37bc69d0cdb527ac → 3a4a75250d3317d54068adee130964598b1822736157c6d95a0db7eca13c941a.
  • git diff --check passed.

Retained reports:

  • worker-native-read-coordinator-guard-focused.xml
  • worker-native-read-coordinator-guard-full.xml
Immutable replacement evidence and independent review
  • Head: 68fa968990de2e6e991e75fd8debceb26fe3cf62
  • Tree: 9ee702a5ed0b150e950207247a70ba62b35540b4
  • Parent: 71b0131d7b170e1279f1a936946fc13cbec45eac
  • Replacement patch SHA-256: f295645bf5d73afb014236f732aa52fff0925fe24ab46f1ea48b4402fefdef50
  • Replacement diff: four files, +78/-23.
  • GPT-5.6 Sol: approved with no significant issues.
  • Gemini 4 Argon: approved with no significant issues.
  • Claude Haiku 5.5: no blocking issues; two low-level wording suggestions were adjudicated as already covered by the assignment definition and retained native-read/coordinator-denial rules, so the frozen patch was not changed.
#70055 migration contract
  • Consume guides[].assignment.files[] exactly as { kind, path, utf8Bytes, sha256 } and guides[].assignment.sourceRoles[] as frozen source-role names.
  • Treat assignment length/hash values as producer/checker trust metadata; do not require worker-side recomputation.
  • Expect exact native reads of every assigned non-source file through EOF, with paging to the final line and truncation treated as incomplete.
  • Reject worker bash, shell, and powershell calls.
  • Permit native search only beneath the assigned sources[role].root values.
  • Grade parent/broad bundle reads, sibling/unassigned paths, and contaminated intermediate outputs fail-closed without worker-authored receipts.
  • Expect coordinator exclusions under required/coordinator/exclusions/..., guide policies under required/guides/<guide-index>/policies/..., and guide-specific exclusion copies under required/guides/<guide-index>/exclusions/....

Fixes the native-reader transport failure observed while reviewing #69782.

@PureWeen
PureWeen added this pull request to stack #70059 October 27, 2026 02:52
@PureWeen PureWeen mentioned this pull request Oct 27, 2026
2 of 4 tasks
Base automatically changed from pureween-reviewer-sdk-setup to main October 27, 2026 12:01
Project frozen GitHub metadata, externalize multiline required text with verified source references, and scope worker input consumption by role.

Co-authored-by: Copilot App <[email protected]>
@PureWeen
PureWeen force-pushed the pureween-fix-pr-review-transport branch from 44edf70 to 5f3aa6f Compare October 27, 2026 12:01
PureWeen and others added 5 commits October 27, 2026 08:15
Require exact assigned file reads through native tools, prohibit worker shell use, and retain source-root-scoped native search.

Co-authored-by: Copilot App <[email protected]>
@PureWeen
PureWeen marked this pull request as ready for review October 28, 2026 13:45
Copilot AI balanced review requested due to automatic review settings October 28, 2026 13:45
@PureWeen
PureWeen requested review from a team and wtgodbe as code owners October 28, 2026 13:45

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 reuse checker rejects valid bundle paths with trailing separators and fails to enforce the 2,048-byte line-length limit on manifest.json.

2 open issues
What changed in this PR

This PR makes frozen review bundles easier to consume through native file readers, while keeping coordinator inputs separate from per-guide worker assignments. It also aligns the worker contract with the trace-grading work in #70055.

Changes:

  • Projects compact metadata and externalizes required text into integrity-checked .source files.
  • Adds exact per-guide assignments, native reads through EOF, and worker tool restrictions.
  • Expands regression coverage for projections, input integrity, assignment isolation, and line-length limits.
File Description
.github/​workflows/​pull-request-review.md Updates worker dispatch and native-read requirements.
.github/​workflows/​pull-request-review.lock.yml Refreshes the generated workflow body hash.
.github/​skills/​review-pull-request/​tests/​PrepareReviewTests.cs Adds projection, integrity, assignment, and read-bound tests.
.github/​skills/​review-pull-request/​SKILL.md Documents coordinator and worker input boundaries.
.github/​skills/​review-pull-request/​scripts/​prepare-review.cs Produces and validates projected metadata, required text, and worker assignments.

Review effort: Balanced

Comment on lines +1734 to +1736
if (pair.Key.EndsWith(".json", StringComparison.Ordinal))
{
RequireMaximumLineLength(bytes, pair.Key, "Prepared serialized JSON");
&& !path.Contains('\\', StringComparison.Ordinal)
&& !path.Split('/').Contains("..", StringComparer.Ordinal),
$"Prepared {description} path is invalid: {path}");
var fullOutput = Path.GetFullPath(output);
@PureWeen
PureWeen merged commit a1c68a7 into main Oct 28, 2026
20 checks passed
@PureWeen
PureWeen deleted the pureween-fix-pr-review-transport branch October 28, 2026 13:58
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool October 28, 2026 13:58 — with GitHub Actions Inactive
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool October 28, 2026 13:59 — with GitHub Actions Inactive
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool October 28, 2026 14:00 — with GitHub Actions Inactive
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool October 28, 2026 14:02 — with GitHub Actions Inactive
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool October 28, 2026 14:03 — with GitHub Actions Inactive
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool October 28, 2026 14:03 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

✅ No documentation PR was created.

Confidence that documentation is needed: 2%

No docs needed: the PR changes only CI/repo automation (PR review skill, script, tests, workflow).

Documentation surfaces considered

  • Conceptual article: Not required — Only repository review automation files under .github changed; no user-facing behavior.
  • Migration guidance: Not required — No upgrade impact for users.
  • Breaking change: Not required — No public API or behavior compatibility impact.

@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 4, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 68fa9689 Deployed Oct 28, 2026 by PureWeen via conclusion #109
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.

3 participants