Repository navigation
Description
Description
The smoke-test dispatch orchestration is not idempotent when a base version is
released through both a candidate pass (X.Y.Z-rcN) and a final pass (X.Y.Z). On the
final pass the ## [X.Y.Z] CHANGELOG heading gets dated before release-core
validation runs, which then fails because it requires the ## [X.Y.Z] - TBD placeholder.
The defect lives in this repo even though it manifests downstream:
.github/workflows/repository-dispatch.ymlis a synced template consumed by
devcontainer-smoke-test; the source/fix belongs here.prepare-changelog(packages/vig-utils/src/vig_utils/prepare_changelog.py) provides
theprepare/finalizesemantics involved:finalizerequires a- TBDentry and is
not idempotent (prepare_changelog.py:386-390), andpreparestacks a new heading
without deduping an existing one.
Observed (0.3.7)
publish-candidate 0.3.7 then finalize-release 0.3.7 were run against the same base
version. The final downstream smoke-test failed at "Release Core / Validate Release Core":
ERROR: CHANGELOG.md does not contain '## [0.3.7] - TBD'
CHANGELOG history on the reused release/0.3.7 branch (smoke-test):
| Commit | Effect on [0.3.7] heading |
|---|---|
| freeze (RC dispatch) | created ## [0.3.7] - TBD |
| deploy (final dispatch) | dated it → ## [0.3.7](…) - 2026-06-22 |
| validate | requires - TBD → exit 1 |
A secondary failure mode also appears: the deploy idempotency check
(grep -q "Smoke-test deploy of <tag>") matches a bullet left inside the stale [X.Y.Z]
section, so Unreleased is not re-seeded and prepare-release aborts on an empty
Unreleased (same class as the already-fixed smoke-test #157).
Root cause
The listener re-runs the whole deploy → prepare-release → release → promote
orchestration on every dispatch against a reused release/X.Y.Z branch and a
per-base-version CHANGELOG entry a prior candidate pass already froze.
Proposed fix (directions)
- Reset the target version entry to
## [X.Y.Z] - TBD(or recreaterelease/X.Y.Zfrom
a cleandev) at the start of each dispatch, making candidate→final on one base version
idempotent. - Make
prepare-changelog finalizea no-op when the entry is already dated for the same
version. - Scope the
deployidempotency check to theUnreleasedsection, not the whole file. - Re-sync the template to
devcontainer-smoke-testafter fixing here.
Refs
Downstream tracking issue: vig-os/devkit-smoke-test#169
Recovery for 0.3.7 performed manually (dev CHANGELOG reset + stale branch delete + re-dispatch).
Activity
test(prepare-changelog): cover idempotent finalize on already-dated h…
fix(prepare-changelog): make finalize idempotent on already-dated hea…
test(prepare-changelog): cover dedup of existing same-version heading
fix(prepare-changelog): dedupe existing same-version heading on prepare
test(prepare-changelog): cover reset-version command and helper
fix(prepare-changelog): add idempotent reset-version command
docs(changelog): note idempotent smoke-test dispatch fix
fix(smoke-test): make release-pipeline templates idempotent on reused…
fix(smoke-test): idempotent release pipeline across candidate→final (#…
fix(ci): idempotent dispatch templates across candidate→final (#174)
fix(ci): branch release/X.Y.Z from post-freeze dev SHA (#618)
fix(ci): anchor changelog PR-body extraction to line-start headings (#…
chore: release 0.3.8 (#179)
chore: release 0.3.8 (#619)
fix(changelog): make prepare-changelog fail closed on content it cann…