Repository navigation
Walk a Cut Thread Page Once per Poll Read - #3682
Conversation
The held poll judges one read more than once, in its own read and again in the backoff and the exit, so each judgment of a cut page walked every page again. The walk's answer is now kept on the payload it judges. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified, and the change includes regression coverage for the pagination behavior.
No open issues 🎉
What changed in this PR
This pull request prevents repeated pagination of unresolved review threads during pr_review.py wait by caching each payload’s result, with regression coverage for truncated thread pages.
Changes:
- Cache
open_on_headresults per payload using the private_openkey. - Add a regression test confirming a cut thread page is walked only once per payload read.
- No actionable findings identified.
| File | Description |
|---|---|
tests/test_pr_review.py |
Verifies that a truncated thread connection is paginated once per payload. |
scripts/pr_review.py |
Caches unresolved-thread results for each polled payload. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3682 +/- ##
========================================
Coverage 81.74% 81.74%
========================================
Files 27 27
Lines 9137 9139 +2
========================================
+ Hits 7469 7471 +2
Misses 1668 1668
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…on an Attested Head (#3681) Promotes the changes merged into `develop` since promotion #3678 to `main`. - [#3680](#3680) Ends `pr_review.py wait`'s held poll on an attested head when an unresolved review thread is open, with a new exit `46` and a `status=THREADS_UNRESOLVED` line naming the threads' authors. The poll's read now carries each thread's state and author, and a thread read cut at 100 is walked to its end first. - [#3682](#3682) Walks a cut thread page once per poll read, keeping the answer on the payload it judged, which answers this promotion's first Copilot round. Closes #3671 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
Answers Copilot's finding on promotion #3681, Cache paginated thread results within each poll. It follows #3680, for #3671.
The held poll in
pr_review.py waitjudges one read more than once. It judges it inheld_read, again inbackoff'skeep, and once more at the exit-46 branch. On a pull request whose thread read is cut at 100, each judgment walked every thread page again.open_on_headnow keeps its answer on the payload it judged, as_open, so each read's walk is paid for once. Each GitHub read is a fresh dict, so the kept answer never outlives the read it describes.test_a_cut_thread_page_is_walked_once_per_readpins one walk where the poll and the exit judge the same read. It fails with the cache removed.Local review
One
local-strict-reviewpass at thefrontiertier raised nothing. It checked every call site for staleness,full_read's reuse of the polled object, the test mock's repeated object, and whether the extra key leaks into anything that iterates or serializes a payload.🤖 Generated with Claude Code