Repository navigation
Cached opens skip the parsing pass; copies counted once; stray posts not sent as backups - #591
Merged
Merged
Conversation
…not sent as backups - A cache entry records that its parses came from one whole metadata pass, with the release-name keys of the list and a fingerprint of what the NFO store knows of them (nfo_audio.stamp_for). Reading it back marks the rows as a pass of this run while that fingerprint holds, so every later attach_metadata returns at once. - A release's copy count is counted once per grouping (ReleaseIndex.copies_in) and the picker row shows the count the ranking used (release_index.copies_of). - At NZB fetch, a backup whose files are not the pick's, 1.35 times off its size, with a listed size off the release's median while the pick's is not, is not sent (FleetDedup.stray_from_pick). Counted as "post that is not this release" in the dialog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Collaborator
Author
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Code coverage overviewLanguages: Python Python / code-coverage/pytest
View coverage of the 9 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
…r posting Review findings on #591: - nfo_audio.stamp_for hashes only what apply_known puts on a row (audio, channels, exact, sure, video of answers that tell something). A failed or empty NFO read, stored after every first open, no longer stops the skip. - A cache entry read back whose pass no longer stands is passed again and rewritten by keep_parsed, so the open after it skips the pass. - stray_from_pick: listed sizes count once per distinct posting in hand (after the duplicate check), so a second listing of the pick's own NZB cannot make an incomplete pick look typical; a backup with no listed size is never a stray. - Tests: failed read keeps the skip, a stale entry is stored again, a read back list equals a fresh pass on all 23 corpus searches, incomplete pick, no listed size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…FO answer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The last open items of the grouping design. A repeat open of a cached search now skips the whole metadata pass, a release's copies are counted once, and a backup that is another post under the release's name is not sent. Size clusters for named releases are left out: the build thread measured them and par2 makes 10-15% gaps between copies normal.
Measured on the Kodi box (standalone, lowest priority, while a film played; the add-on install was not touched), 23 searches from the corpus fixture. After each first open the run stores what the add-on's NFO step stores: one failed read and two audio answers for the top three releases. CPU time summed over the 23 searches:
A first review run (empty NFO store) showed 22% and hid that a failed NFO read changed the stamp; the second commit fixes that (see Changes).
flowchart TD R[Cached search read] --> Q{Stored from one whole pass,<br>and nothing new known of<br>its releases' NFO or MediaInfo?} Q -->|yes| M[Rows marked as this run's pass] Q -->|no| P[Metadata pass over the rows] M --> L[Requested item, filters, ranking, picker] P --> L classDef new fill:#1E1E2E,stroke:#34D399,color:#34D399 class M newChanges
filter.attached_record/filter.resume_attached,cache: a cache entry records the list's release-name keys andnfo_audio.stamp_for(keys), a fingerprint of what the NFO store knows of those releases (persistent across runs, unlikeknown_version). A read marks the rows as one pass while the fingerprint matches.release_index.ReleaseIndex.copies_in/copies_of: copy count once per grouping; the picker row shows the count the ranking used (before, the picker counted again in another order and could differ by one).stamp_forhashes only whatapply_knownputs on a row, so a failed or empty NFO read keeps the skip; an entry whose pass went stale is passed again and rewritten bykeep_parsed; listed sizes count once per distinct posting in hand (after the duplicate check), and a backup with no listed size is never a stray.FleetDedup.stray_from_pick(nzbget_resolver_dupes): a backup whose files are not the pick's, 1.35 times off the pick's size, with a listed size off the median of the distinct postings in hand while the pick's is not, is not sent; needs three listed sizes. On 1,428 real backup/pick pairs it skipped 32: a payload posted under six names, broken partial posts and mislabelled episodes. New strings 30787/30788.Testing
just testpasses (5,223)just lintpassesCHANGELOG.mdanddocs-site/; the chart renders on the built docs pagetests/test_grouping_leftovers.py(22, including a read-back-equals-fresh-pass check over all 23 corpus searches): cache round trip skips the pass, an NFO answer for a listed release redoes it, an answer for another release does not, damaged records, copy count once, stray rules and the dialog count. Corpus numbers intests/test_grouping_corpus.pyunchanged.🤖 Generated with Claude Code