test(nlp-profile): accept source_record kwarg in map_file_transfer stubs (bugbot #304)#305
Merged
Merged
Conversation
…ubs (bugbot #304) The #805 NLP text-profile tests stubbed map_file_transfer with a 4-arg lambda (c, r, o, cfg), but production passes source_record as a keyword (base.py:456). The stub raised TypeError on the first file-bearing NLP record; it was swallowed by the per-record try/except, so the tests passed without actually exercising the file-transfer/profile path. Align the 3 stubs with the already-correct ones (source_record=None) so they exercise the real path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
|
👋 Heads-up — Code review queue is at 38 / 30 Above the WIP limit. The team convention is to review existing PRs before opening new work. Open PRs currently in Code review (oldest first):
Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.) |
saadqbal
approved these changes
Jun 18, 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
Fixes a bugbot finding on the v0.3.12 release PR #304.
The #805 NLP text-profile tests in
test_ingestor_base.pystubbedmap_file_transferwith a 4-arg lambda(c, r, o, cfg=None), but production calls it withsource_recordas a keyword (base.py:456). The stub raisedTypeErroron the first file-bearing NLP record — which was swallowed by the per-recordtry/except, so the tests passed without actually exercising the file-transfer / profile-attachment path (false confidence).Aligned the 3 stubs (lines ~1035/1059/1082) with the already-correct ones (568/597/623) by accepting
source_record=None.Note on the other bugbot finding (#304: "MLM tokenizer preflight removed")
That one is a false positive — commit
82a52bb(#805 / #299, "refactor(ingest): drop ingest-time tokenizer + fingerprint") intentionally removed the entireTokenizerValidator+ fingerprint machinery from the ingest path (it deletedtest_tokenizer_validator.py,test_tokenizer_fingerprint.py, andTokenizerValidatorno longer exists anywhere). The MLM factory dropping the tokenizer preflight is the designed behavior of #805, not a regression — so no change is made for it.Test plan
pytestgreen locally — 1151 passed, 1 xfailedmap_file_transfer(..., source_record=...)path instead of swallowing aTypeError🤖 Generated with Claude Code
Note
Low Risk
Test-only stub signature changes; no production code paths are modified.
Overview
Updates three NLP text-profile tests in
test_ingestor_base.pyso theirmap_file_transferpatch stubs acceptsource_record=None, matching howBaseIngestor.ingestcalls the real function.Previously the four-argument lambdas raised
TypeErroron that keyword; the per-record handler swallowed it, so the tests still passed without running file transfer or the text-profile attachment path. The stubs now match the ones already used elsewhere in the same file (e.g. self-supervised ingest tests).Reviewed by Cursor Bugbot for commit 576a3cd. Bugbot is set up for automated code reviews on this repo. Configure here.