Repository navigation
Subtract Every Linked Id From the Headline Shortfall's Earlier Threads - #3032
Conversation
An open entry linking an earlier round's thread as a back-reference was counted twice, once in the listed entries and once as an earlier thread. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 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. ⚙️ Run configuration
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. Comment |
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix matches the documented accounting behavior and has regression coverage.
0 open findings
What changed in this PR
This PR fixes headline shortfall accounting in pr_review.py so an earlier thread linked by an open entry is not counted twice.
Changes:
- Subtract all thread IDs linked by open entries while preserving title-anchor behavior.
- Add a regression test for an open entry with a back-reference.
| File | Description |
|---|---|
| tests/test_pr_review.py | Tests that a linked earlier thread is counted once. |
| scripts/pr_review.py | Uses all open-entry links in the shortfall calculation. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3032 +/- ##
===========================================
+ Coverage 60.98% 61.00% +0.01%
===========================================
Files 17 17
Lines 9010 9014 +4
===========================================
+ Hits 5495 5499 +4
Misses 3515 3515
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:
|
…ng, and backlog-burndown Re-Dispatch Rules to Main (#3030) - #2997 adds an updater that keeps the coding-agent tools already installed on a host current, without installing a tool the maintainer has not chosen - #3017 brings the agent-safety READMEs up to the write guard's #3011 readings: `--admin` read inside a quoted `eval` argument, clustered and cut-short push options, `--branches` as `--all`, `refs/` pattern destinations, and a double-quoted list expansion as a directory or commit value failing closed - #3022 pairs a Copilot overview-table or `Review findings:` entry with a review thread by the file it names, replacing word overlap, compares the headline count against everything the round and the pull request account for, and makes `pr_review.py cleanup` read every page of the head pull requests, counting only this repository's own - #3018 has `backlog-burndown` name a new branch when an issue is dispatched again, name the open pull request a pushed branch still heads when cleanup reports it, and splits the long cleanup sentence - #3028 keeps an abandoned group's issue out of the `backlog-burndown` ranking while that group is stopped for the maintainer, and records the release on the claim comment - #3023 makes `gh-write-guard` read a `heads/` push destination as the branch git completes it to, read `--prune` beside a pattern, `:`, `--all`, or bare push as a delete of each branch matched, read `--mirror` as a force and a delete, and read the `@{push}` target against the configured remote names. A differential against the previous guard found no deny-to-allow flip - #3032 subtracts every thread id an open entry links, back-references included, from the earlier threads `pr_review.py`'s headline shortfall counts, so a back-referenced thread is no longer counted twice - #3035 covers the bootstrap upgrade handoff on Linux and Windows, the root and elevated skips included, and has `bootstrap.ps1` say when the agent tools report fails - #3037 makes `gh-write-guard` fail closed when a push target resolves but the remote names cannot be read After this merges, the host-safety installer payload changes, so the maintainer runs the installer after promotion. Fixes #3009 Fixes #2985 Fixes #3003 Fixes #2993 Fixes #3016 Fixes #3005 Fixes #3007 Fixes #2973 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Answers the Copilot finding on #3030:
headline_shortfallsubtracted only each open entry's title anchor from the earlier-round threads, so an open entry that also links an earlier thread as a back-reference counted it twice. It now subtracts every id an open entry links, which is what its docstring says ("that no open entry links").open_entry_linksreads the head round's open entries once, andopen_entry_ids(unchanged result) and the newopen_linked_idsproject from it.test_a_back_reference_an_open_entry_links_is_not_counted_againfails with the old subtraction restored and passes with the fix.Local strict review: recorded for the current content (
agent-skill, two rounds). Round one raised that a back-reference could name a distinct finding rather than the same one (class: pre-existing reading of the docstring contract, declined: the docstring andcarried_open_threadsalready treat a linked thread as accounted by its entry); its duplicate-helper finding was fixed in the second commit, which round two found clean.🤖 Generated with Claude Code