Skip to content

Let a Copilot File Table Carry Forward on an Identical File Set - #2276

Merged
ptr727 merged 3 commits into
developfrom
feature/table-carry-2272
Oct 2, 2026
Merged

ptr727 merged 3 commits into
developfrom
feature/table-carry-2272

Conversation

@ptr727

@ptr727 ptr727 commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the maintainer's answer on #2272, option 1. A full Copilot file table on an earlier round now counts as coverage of a later head whose rounds carry no table, when the pull request changes exactly the same set of files at both commits. That is the bound carry_holds already applies to a carried coverage statement.

  • carried_table picks the newest non-refusal round carrying a table. table_reading consults it only where no round covering the head carries a table of its own, and only after the partial-on-record and review-window guards pass. The carry also requires that table to name exactly the changed files and carry_holds to confirm the change set at both commits.
  • status prints coverage=carried:table with the round's commit and the delta. report_verdict and the digest share the reading, and the memoized compare keeps them in agreement.
  • A partial table, a partial on record anywhere on the pull request, a review history past the window, or a change set that moved or could not be read each still goes to the maintainer.
  • table_covers had no callers left once table_reading existed, so it is gone and its reasoning moved into table_reading.
  • One sentence states the carry on each surface that states the Merge Gate's table reading: GOVERNANCE.md, pr-review-conduct, the Copilot runbook, and scripts/README.md.

Verification

  • python3 -m unittest tests.test_pr_review: 507 tests pass. TestFileTableCarriesForward covers the carry, a moved and an unreadable change set, a partial table, a partial on record, a truncated history, a head table that misses the diff, the newest-table choice, and a refusal carrying a table.
  • Each new test was shown to fail with its behavior reverted or mutated.
  • Live check against Return Zero From install-tools.sh Tool Selection and Hide the Home Directory in Notes #2275, an open PR in this exact shape: develop's pr_review.py exits 45 there, and this branch reads coverage=carried:table and exits 0.
  • Two local strict-review passes ran. Round 1 raised 7 findings, 6 fixed and 1 declined: the newest table is picked by submission time, the same rule carried_coverage uses. Round 2 raised 4 low findings, all fixed.

Closes #2272

🤖 Generated with Claude Code

ptr727 and others added 3 commits October 1, 2026 19:03
A full file table on an earlier round now counts as coverage of a later head whose rounds carry
no table, under the bound a coverage statement already carries under: the pull request changes
exactly the same set of files at both commits. Only the newest round carrying a table is
consulted, and only where no round covering the head carries one of its own. A partial table, a
partial on record anywhere on the pull request, or a change set that moved or could not be read
still goes to the maintainer.

status prints coverage=carried:table and names the round and the delta. The Merge Gate text in
GOVERNANCE.md, pr-review-conduct, the Copilot runbook, and scripts/README.md states the carry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test the partial and truncated-history guards on the carried-table path itself, state
the exact-match condition beside the change-set bound on every surface, fold the dead
table_covers reasoning into table_reading, and correct its docstring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cover which earlier table is consulted and that a refusal is skipped, place the
README's partial guard after the carried-table sentence so it binds both readings,
correct table_reading's commit wording, and rewrap the exit-45 text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 2, 2026 02:18
@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: f4bb8a62-209a-48f5-adad-32c1f5d58682

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.22222% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@f92076e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
scripts/pr_review.py 97.22% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2276   +/-   ##
==========================================
  Coverage           ?   57.45%           
==========================================
  Files              ?       16           
  Lines              ?     7639           
  Branches           ?        0           
==========================================
  Hits               ?     4389           
  Misses             ?     3250           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 57.45% <97.22%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Copilot review overview

🔵 Needs a closer look

The review-gate logic and distributed guidance changes warrant final human approval.

Review effort: Lite
Findings: None

What changed in this PR

This PR adds bounded carry-forward support for Copilot file tables when the changed-file set is identical across commits.

