Repository navigation
Conversation
This was referenced Nov 23, 2026
Closed
Contributor
Author
|
Split into one PR per fix so each can be reviewed and shipped on its own:
Windows re-pull fix: WordPress/reprint#1020 (needs a Reprint release and a version bump in Studio). Still to come: one Reprint key per machine, then Reprint as the default pull engine with a settings opt-out. (Comment by Claude Opus 5.5 via Claude Code, on behalf of Chris Huber.) |
chubes4
added a commit
that referenced
this pull request
Nov 30, 2026
## Related issues - Part of the Reprint pull rollout (removing `STUDIO_ENABLE_PULL_REPRINT`). Split out of #6157. ## How AI was used in this PR Claude Opus 5.5 (Claude Code), running as Franklin, Chris's agent, found this while stress-testing Reprint pull on real WordPress.com Atomic and preview sites, then wrote the fix and tests. It was split out of #6157. Chris reviews before merge. ## Proposed Changes - App-initiated push and pull failures never reached Sentry. The app starts the CLI with `STUDIO_HOST_REPORTS_CLI_ERRORS=1`, so the CLI leaves reporting to the app (#5922). The app's sync IPC handlers never reported anything, though. Failures are now captured with `sync_direction`, `sync_provider` and `pull_engine` (`reprint`/`backup`) tags. Cancels are not reported, and expected errors are still dropped by `beforeSend`. - This affects the Backup pull that ships today as well, which is why Sentry shows no pull failures even though Tracks records a 31% failure rate for Legacy pulls. ## Testing Instructions 1. From the app, make a pull fail. 2. The error reaches Sentry with the `sync_direction`, `sync_provider` and `pull_engine` tags. Cancelling a pull sends nothing. Unit tests: `npx vitest run apps/studio/src/modules/sync/lib/tests`. The new IPC handler test fails on trunk. ## Pre-merge Checklist - [x] Have you checked for TypeScript, React or other console errors?
chubes4
added a commit
that referenced
this pull request
Nov 30, 2026
## Related issues - Part of the Reprint pull rollout (removing `STUDIO_ENABLE_PULL_REPRINT`). Split out of #6157. ## How AI was used in this PR Claude Opus 5.5 (Claude Code), running as Franklin, Chris's agent, found this while stress-testing Reprint pull on real WordPress.com Atomic and preview sites, then wrote the fix and tests. It was split out of #6157. Chris reviews before merge. ## Proposed Changes - The resume hint printed after a failed first pull didn't work. Studio remembers the remote only after a successful pull, so `studio pull --path …` without `--remote-site` fails with "Multiple WordPress.com sites are available". The hint now includes `--remote-site <id>`. ## Testing Instructions With `STUDIO_ENABLE_PULL_REPRINT=1`, interrupt a first pull (Ctrl-C partway through). Run the printed resume command as-is: it resumes the pull (on trunk it fails with "Multiple WordPress.com sites are available"). ## Pre-merge Checklist - [x] Have you checked for TypeScript, React or other console errors?
chubes4
added a commit
that referenced
this pull request
Nov 30, 2026
## Related issues - Part of the Reprint pull rollout (removing `STUDIO_ENABLE_PULL_REPRINT`). Split out of #6157. ## How AI was used in this PR Claude Opus 5.5 (Claude Code), running as Franklin, Chris's agent, found this while stress-testing Reprint pull on real WordPress.com Atomic and preview sites, then wrote the fix and tests. It was split out of #6157. Chris reviews before merge. ## Proposed Changes - One failed `--only` selection blocked every later pull of that site. Studio saved the selection before the pull and reused it whenever an interrupted pull existed, so `--only nonexistent/path` kept failing even after rerunning with `--options all`. - The saved selection now applies only when no selection is given (a bare `studio pull` resume). A different selection aborts the interrupted pull and starts over. ## Testing Instructions With `STUDIO_ENABLE_PULL_REPRINT=1`: 1. Run `studio pull --remote-site <id> --only nonexistent/path`. It fails. 2. Run it again with `--options all`. On trunk it fails again with the old selection. With this change, the earlier selection is discarded and the full site pulls. 3. Interrupt a pull and run a bare `studio pull`: it resumes with the saved selection. Checked on macOS, Linux (Ubuntu) and a Windows 11 VM. On Linux, an interrupted and resumed pull ended with the same 23,365 files as a full pull. Unit tests: `npx vitest run apps/cli/lib/pull apps/cli/commands/tests/pull.test.ts`. ## Pre-merge Checklist - [x] Have you checked for TypeScript, React or other console errors?
chubes4
added a commit
that referenced
this pull request
Nov 30, 2026
## Related issues - Part of the Reprint pull rollout (removing `STUDIO_ENABLE_PULL_REPRINT`). Split out of #6157. ## How AI was used in this PR Claude Opus 5.5 (Claude Code), running as Franklin, Chris's agent, found this while stress-testing Reprint pull on real WordPress.com Atomic and preview sites, then wrote the fix and tests. It was split out of #6157. Chris reviews before merge. ## Proposed Changes - Sites that WordPress.com lists with an `http://` address could not be pulled with Reprint, because Reprint refuses HTTP API URLs ("The remote Reprint API URL you provided uses HTTP"). Atomic sites serve HTTPS, so the exporter URL is now always HTTPS. ## Testing Instructions With `STUDIO_ENABLE_PULL_REPRINT=1`, pull a site whose WordPress.com URL is `http://…`. On trunk the pull fails with the HTTP error. With this change it pulls. Reproduced on an Atomic test site listed as `http://`. Unit tests: `npx vitest run packages/providers/wpcom/sites/tests`. ## Pre-merge Checklist - [x] Have you checked for TypeScript, React or other console errors?
chubes4
added a commit
that referenced
this pull request
Nov 30, 2026
## Related issues - Part of the Reprint pull rollout (removing `STUDIO_ENABLE_PULL_REPRINT`). Split out of #6157. ## How AI was used in this PR Claude Opus 5.5 (Claude Code), running as Franklin, Chris's agent, found this while stress-testing Reprint pull on real WordPress.com Atomic and preview sites, then wrote the fix and tests. It was split out of #6157. Chris reviews before merge. ## Proposed Changes - A Reprint re-pull deleted files the user added locally. `pull-files --mode=mirror` removed anything not on the remote, such as a theme created locally after the first pull. Later pulls now pass `--on-fs-root-nonempty=preserve-local`: files from the remote are still restored to match it, and files the user added are kept. - The Backup pull never deleted local files, so without this change switching engines would lose user data. ## Testing Instructions With `STUDIO_ENABLE_PULL_REPRINT=1`: 1. Pull an Atomic site into a new local site. 2. Add `wp-content/themes/my-local-theme/style.css`, and edit one theme file that came from the remote. 3. Pull again. The local theme stays (on trunk it is deleted), and the edited file is restored to match the remote. Checked on macOS, Linux (Ubuntu) and a Windows 11 VM. On Windows, re-pulls also need WordPress/reprint#1020, which fixes a Reprint bug that removed `wp-content`. Unit tests: `npx vitest run apps/cli/lib/pull apps/cli/commands/tests/pull.test.ts`. ## Pre-merge Checklist - [x] 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
STUDIO_ENABLE_PULL_REPRINT). The settings opt-out comes in a separate PR.How AI was used in this PR
Claude Opus 5.5 (Claude Code), running as Franklin, Chris's agent, did the usage audit and stress-tested
studio pullagainst real WordPress.com Atomic and preview sites with Reprint enabled. It found each bug by reproducing it on a real site, then wrote the fixes and tests. Chris reviews before merge.Proposed Changes
Bugs found while stress-testing Reprint pull before it becomes the default:
STUDIO_HOST_REPORTS_CLI_ERRORS=1, so the CLI leaves reporting to the app (Report errors to Sentry from the CLI, studio ui and the web build #5922), but the app's sync IPC handlers never reported anything. Failures are now captured withsync_direction,sync_providerandpull_engine(reprint/backup) tags. Cancels are not reported, and expected errors are still dropped bybeforeSend. This affects the current Backup pull too.pull-files --mode=mirrorremoved anything not on the remote, such as a theme created locally after the first pull. Later pulls now pass--on-fs-root-nonempty=preserve-local: files from the remote are still restored to match it, and files the user added are kept. The Backup pull never deleted local files, so without this fix switching engines changes behavior and loses data.http://address could not be pulled. Reprint refuses HTTP API URLs. Atomic sites serve HTTPS, so the exporter URL is now always HTTPS.--onlyselection blocked every later pull of that site. Studio saved the selection before the pull and reused it whenever an interrupted pull existed, so--only nonexistent/pathkept failing even after rerunning with--options all. The saved selection now applies only when no selection is given (a barestudio pullresume). A different selection aborts the interrupted pull and starts over.studio pull --path …without--remote-sitefails with "Multiple WordPress.com sites are available". The hint now includes--remote-site <id>.Testing Instructions
With
STUDIO_ENABLE_PULL_REPRINT=1, using the CLI built from this branch:wp-content/themes/my-local-theme/style.css, edit one theme file that came from the remote, then pull again. The local theme stays, and the edited file is restored to match the remote.http://…. It pulls (on trunk: "The remote Reprint API URL you provided uses HTTP").--only nonexistent/path. Run the printed resume command and it pulls. Then run it with--options all: the earlier selection is discarded and the full site pulls.pull_enginetag.Other checks that passed on real sites: Ctrl-C during the database step then resume; SIGKILL partway through, then pulling a different remote into the same site (the result matched a fresh pull file for file); two pulls into the same site at once (the second is cleanly refused by Reprint's state lock); preview sources;
--skip-database,--skip-files,--only; a local path with spaces and accented characters.Platforms: macOS, Linux (Ubuntu), and a Windows 11 VM. On Windows, a re-pull removed
wp-content. That bug is in Reprint (WordPress/reprint#1020): the remote index came out unsorted after Windows deferred its links. With a phar built from that branch, re-pulls on Windows keepwp-contentand the files added locally.Unit tests:
npx vitest run apps/cli/lib/pull apps/cli/commands/tests/pull.test.ts apps/studio/src/modules/sync/lib/tests packages/providers/wpcom/sites/tests. The new IPC handler test fails on trunk.Pre-merge Checklist