Repository navigation
feat(sync): let a sync pin its target release branch - #11
Merged
Merged
Conversation
The sync always rebased onto the newest upstream release/X.Y.Z branch. On
2026-10-02 that was the fresh 2026.10.1 beta cut, 2005 commits over the
deployed 2026.9.7 line and far beyond one agent iteration, while the
56-commit 2026.9.8 patch cut was the one worth shipping.
`sync-and-deploy.sh --target X.Y.Z` sets SYNC_TARGET_RELEASE. sync.ts
validates it before the sandbox starts (X.Y.Z shape, branch exists upstream,
not older than main's version) and passes it to the prompt as
{{TARGET_RELEASE}}; empty keeps the newest-branch default.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.
Problem
The sync always rebases onto the newest upstream
release/X.Y.Zbranch. Today that branch isrelease/2026.10.1, a beta cut from this morning that isn't on npm yet. It is 2,005 commits over the deployed 2026.9.7 base, far more than one sync-agent iteration can rebase. The release worth shipping is the 56-commitrelease/2026.9.8patch cut, with reliability backports and the config-reload run fix, but the sync had no way to target it.Solution
scripts/sync-and-deploy.sh --target X.Y.ZexportsSYNC_TARGET_RELEASE..sandcastle/sync.tsvalidates the pin before the sandbox starts. It must look likeX.Y.Z, the branch must exist upstream (fetched explicitly), and it must not be older than the versionmaincarries; release branches are independent cuts, so an older one would be a downgrade. The value is passed to the prompt as{{TARGET_RELEASE}}through sandcastle'spromptArgs..sandcastle/sync-prompt.md: an emptyTARGETkeeps the newest-branch default. A pinned target is used as is, checked for existence, and the agent is told not to substitute a newer branch.docs/UPSTREAM-SYNC.mddocuments the flag.Evidence
""keeps the default.2026.9.8and2026.9.7are accepted.2026.9.6is refused as a downgrade below main's 2026.9.7.9.8is refused as not X.Y.Z.2099.1.1is refused with "upstream has no release/2099.1.1 branch".substitutePromptArgs, and the resultingTARGETblock was run in bash. An empty value resolved toupstream/release/2026.10.1(the newest) and2026.9.8resolved toupstream/release/2026.9.8. An empty string satisfies sandcastle's missing-placeholder check.node --checkon sync.ts,bash -n,oxfmt,check-fork-features(83 present) andgit diff --checkare clean.--no-verifybecause the worktree has nonode_modulesfor the pre-commit formatter. Formatting was proven separately with the main checkout'soxfmt --check.🤖 Generated with Claude Code