Changes:

  • Implements carried-table evaluation and synchronized reporting.
  • Adds comprehensive regression tests and safeguards.
  • Updates governance, documentation, and distributed skill guidance.
File Description
tests/​test_pr_review.py Tests carry-forward behavior and safeguards.
scripts/​README.md Documents updated coverage rules.
scripts/​pr_review.py Implements carried file-table evaluation.
GOVERNANCE.md Updates the review contract.
.github/​skills/​pr-review-conduct/​SKILL.md Updates generated GitHub guidance.
.github/​copilot-instructions.md Updates Copilot review guidance.
.claude-plugin/​fleet-skills/​skills/​pr-review-conduct/​SKILL.md Updates generated Claude guidance.
.claude-plugin/​fleet-skills/​.source-digests/​pr-review-conduct Refreshes the source digest.
.agents/​skills/​pr-review-conduct/​SKILL.md Updates canonical review guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ptr727
ptr727 merged commit d2529f1 into develop Oct 2, 2026
11 checks passed
@ptr727
ptr727 deleted the feature/table-carry-2272 branch October 2, 2026 14:39
ptr727 added a commit that referenced this pull request Oct 2, 2026
…eview (#2284)

## Summary

Promotes develop to main with the pull requests below. Each was already
reviewed and merged into develop.

- [#2271](#2271): Correct
the false no-vocabulary claims about environment secrets.
- [#2276](#2276): A full
Copilot file table on an earlier round carries forward to a later head
when the pull request changes the same set of files at both commits, the
same bound a coverage statement uses.
- [#2275](#2275):
`install-tools.sh` no longer exits 1 silently when the tools named leave
out the last managed tool, and its report notes show a home path as `~`.
- [#2277](#2277): A
Copilot round that says only "encountered an error" is read as a
possible quota hit. `pr_review.py` reads the reviewer's own Actions run
log, which states the rate limit and the time it resets, and `wait` no
longer requests a review into either case.
- [#2278](#2278): A
Copilot round is requested when a pull request opens and on the head of
a pull request into the default branch, rather than on every push.
Covering a fix push into develop:
- A recorded local strict-review pass covers the push, published with
`pr_review.py attest` and read by `status` as `review_on_head=local`.
- The Copilot rule in `repo-config/develop.json` and `main.json` now
reviews on open only, not on push or for drafts.

Applying that ruleset change to the live fleet repositories is a
separate config run after this merges, and it needs the maintainer's
go-ahead. Until it runs, GitHub still reviews every push, including
pushes to this pull request.

Closes #2256
Closes #2260
Closes #2261
Closes #2268
Closes #2272

🤖 Generated with [Claude Code](https://claude.com/claude-code)
ptr727 added a commit that referenced this pull request Oct 8, 2026
#2586)

## Summary

#2282 reported `pr_review.py status` reading `coverage=unstated` on a
pull request whose first Copilot round named every changed file in its
table, while a later round on a moved head, at Lite effort with no
findings and no table, stated nothing. The changed-file set was the same
at both commits.

The carry that case asks for landed in #2276, which reached `main` in
#2284 after #2282 was filed. With it, an earlier round's full table
carries to a head that states nothing, under the same changed-file-set
bound a coverage statement carries under, and reads as
`coverage=carried:table`. Re-reading the pull request #2282 names with
the current script gives `coverage=carried:table`.

The existing carry tests use first-format bodies on both rounds. This
adds one test pinning #2282's exact shape: both rounds written in the
second overview format, the later at Lite effort with a findings total
of none and no table. It asserts exit 0, `coverage=carried:table`, and
no `NO FILE TABLE STANDS IN` line. Patching `carried_table` to return
`None` fails it with exit 45, so the test proves the carry rather than
passing for another reason.

## Verification

- `python3 -m unittest tests.test_pr_review` passes.
- The mutation above fails the new test.
- Ruff format, Ruff check, and mypy pass through the pre-commit hook.

Closes on promotion: #2282

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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