Repository navigation
Conversation
Page order: a page save never moves an existing page, so a page moved on the source stayed in its old place on the target. A new phase after pages puts each synced page under the source's parent, in the source's place, through the Management API page move (SDK 0.2.2 movePage). Only pages out of place move; pages held by the page phase (target changed, no --overwrite) and pages outside --pages stay put and the rest are ordered around them. After a move the mapping's target version moves forward in every locale and the page is queued for republishing. Preflight lists each move once, not once per locale. Source readiness: when the source's Fetch API (preview) isn't ready the pull is empty, every phase skipped, and the sync exited 0 having synced nothing. Before anything is written, each requested locale is checked: no content items or no pages pulled while the mappings have some is a "Source validation failed" run failure (exit 1, preflight too); nothing pulled and nothing mapped, or under half of what is mapped, is a warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
Two fixes for issues found testing a customer's sync chain on 1.3.1.
Page order (PROD-3164)
A page save keeps an existing page's stored position, so a page moved on the source after its first sync stayed where it was on the target (verify:
siblingOrderMismatch).pageOrderphase after pages (src/lib/page-order/sync-page-order.ts). It reads the target's sitemap live from the Management API, keeps the longest run of pages already in the source's order under each parent, and moves the rest withpageMethods.movePage(TS SDK 0.2.2, endpoint live in prod since 2026-11-13).--overwrite) or pages outside a--pagesscope. The other pages are ordered around them; if that can't fully work, it warns.targetVersionIDmoves forward in every locale, so the next sync doesn't see a target change. The page is queued for republishing in each locale where it was published on both sides.--preflightlists each move once (previously once per locale), and--jsonSummaryreports apageOrderphase.Source readiness (PROD-3212)
When the source's Fetch API (preview) wasn't ready, the pull was empty: every phase printed "Skipping … no data", and the sync exited 0 having synced nothing. With
--syncDeletes, it would have read as everything deleted.src/lib/pushers/source-readiness.ts, checked in the orchestrator before anything is written.Source validation failed, exit 1, preflight included): for a requested locale, no content items or no pages were pulled, but the mappings have entries of that kind.Tests
src/lib/page-order/tests/sync-page-order.test.ts: the planner (order, parent change, root, mapping, fixed pages, dynamic items) and the runner (one move across locales, version bump, republish queue, held pages,--overwrite, preflight, failures).src/lib/pushers/tests/source-readiness.test.tsfull-instance.test.ts: page order runs with no moves on a fresh sync, and an empty source pull on re-sync fails with no writes (sync and preflight).Not yet done
🤖 Generated with Claude Code