Skip to content

feat(sync): let a sync pin its target release branch - #11

Merged
tomorrowflow merged 1 commit into
mainfrom
feat/sync-target-release
Oct 3, 2026
Merged

tomorrowflow merged 1 commit into
mainfrom
feat/sync-target-release

Conversation

@tomorrowflow

@tomorrowflow tomorrowflow commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Problem

The sync always rebases onto the newest upstream release/X.Y.Z branch. Today that branch is release/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-commit release/2026.9.8 patch 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.Z exports SYNC_TARGET_RELEASE.
  • .sandcastle/sync.ts validates the pin before the sandbox starts. It must look like X.Y.Z, the branch must exist upstream (fetched explicitly), and it must not be older than the version main carries; 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's promptArgs.
  • .sandcastle/sync-prompt.md: an empty TARGET keeps 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.md documents the flag.

Evidence

  • Host validation was run against real refs. "" keeps the default. 2026.9.8 and 2026.9.7 are accepted. 2026.9.6 is refused as a downgrade below main's 2026.9.7. 9.8 is refused as not X.Y.Z. 2099.1.1 is refused with "upstream has no release/2099.1.1 branch".
  • The prompt was substituted with sandcastle's own substitutePromptArgs, and the resulting TARGET block was run in bash. An empty value resolved to upstream/release/2026.10.1 (the newest) and 2026.9.8 resolved to upstream/release/2026.9.8. An empty string satisfies sandcastle's missing-placeholder check.
  • node --check on sync.ts, bash -n, oxfmt, check-fork-features (83 present) and git diff --check are clean.
  • Not run: a full pinned sync. That is the next step once 2026.9.8 is published.
  • The commit used --no-verify because the worktree has no node_modules for the pre-commit formatter. Formatting was proven separately with the main checkout's oxfmt --check.

🤖 Generated with Claude Code

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]>
@tomorrowflow
tomorrowflow merged this pull request into main Oct 3, 2026
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.

1 participant