Add manifest-driven prep script for hosted data-heavy e2e fixtures#4152
Merged
Conversation
gavande1
reviewed
Jul 13, 2026
gavande1
reviewed
Jul 13, 2026
gavande1
reviewed
Jul 13, 2026
gavande1
reviewed
Jul 13, 2026
…d-fixture-prep-script
…@studio/common alias
1 task
Member
Author
Collaborator
📊 Performance Test ResultsComparing 4e0ea7f 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) |
gcsecsey
added a commit
that referenced
this pull request
Jul 14, 2026
## Related issues - Related to [STU-1866](https://linear.app/a8c/issue/STU-1866/shared-artifact-storage-for-import-data-heavy-fixtures) (completes its last acceptance criterion: import tests updated) and [STU-1870](https://linear.app/a8c/issue/STU-1870/migrate-import-export-tests) - Stacked on #4152 ## How AI was used in this PR Claude Code seeded the source site's content, pre-flighted the artifact through real CLI imports (which surfaced a platform drop-in bug — Linear issue incoming), and implemented the rewire under my direction; I reviewed the result. ## Proposed Changes `import.test.ts`, the release-time test that imports a WordPress.com Jetpack backup, was skipped in CI since it was written: its archive had to be fetched by hand from a shared Drive folder, and the files there went stale. The minimal fixture in `import-formats.test.ts` covers the format's shape, this test's distinct job is catching drift in what customer backups actually contain, so it needs a real, current artifact. - The test consumes `test-fixtures/downloads/coolbeans-jetpack-backup-2026-07.tar.gz`, fetched by the #4152 pipeline from the fixtures site. Locally it still skips with an actionable message when the file is absent; in CI the prep step hard-fails first, so the silent-skip era ends. - The backup is a genuine Jetpack Cloud export (149 MB, 51 per-table SQL files incl. WooCommerce tables, full uploads tree, wpcomsh mu-plugins, `__wp__` core dir) of **Cool Beans** (gcsecseywoa11.wpcomstaging.com), a purpose-built public test site whose content is self-describing: a hero post stating the site's purpose, encoding-test posts (ASCII and UTF-8/emoji), a long-form truncation canary, media/taxonomy/comment-thread tests, and nested pages. - Assertions verify the imported site really serves the backup: blog name + tagline in the page title, the custom theme's landing page rendering, and the hero post resolving at its pretty permalink (which also proves the permalink structure imported). - The stale `apps/studio/e2e/imports/` directory, its P2-pointing readme, and its `.gitignore` entries are removed. ## Verified end to end - `npm run e2e:fixtures` downloads the wrapper from the live fixtures site, verifies both SHA-256 hashes, unwraps; a second run verified-skips both fixtures. - Pre-flight of this exact artifact through the real CLI: import exits 0, `wp option get blogname` → `Cool Beans`, started site serves HTTP 200 with the full title, theme landing renders, hero permalink returns 200 with the checklist text — i.e., every assertion in this PR's test, validated against the shipped artifact. ## Testing Instructions 1. `npm run e2e:fixtures` — downloads + verifies both hosted fixtures (~150 MB). 2. This PR's e2e CI runs `import.test.ts` for real for the first time — the E2E jobs are the authoritative proof (note: they now download the artifact: mac/windows cache it keyed on the manifest, Linux fetches per run). ## Pre-merge Checklist - [ ] Have you checked for TypeScript, React or other console errors?
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.
Related issues
How AI was used in this PR
Claude Code planned and implemented the change under my direction, and verified the script’s behaviors (download, idempotence, corruption self-heal, offline modes) against a local HTTP server and then against the live fixtures site. I reviewed the result.
Proposed Changes
The minimal backup fixtures live in the repo (#4057 / #4151) and deliberately stay there. They’re small, and keeping them in git means per-PR CI doesn't need network access. This PR is for the other tier: realistic, data-heavy backups that are too large to commit. These are currently fetched manually from a shared Drive folder.
Data-heavy artifacts now live in the media library of studioe2efixtures.wordpress.com, a dedicated site, and are fetched on demand:
test-fixtures/manifest.jsonpins each hosted artifact to a URL, byte size, and SHA-256 hashes. Adding a new fixture is a manifest-only PR.npm run e2e:fixturesdownloads whatever the manifest declares into gitignoredtest-fixtures/downloads/, verifying every hash. Runs are idempotent, corrupted files self-heal, and while a failed download only warns locally (affected tests skip), CI runs with--requireand fails loudly..zipbut reject.tar.gz/.wpress/.sql, so hosted artifacts are zip wrapped. The manifest records both the wrapper and inner hashes and the script verifies both.globalSetup. Buildkite runs it explicitly and cachesdownloads/keyed on the manifest hash.See it working
From this PR’s own CI (E2E Tests on mac-arm64, build 19149):
Testing Instructions
npm run e2e:fixturestest-fixtures/downloads/pipeline-test.sql.echo x >> test-fixtures/downloads/pipeline-test.sql) and run again to see it re-download.-- --requireexits 1).Pre-merge Checklist