Apply the preparation contract to bulk and mailbox scoring - #1039
Merged
Userunknown84 merged 1 commit intoAug 1, 2026
Conversation
Bulk rows and scanned inbox messages went to the vectorizer unprepared, so the same message could be classified differently depending on whether it arrived through the prediction endpoint, a file upload or a mailbox scan.
|
@pavsoss is attempting to deploy a commit to the Aditya Sharma's projects Team on Vercel. A member of the Team first needs to authorize it. |
This was referenced Aug 1, 2026
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
Bulk scoring and mailbox scanning each built their own model input and skipped text preparation entirely, so a classification depended on which entry point a message arrived through. The same text could be labelled one way via the prediction endpoint and another way via a file upload or an inbox scan.
Part of #1037.
Changes
Both paths now prepare text the same way the prediction path does, so identical input produces identical results regardless of entry point. Bulk results still echo each row exactly as uploaded, so a caller can match a result back to its input line even though a canonicalised form was scored.
Test plan
Depends on
Stacked on #1038. Its commit is included here, so this diff shrinks to just the bulk and mailbox changes once #1038 merges.