Repository navigation
Make the pii occurrence pagination test independent of numeric labels - #137
Merged
Merged
Conversation
The test asserted that 12 random "The number is N" values all came back as NUMERIC_VALUE. A newer English NER model labels some bare 3-digit numbers CREDIT_CARD (score > the 0.5 regex NUMERIC_VALUE, so it wins the overlap), which made the count vary with the random numbers even though pagination worked. Compare paginated results against a single unpaginated fetch, and check every number was found under some label, instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
akamor
approved these changes
Oct 13, 2026
Travmatth
enabled auto-merge (squash)
October 13, 2026 21:01
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
test_occurences_paginationasserted that 12 random "The number is N" values all come back asNUMERIC_VALUE. With Solar's new English NER model (upbeat-leaf-281, TonicAI/solar#3838), some bare 3-digit numbers are labeledCREDIT_CARD:credit_card_numbertag scores 0.51–0.69.NUMERIC_VALUEwhen the two overlap.So the
NUMERIC_VALUEcount varied with the random numbers (5, 8 or 10 of 12) even though pagination worked. Reproduced on the #3838 PR app: on one seed, 7 of 12 numbers came backCREDIT_CARD, and the paginated and unpaginated fetches agreed.The test now:
limit=5) results to a single unpaginated fetch across all PII types, and for the mixedPiiType/strrequest;It no longer depends on which numeric label the model picks.
Test plan
upbeat-leaf-281(further runs were blocked by a local Border0 DNS outage)🤖 Generated with Claude Code