fix(seed): exclude content_text from the seed export - #10
Merged
Conversation
The content_text snapshot column added for diff-based triage holds the full page body. export_seed_sql did SELECT * on snapshots, so that body flowed into the shipped seed and pushed seed.sql.gz from 1.4MB to 108MB, past GitHub's 100MB file limit (the seed workflow push was rejected) and into the PyPI wheel. content_text is a local runtime cache: it is not needed to detect changes (content_hash does that) and it is not needed in a distributed baseline. Hold it back from the export. Seeded rows import it empty and self-heal on the first change per page (the diff falls back to an excerpt once, then stores the body). Change detection, hashes, excerpts, and validators are unaffected. Co-Authored-By: Penny-One (Batcave) <noreply@anthropic.com>
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.
Why
The
content_textcolumn added in #9 (diff-based triage) holds the full page body.export_seed_sqldoesSELECT *on snapshots, so that body flowed into the shipped seed —seed.sql.gzwent from 1.4 MB → 108 MB, which theseedworkflow push hit as GitHub's hard 100 MB file limit (GH001), and which would also bloat the PyPI wheel.Fix
Hold
content_textback from the seed export (_SEED_EXCLUDED_COLS). It's a local runtime cache — needed to diff a page against its prior version, not to detect changes (content_hashdoes that) and not part of a distributed baseline.Seeded rows import
content_textempty and self-heal on the first change per page: the diff falls back to an excerpt once, then stores the real body. Change detection, hashes, excerpts, and HTTP validators are unaffected.Why it slipped through #9
Nothing in PR CI builds a real seed — the seed is deliberately off the CI/release path (the hours-long crawl runs only on schedule/dispatch), and unit tests use fake stores. The size regression could only surface when the
seedworkflow actually ran.Tests
Added
test_seed_export_excludes_content_text: a snapshot with a large body must not appear in the exported SQL, and the round-trip still preserves hash + excerpt (content_text imports empty). 486 pass, lint clean.🦇 Generated by Penny-One at Batcave