Preserve SQLite integration during database import - #4356
Conversation
Ensure SQLite integration is in place since importing database reads file to determine version.
|
@wojtekn this is the landable continuation of #3692, with George's original commits/authorship preserved and the MySQL classification regression fixed. Please review when you have time. Before recommending approval, I am running a focused fuzz testing campaign against only the two contracts changed here:
The broader |
📊 Performance Test ResultsComparing a5641d9 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
Focused fuzz result: 19/19 passed, zero findingsTested this exact PR revision:
Result: 19 cases passed; 0 findings. Target and operation coverage were complete, and case logs, replay data, coverage summary, and the result envelope were retained. Broader provider-hardening findings remain separately scoped in #4355. The reusable campaign source is in homeboy-rigs PR #700, tested at npm ci --ignore-scripts
node --experimental-strip-types ./scripts/download-wp-server-files.ts
npm run cli:build
node /path/to/homeboy-rigs/Automattic/studio/fuzz/import-db-dropin-fuzz-runner.mjsThe runner writes human-readable evidence to |
Related issues
Proposed changes
WordPress.com backups can contain a foreign
wp-content/db.php, such as Query Monitor's database drop-in. Restoring that file beforewp sqlite importhidesSQLITE_DB_DROPIN_VERSIONand makes the database pull fail.George Garside's two commits from #3692 are preserved with original authorship. The branch was rebased onto current
trunkbecause maintainer push access to the contributor fork remained unavailable.Verification
npm test -- apps/cli/lib/import-export/import/importers/tests/importer.test.ts packages/common/lib/tests/sqlite-integration.test.ts(58 passed)npm -w wp-studio run typechecknpm test -- apps/cli/commands/tests/import.e2e.test.ts --tagsFilter=e2e(7 passed)AI assistance
OpenAI GPT-5.6 Sol via OpenCode investigated the compatibility regression, implemented the destination preflight and MySQL regression case, and ran verification under Chris Huber's direction. Chris reviewed the changes and remains responsible for every line. George's original implementation and regression-test commits retain their original authorship.