Skip to content

Subtract Every Linked Id From the Headline Shortfall's Earlier Threads - #3032

Merged
ptr727 merged 2 commits into
developfrom
feature/3030-headline-backref-count
Oct 15, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/3030-headline-backref-count

Conversation

@ptr727

@ptr727 ptr727 commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Answers the Copilot finding on #3030: headline_shortfall subtracted 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_links reads the head round's open entries once, and open_entry_ids (unchanged result) and the new open_linked_ids project from it.
  • New test test_a_back_reference_an_open_entry_links_is_not_counted_again fails 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 and carried_open_threads already 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

ptr727 and others added 2 commits October 14, 2026 17:03
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]>
Copilot AI lite review requested due to automatic review settings October 15, 2026 00:06
@ptr727

ptr727 commented Oct 15, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Oct 15, 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: 460accb3-ad38-417b-86a6-8149017099ac
  • 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.

🟢 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

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.00%. Comparing base (fd49353) to head (0a19632).

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              
Flag Coverage Δ
python-3.13 61.00% <100.00%> (+0.01%) ⬆️

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 merged commit 16ad456 into develop Oct 15, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/3030-headline-backref-count branch October 15, 2026 00:16
ptr727 added a commit that referenced this pull request Oct 15, 2026
…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)
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