Skip to content

test(nlp-profile): accept source_record kwarg in map_file_transfer stubs (bugbot #304)#305

Merged
divyasinghds merged 1 commit into
developfrom
fix/bugbot-304-source-record-stubs
Jun 18, 2026
Merged

test(nlp-profile): accept source_record kwarg in map_file_transfer stubs (bugbot #304)#305
divyasinghds merged 1 commit into
developfrom
fix/bugbot-304-source-record-stubs

Conversation

@divyasinghds

@divyasinghds divyasinghds commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes a bugbot finding on the v0.3.12 release PR #304.

The #805 NLP text-profile tests in test_ingestor_base.py stubbed map_file_transfer with a 4-arg lambda (c, r, o, cfg=None), but production calls it with source_record as a keyword (base.py:456). The stub raised TypeError on the first file-bearing NLP record — which was swallowed by the per-record try/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 entire TokenizerValidator + fingerprint machinery from the ingest path (it deleted test_tokenizer_validator.py, test_tokenizer_fingerprint.py, and TokenizerValidator no 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

  • pytest green locally — 1151 passed, 1 xfailed
  • The 3 profile tests now exercise the real map_file_transfer(..., source_record=...) path instead of swallowing a TypeError

🤖 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.py so their map_file_transfer patch stubs accept source_record=None, matching how BaseIngestor.ingest calls the real function.

Previously the four-argument lambdas raised TypeError on 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.

…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>
@divyasinghds divyasinghds self-assigned this Jun 18, 2026
@LukasWodka

Copy link
Copy Markdown
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.)

@divyasinghds divyasinghds requested a review from saadqbal June 18, 2026 05:22
@divyasinghds divyasinghds merged commit 5a6c6ce into develop Jun 18, 2026
7 checks passed
@divyasinghds divyasinghds deleted the fix/bugbot-304-source-record-stubs branch June 18, 2026 05:24
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