fix(selfhost): normalize SQLite text for Postgres migration#1995
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-01 06:36:30 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1995 +/- ##
=======================================
Coverage 95.62% 95.62%
=======================================
Files 218 218
Lines 24317 24317
Branches 8819 8819
=======================================
Hits 23253 23253
Misses 436 436
Partials 628 628 🚀 New features to boost your workflow:
|
Summary
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.No issue because this is a narrow operational follow-up to the Postgres cutover tooling added in #1986. A migration dry-run found cached repo chunk text containing embedded NUL bytes, which SQLite allows but Postgres rejects for text/json inputs.
Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥97% coverage of the lines AND branches you changed (aim for 98%+ on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateAdditional focused checks:
npx vitest run test/unit/selfhost-migrate.test.ts test/unit/selfhost-grafana-reporting.test.ts test/unit/selfhost-pg-dialect.test.tsrepo_chunksrow containing an embedded NUL byte with--execute, then verified Postgres stored the replacement-character-normalized text.If any required check was skipped, explain why:
Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
Not applicable; this is a self-host migration script/test change only.
Notes
scripts/**is outside Codecov's measuredsrc/**patch surface, but the behavior is covered by a focused unit regression and an actual SQLite-to-Postgres smoke.