Repository navigation
ci(release): release the start commit even after the branch moves - #481
Merged
Merged
Conversation
nixuuu
added a commit
that referenced
this pull request
Nov 10, 2026
The alias-checkout test can observe `threadReady` / `idle` before the `createThread` command acknowledgment is persisted. Its final branch switch can therefore correctly fail with “A thread is using this directory.” This is a fixture readiness race: holding that acknowledgment reproduced `idle` with a pending command and the exact refusal; releasing it allowed the switch. No product lock remained held after settlement. Add a shared fixture wait for idle, terminal turns and acknowledged admission commands, including checkout aliases without a worktree ID. Also wait for the worktree inventory to stop reporting busy and, for managed worktrees, provide a scan status. Reuse it in tree setup, branch switching, lifecycle/automation cleanup and local/linked external-worktree adoption. Poll only observations; branch-switch and post-delete/settings cleanup assertions remain direct, with no sleeps or mutation retries. Validation: - `thread-branches.test.ts`, sequential file runs: unchanged baseline 30/30; final version 30/30 (8 tests per run). The natural flake did not reproduce in the baseline; the acknowledgment-gated diagnostic reproduced its failure window. An earlier implementation also passed 30/30 before the external-worktree scan condition was corrected. - All 67 tests in 11 other fixture-consumer files passed, one file at a time, on the final version. - `bun run typecheck`, `bun run lint`, `bun run format:check` and `git diff --check` passed. - Full-suite `check:tmp`, generation checks and web build were not run locally in this focused verification scope. Based on `dev` after #482 merged. CI evidence: https://github.com/itsoltech/canopy/actions/runs/42792779962/attempts/1 Related: #481 Related: #482
This was referenced Nov 13, 2026
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.
Release currently abandons its starting commit when the branch advances before planning or during CI. This keeps nightly (
dev), beta (next) and stable (main) onEXPECTED_SHA, including a manual dispatch whoseexpected_shais an older ancestor. Later commits remain for the next run.Design
EXPECTED_SHAand that it remains an ancestor of the freshly fetched release branch. Recheck ancestry immediately before pushing release refs.repositoryUrloption allows the normal push-access/up-to-date checks to succeed without modifying semantic-release internals. Keep its analyzer, version calculation, tag format and channel notes, including promotion behavior.repositoryUrland verifies access even in dry runs. Generate the same Angular notes with the real repository URL so compare/commit links remain correct. After CI, atomically push only the new tag and changed notes to origin, then create a GitHub draft through the API with the same name, notes and prerelease flag. No branch is pushed.addChannel: []and publication through the existing asset verification stages remain intact.release-${ref}concurrency lock withcancel-in-progress: false. It covers the gap between planning and tagging, so another run of the same branch cannot plan until the current run finishes and its tags/notes are available.EXPECTED_VERSIONand “Same version as planned” still refuse a changed version before publishing.release-revisionartifact;workflow_run.head_shaalone is insufficient for a dispatch of an older commit. Preserve bootstrap, manual stable tags, no-release skips and cancellation after failed checks.Verification
bun install --frozen-lockfile— passed.TMPDIR=/var/tmp bun test scripts/release.test.ts— 14 tests passed. Real local git fixtures cover branch movement before planning and during checks for all three channels, exact tag targets, consecutive numbering, remote branch preservation, persisted notes, pinned draft content, planned-version rejection, rewritten history and the full nightly → beta → stable promotion cycle. Draft creation is injected; no GitHub release is created.scripts/promote.test.ts,scripts/promotion-policy.test.ts,scripts/promotion-attribution.test.ts) — 48 tests passed.scripts/mobile-release.test.ts— 17 tests passed;scripts/release-upload.test.ts— 10 tests passed.bun run typecheck, subsequent scripts-only TypeScript check,bun run lint,bun run format:check, and actionlint 1.7.12 with ShellCheck 0.11.0 on all three changed workflows — passed. Full integration/build CI and real publication are left to GitHub; no E2E/live runs or Release dispatches were performed.Risks and safe rollout verification
GitHub Actions scheduling, artifact handoff and real publication cannot be reproduced by these local fixtures. Existing tag/notes conflicts fail the atomic push without replacing refs. Changes on other release channels can still invalidate a planned version and fail safely. As before, a GitHub API failure after the git push can leave a tag without a draft. Mobile now requires the SHA artifact from its exact parent run; a pre-change Release still in flight will lack it and its mobile follow-up will fail closed.
After merge, observe the next naturally scheduled nightly. Record its starting SHA, then allow normal merges to land during checks. Confirm the release tag, manifest commit, image revision and Mobile checkout still identify the starting SHA; the GitHub release must remain a draft until all assets/feeds pass verification. Confirm the next scheduled run includes the later commits with the next nightly number. This needs no manual tag, force push, Release dispatch, or repository-settings change.