Conversation
## Why During the 0.5.0 release, the split workflow failed for the three new inertia companion packages because their split repos didn't exist on GitHub yet — bin/create-split-repos.sh hadn't been re-run since the packages were added. The fix at the time was manual: run the script, then re-trigger the failed workflow runs. This shouldn't be a post-failure manual step. ## What ### bin/create-split-repos.sh - **Single batched API call.** The previous version did N sequential `gh repo view` calls (one per package), taking 30-60s for 77 packages. The new version makes one `gh repo list` call and compares locally, completing in ~1s. - **Optional positional args.** Pass package names to scope the check: `./bin/create-split-repos.sh inertia-react inertia-vue`. With no args, every directory under packages/ is checked (preserves existing behavior). - **--dry-run flag.** Preview what would be created without making any API calls. Used during local testing of this change. - **Validates package directory exists** before attempting to create a split repo, with a warning if not (catches typos in args). - **No local state file.** GitHub is the source of truth; the script fetches fresh on every run. No drift risk, nothing to commit after releases. ### bin/release.sh Invokes `bin/create-split-repos.sh` between the changelog commit and the main-branch push. The split workflow fires on both the main push and the tag push, so the split repos must exist before either. The 1-second cost is trivial relative to the rest of the release. ### .claude/release-process.md - Added new step 9 documenting the auto-invocation (renumbered subsequent steps). - Updated the troubleshooting note for the missing-split-repo case to reflect that this is now rare and to document the new args/dry-run modes. ## Verification Local dry-run (no actual API mutations): - `./bin/create-split-repos.sh --dry-run` → 0 created, 77 already exist, completed in 1.2s. - `./bin/create-split-repos.sh --dry-run inertia-react inertia-vue inertia-svelte` → 0 created, 3 already exist, completed in 0.9s. - `./bin/create-split-repos.sh --dry-run nonexistent-test-pkg` → correctly warns "packages/nonexistent-test-pkg does not exist — skipping". - Simulated would-create path with a temporary fake package dir → correctly printed "Would create marko-php/marko-...". - Both scripts pass `bash -n` syntax check.
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.
Why
During the 0.5.0 release, the split workflow failed for the three new inertia companion packages (
marko-inertia-react,marko-inertia-vue,marko-inertia-svelte) because their split repos didn't exist on GitHub yet —bin/create-split-repos.shhadn't been re-run since the packages were added. The fix at the time was manual: run the script, then re-trigger the failed workflow runs.This shouldn't be a post-failure manual step. The release script should ensure the split repos exist before pushing.
What
bin/create-split-repos.shThree changes, all backwards-compatible (
./bin/create-split-repos.shwith no args still works exactly as before):gh repo viewcalls (one per package), taking 30-60s for 77 packages. The new version makes onegh repo listcall and compares the results locally with grep, completing in ~1s../bin/create-split-repos.sh inertia-react inertia-vue. With no args, every directory underpackages/is checked.--dry-runflag. Preview what would be created without any API mutations.The script also validates each package's local directory exists before attempting to create its split repo, with a warning if not (catches typos in args).
Design note: no local state file. GitHub is the source of truth — the script fetches fresh on every run. No
published-repos.txtto maintain, no drift risk if a repo is created/deleted out-of-band, nothing to commit after releases. Speed comes from batching one API call instead of N, not from caching.bin/release.shInvokes
bin/create-split-repos.shbetween the changelog commit and the main-branch push. The split workflow fires on both the main push and the tag push, so the split repos must exist before either. The 1-second cost is trivial relative to the rest of the release..claude/release-process.mdVerification (all run locally before opening this PR)
./bin/create-split-repos.sh --dry-run→ 0 created, 77 already exist, completed in 1.2s./bin/create-split-repos.sh --dry-run inertia-react inertia-vue inertia-svelte→ 0 created, 3 already exist, completed in 0.9s./bin/create-split-repos.sh --dry-run nonexistent-test-pkg→ correctly warns "packages/nonexistent-test-pkg does not exist — skipping"bash -n bin/create-split-repos.shandbash -n bin/release.shboth pass syntax checkTest plan for the next release
The next time
./bin/release.sh X.Y.Zruns, it will print "Verifying split repos exist for all packages..." between the changelog commit and the main push. If everything is in order, it'll show "Done: 0 created, N already existed" in ~1s and proceed normally.🤖 Generated with Claude Code