Reprint pull engine: design and engine-switch compatibility findings (STU-1815) - #4429
Closed
gcsecsey wants to merge 1 commit into
Closed
Reprint pull engine: design and engine-switch compatibility findings (STU-1815)#4429gcsecsey wants to merge 1 commit into
gcsecsey wants to merge 1 commit into
Conversation
Member
Author
|
Closing — this was committed prematurely. The design is still under discussion and there is no implementation yet. |
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 explored the two pull paths, ran the compatibility testing described below against a real remote site, and drafted the design doc. I made the design decisions and reviewed the findings.
Proposed Changes
Design only so far — no code yet. This documents the agreed plan for STU-1815 and, more importantly, records compatibility testing that changed the shape of it.
The premise in STU-1815 is that "Studio uses the CLI
pullcommand", but that only holds for the Agentic UI. The legacy renderer pulls over the WordPress.com REST API directly and never touches the CLI, so only the Agentic UI can swap engines.The interesting finding is that switching engines on an existing site is not symmetric. A Reprint pull rewrites the site so every top-level entry is a symlink into
~/.studio/pulls/<siteId>/raw/. Pulling that site with the Jetpack engine afterwards merges the backup through those symlinks into the Reprint scratch, then fails on the database import and retries forever. Reprint-onto-Jetpack works fine.So a single global beta flag isn't safe: flipping it off after a Reprint pull would break the site. The engine has to be derived per site from
reprintOrigin, which the site record already carries, with a guard inpullrefusing to run against a Reprint-shaped site.Also worth noting: "just overwrite everything with a Jetpack pull" doesn't rescue this. That importer merges rather than replaces and never lays down core — and on a Reprint-shaped site, core is symlinks into the scratch.
Two unrelated bugs surfaced during testing and are called out in the doc for separate issues: a failed database import retries indefinitely, and the importer follows symlinks out of the site directory (unreachable via
studio pull, but live for the Playground/Local/SQL/WXR/Wpress importers).Testing Instructions
This PR only adds a document, so there is nothing to run. To reproduce the compatibility finding:
npm run cli:buildnode apps/cli/dist/cli/main.mjs site create --path ~/Studio/flip-a --name flip-a --start=falseand the same forflip-b.flip-a, pull with Reprint first, then with the legacy engine:~/.studio/pulls/<siteId>/raw/srv/htdocs/wp-contentand note the freshly written Jetpack files.flip-b, do the same two pulls in the opposite order. Both succeed.Pre-merge Checklist