Skip to content

Re-Read the Changed-File List Only Where a File Table Can Use It - #2748

Merged
ptr727 merged 4 commits into
developfrom
feature/reread-only-where-table-can-use-it
Oct 10, 2026
Merged

ptr727 merged 4 commits into
developfrom
feature/reread-only-where-table-can-use-it

Conversation

@ptr727

@ptr727 ptr727 commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

This answers Copilot's finding on promotion #2747. files_unread, added in #2746, re-read the whole payload whenever a head round stated nothing and the changed-file list fell short, including cases where the table reading refuses before it reads that list:

  • no table on the head or on any earlier round
  • a partial round on record
  • a review history cut short
  • a carried table whose round names no commit

Each of those cost up to two extra GraphQL reads and seven seconds of sleep for nothing.

files_unread now takes the table the way table_reading does: the head's own table first, and otherwise the newest carried one where its round names a commit. It then asks table_shortfall whether the file list is the reason, so the two cannot disagree.

Local-review finding

The local strict review's two-round edit budget left one introduced prose finding: an over-long docstring sentence. Copilot raised the same one, and b468ec1 rewords the docstring.

Test plan

  • python3 tests/test_pr_review.py: 715 tests pass.
  • New cases cover each no-use shape not re-reading, and a head table read again past a newer round naming no commit. Each was checked to fail against the predicate it replaces.
  • ruff format, ruff check, mypy, the prose gate, and the EOL gate are clean.

Refs #2650

🤖 Generated with Claude Code

ptr727 and others added 3 commits October 10, 2026 13:25
files_unread re-read the payload whenever a head round stated nothing and
the file list fell short, even where no table exists, a partial round is
on record, or the review history is cut, each of which refuses the table
before the list is read. It now asks table_shortfall whether the list is
the reason, so those cases spend no re-reads.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
table_reading refuses a carried table whose round names no commit before
it reads the file list, so files_unread now refuses it too. The head arm
was redundant, since a head table's round is the newest table and names
the head commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A head table can lose newest_of to a later tabled round naming no commit,
which made files_unread skip a re-read the table reading needed. It now
takes the head's own table first and gates only the carried arm on its
commit, the order table_reading reads them in.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 10, 2026 20:30
@coderabbitai

coderabbitai Bot commented Oct 10, 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: 20ae5cb8-5d3d-448a-8f0e-a3b050a1e18d

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

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.

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

Two unresolved P2 nit findings require documentation and test-description fixes.

2 open findings
What changed in this PR

This PR aligns changed-file re-read detection with file-table selection and adds regression coverage.

Changes:

  • Refines files_unread logic and documentation.
  • Adds tests for table and review-history edge cases.
  • Two P2 nit findings remain in documentation and a test description.
File Description
tests/​test_pr_review.py Adds coverage for table-selection edge cases.
scripts/​pr_review.py Updates changed-file re-read detection.

🧠 Review effort: Lite


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/pr_review.py Resolved
Comment thread tests/test_pr_review.py Resolved
The files_unread docstring carried a 29-word sentence and an awkward
clause, and read as if an older named round were a fallback. The head-table
test docstring ended on an unclear clause.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@codecov

codecov Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.94%. Comparing base (413bcbc) to head (b468ec1).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2748      +/-   ##
===========================================
+ Coverage    59.91%   59.94%   +0.02%     
===========================================
  Files           16       16              
  Lines         8385     8390       +5     
===========================================
+ Hits          5024     5029       +5     
  Misses        3361     3361              
Flag Coverage Δ
python-3.13 59.94% <100.00%> (+0.02%) ⬆️

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.

@ptr727

ptr727 commented Oct 10, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head b468ec1bfb2dd213bd81257efa96cae51f89d512, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@ptr727
ptr727 merged commit 3408f1d into develop Oct 10, 2026
13 checks passed
@ptr727
ptr727 deleted the feature/reread-only-where-table-can-use-it branch October 10, 2026 20:40
ptr727 added a commit that referenced this pull request Oct 10, 2026
## Summary

This promotes two changes from develop to main.

- [#2746](#2746) makes
`pr_review.py` re-read an input that failed transiently before it
reports `coverage=unstated`. Two inputs decide that reading: the REST
compare that bounds a carried statement, and the changed-file list the
file table is matched against. Each is re-read on a short bounded
schedule, and both `status` and `wait`'s final read go through it. Every
re-read now runs through the one `backoff` loop, and one predicate
decides when a changed-file list counts as unread.
- [#2748](#2748) answers
this pull request's review finding. The changed-file list is re-read
only where a file table can use it, which is the order the table reading
itself takes the table in.

Closes #2650

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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