Skip to content

fix(seed): exclude content_text from the seed export - #10

Merged
krayong merged 1 commit into
mainfrom
fix/seed-exclude-content-text
Jul 14, 2026
Merged

fix(seed): exclude content_text from the seed export#10
krayong merged 1 commit into
mainfrom
fix/seed-exclude-content-text

Conversation

@krayong

@krayong krayong commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Why

The content_text column added in #9 (diff-based triage) holds the full page body. export_seed_sql does SELECT * on snapshots, so that body flowed into the shipped seed — seed.sql.gz went from 1.4 MB → 108 MB, which the seed workflow push hit as GitHub's hard 100 MB file limit (GH001), and which would also bloat the PyPI wheel.

Fix

Hold content_text back 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_hash does that) and not part of a distributed baseline.

Seeded rows import content_text empty 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 seed workflow 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

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>
@krayong
krayong merged commit e68a511 into main Jul 14, 2026
2 checks passed
@krayong
krayong deleted the fix/seed-exclude-content-text branch July 14, 2026 10:44
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.

1 participant