Skip to content

fix(release): stop changeversion from reverting the references/openspec gitlink - #303

Merged
Gaubee merged 2 commits into
mainfrom
fix/changeversion-submodule-guard
Oct 6, 2026
Merged

Gaubee merged 2 commits into
mainfrom
fix/changeversion-submodule-guard

Conversation

@Gaubee

@Gaubee Gaubee commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Second identical release regression, now rooted out. Both 06dec8b9 (14.0.0 release) and 7322807d (14.0.1 release) silently reverted the references/openspec submodule gitlink — the second one undid PR #300's v1.14.1 pin minutes after it merged.

Mechanism (found in scripts/changeversion-auto.ts): the stash step deliberately ignores references/openspec (IGNORED_DIRTY_PATHS), but a checkout whose submodule working tree still sits on the pre-rotation tag then rides the later git add -A, so the version commit ships a pin revert.

Fix (completes that original intent):

  • Before staging: git submodule update --init --force --checkout references/openspec syncs the working tree to the recorded gitlink.
  • After staging: refuse to commit if the staged set includes the submodule path — a version commit never legitimately rotates the pin.
  • Restores main's gitlink to v1.14.1 (87c3595) that 7322807d reverted; the CI pin guard re-validates it on this PR.

Evidence: functional simulation in a detached worktree — drift the submodule to v1.13.0 (M references/openspec appears, the exact regression pre-image), run the new sequence, git add -A stages zero submodule changes.

No packages/ code changes → no changeset required (CI Scope confirms).

Gaubee added 2 commits October 6, 2026 15:01
…e references/openspec gitlink

Second identical release regression (06dec8b, then 7322807): the stash
step deliberately ignores the submodule path, so a checkout whose
submodule working tree still sits on the pre-rotation tag rides
`git add -A` and the version commit silently reverts the recorded pin.
Sync the working tree to the recorded gitlink before staging
(`submodule update --init --force --checkout`) and refuse to commit any
staged submodule pointer change — a version commit never legitimately
rotates the pin. Also restores the main gitlink to v1.14.1 (87c3595)
that 7322807 reverted.
…non-skip

A reference-only PR scope (only references/openspec and/or CI scripts
changed) skips Setup pnpm/Install/Prepare — their conditions require
full|scoped — while the four direct-pnpm steps (test:ci, typecheck, warm
cache, installed-CLI smoke) only checked fast_mode != 'skip', so the
reference-only class failed deterministically with 'pnpm' not recognized
(PR #303, twice). Align the four conditions with their setup
dependencies; reference-only PRs now get a green no-op Windows gate while
the ubuntu Fast Gate's reference validation stays authoritative.
@Gaubee
Gaubee merged commit 1042789 into main Oct 6, 2026
13 of 14 checks passed
@Gaubee
Gaubee deleted the fix/changeversion-submodule-guard branch October 6, 2026 08:02
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