Skip to content

CLI: Handle Reprint retry-later exits without advancing the pull - #4805

Open
adamziel wants to merge 1 commit into
trunkfrom
codex/handle-reprint-retry-later
Open

CLI: Handle Reprint retry-later exits without advancing the pull#4805
adamziel wants to merge 1 commit into
trunkfrom
codex/handle-reprint-retry-later

Conversation

@adamziel

@adamziel adamziel commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Keeps Studio on the interrupted pull step when Reprint returns exit code 3, instead of treating that step as complete.

Related issues

Supports WordPress/reprint#779.

Proposed Changes

Exit 2 still resumes immediately, including with older Reprint versions. Exit 3 waits 15 seconds before retrying the same command, then 45 seconds before one final retry. The progress message explains the wait. Only exit 0 completes the step; other failures stop the pull and retain the captured error details.

For example, if pull-db returns 3, 3, then 0, Studio waits 15 seconds, resumes pull-db from its saved state, waits 45 seconds, and resumes it again. Only after the 0 does Studio move to the next step. A third 3 stops the pull. An exit 2 between these failures does not reset the retry limit.

The bundled Reprint stays at v0.10.4. This change does not require the new JSON fields, so it can land before a separate Reprint version bump. Both native PHP and Playground use the same retry behavior.

Testing Instructions

Pull a site with the bundled v0.10.4 and confirm it still completes. Then use a PHAR built from Reprint trunk against a disposable remote that returns HTTP 503 during pull-db. Confirm Studio shows the retry waits and stays on the database step. Restore the remote during a wait and confirm the pull resumes. Keep it unavailable through both retries and confirm Studio stops with the error details instead of proceeding.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors? Type checking, changed-file lint, 73 related tests, and the CLI build passed. The full desktop pull above remains a manual check.

@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 4beda45 vs trunk

app-size

Metric trunk 4beda45 Diff Change
App Size (Mac) 1447.48 MB 1447.48 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 4beda45 Diff Change
load 1207 ms 1218 ms +11 ms ⚪ 0.0%

site-startup

Metric trunk 4beda45 Diff Change
siteCreation 7505 ms 7558 ms +53 ms 🔴 0.7%
siteStartup 3368 ms 3373 ms +5 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@adamziel
adamziel requested a review from wojtekn September 9, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants