fix: ship the blob example's sample data — and make BLOB ingestion actually work#343
Merged
Merged
Conversation
…tually work Bugbot on #330 flagged that examples/blob_ingestor.py points at a sample CSV that doesn't exist (examples/data/ wasn't in the repo at all). Shipping the sample exposed the deeper bug: the example could NEVER have run — BLOB/LONGBLOB columns raise StatementError(TypeError) on every row, because SQLAlchemy wants bytes at bind time and CSV/JSON cells arrive as str. The 'documented BLOB workflow' has been broken end to end, invisible because nothing executed it. - examples/data/blob_documents_sample.csv: 6 documents, 3 label classes (passes LabelDiversityValidator), base64-ish payloads, JSON metadata. - database.insert_batch: str values bound to BLOB/LONGBLOB/LargeBinary columns are utf-8-encoded once, covering both ingestion paths. - Guardrail test: every data path an example references must exist in the repo (this class of dangling-example can't recur). - e2e (real MySQL): BLOB roundtrip from str cells → bytes back out. Proven end to end: the example executed against real MySQL + wire-level registration — 6 rows, 3 labels, 1 summary call, LONGBLOB payloads stored. Suite: 1373 passed, 1 xfailed; e2e 9/9 (database file). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
divyasinghds
approved these changes
Jul 7, 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
Resolves Bugbot's remaining finding on #330 (missing
blob_documents_sample.csv) — and the latent bug shipping the sample exposed: BLOB ingestion has never worked. SQLAlchemy wantsbytesat bind time, CSV/JSON cells arrive asstr, so every row into a BLOB/LONGBLOB column died withStatementError(TypeError)— invisible because nothing ever executed the documented workflow.insert_batch: str → utf-8 bytes for BLOB/LONGBLOB/LargeBinary columns (covers CSV and JSON paths)examples/**data path must exist in the repo — the dangling-example class can't recurProven end to end: the example itself executed against real MySQL + wire-level registration — 6 rows, 3 labels, 1 summary call, LONGBLOB bytes stored and read back.
Suite 1373 passed, 1 xfailed; e2e database file 9/9.
Refs #330 (last Bugbot thread resolvable on merge).
🤖 Generated with Claude Code