Skip to content

Conversation

@moseshll
Copy link
Collaborator

@moseshll moseshll commented Nov 5, 2025

  • Add NewYear module with tests for are_rights_in_scope extracted and expanded from what is in bin/newyear.pl
    • I have checked the items listed in the tests, which are comprehensive, with KH to get confirmation this is the correct list.
  • Add CRMS::NewYear method choose_rights_prediction
    • 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 called anywhere. I would like to do an A/B comparison between the two methods of comparing PDD rights predictions.

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_prediction should be wired into newyear.pl as part of this branch.

- 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.
@moseshll moseshll marked this pull request as ready for review November 5, 2025 19:29
@moseshll moseshll requested a review from aelkiss November 5, 2025 19:29
 - 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
Copy link
Member

@aelkiss aelkiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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::NewYear makes sense, and the comments are helpful given the opacity of the logic in choose_rights_prediction
  • it appears the tests cover the cases discussed in the documentation
  • are_rights_in_scope makes 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.
@moseshll
Copy link
Collaborator Author

moseshll commented Nov 7, 2025

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.

@moseshll moseshll requested a review from aelkiss November 7, 2025 15:58
Copy link
Member

@aelkiss aelkiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new changes to use choose_rights_prediction look good to me.

@moseshll moseshll merged commit e742f6d into main Nov 10, 2025
1 check passed
@moseshll moseshll deleted the ETT-61_exclude_man_from_newyear branch November 10, 2025 17:17
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.

3 participants