ETT-61 Exclude */man items from newyear.pl#207
Merged
Conversation
- Add `NewYear` module with tests for `are_rights_in_scope` extracted and expanded from what is in bin/newyear.pl - TODO: check the items listed in the tests, which are comprehensive, with KH to get confirmation this is the correct list
This is intended to replace one of the nastiest blocks of code encountered in `bin/newyear.pl` around lines 198-215 and duplicated at 359-376. Much depends on this being comprehensible and working as intended, so this is an attempt to get a better handle on it. Currently this new method is not swapped in. I would like to do an A/B comparison between the two methods of comparing PDD rights predictions.
- Make sure to call ClearErrors on the CRMS object, otherwise a catalog error can become sticky and pollute the output - Only log metadata failure if verbose
aelkiss
reviewed
Nov 6, 2025
Member
aelkiss
left a comment
There was a problem hiding this comment.
I wish this process didn't need to exist, but given that it does, this looks fine to me so far:
- the documentation in
CRMS::NewYearmakes sense, and the comments are helpful given the opacity of the logic inchoose_rights_prediction - it appears the tests cover the cases discussed in the documentation
are_rights_in_scopemakes sense
…fter successful A/B test. - Pass current rights to `SubmitNewYearReview` to eliminate a redundant Rights DB hit. - Short circuit no-op attempt to add to queue when generating TSV report and remove "message" field from the TSV.
Collaborator
Author
|
A/B testing result: no discrepancies between the two versions of the code, except approximately five cases where a random choice was made between pd/add and pd/exp. The randomness exists in both the old code and the new, and is a side effect of using hash keys as a set. KH says "don't care" and I have added a comment in NewYear.pm about the behavior. |
aelkiss
approved these changes
Nov 10, 2025
Member
aelkiss
left a comment
There was a problem hiding this comment.
The new changes to use choose_rights_prediction look good to me.
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.
NewYearmodule with tests forare_rights_in_scopeextracted and expanded from what is in bin/newyear.plCRMS::NewYearmethodchoose_rights_predictionbin/newyear.plaround lines 198-215 and duplicated at 359-376.KH and I have examined and discussed both methods in the new module and are in agreement that what is here seems right as long as nothing peculiar emerges in the A/B comparison (which should be done by Nov 7 -- it's a time consuming script to run twice). [Edit: see below on result of A/B]
I am now convinced
choose_rights_predictionshould be wired intonewyear.plas part of this branch.