Skip to content

fix(release): validate merged release PRs through the pinned contract - #14

Merged
chhoumann merged 1 commit into
mainfrom
fix/validate-contract
Jul 11, 2026
Merged

fix(release): validate merged release PRs through the pinned contract#14
chhoumann merged 1 commit into
mainfrom
fix/validate-contract

Conversation

@chhoumann

Copy link
Copy Markdown
Owner

Rewrites the reusable validate workflow (stage 2) so its version-file semantics come from the pinned release-contract script instead of a second inline implementation, and gives it an explicit recovery path for merged release PRs that failed validation.

Contract consolidation (#6). The validate job now checks out the toolkit at workflows-ref, derives the release-file set from release-contract.mjs files, downloads the version files at the base, release, and previous-tag commits (raw bytes via the contents API - it still never checks out consumer code), and runs the new release-contract.mjs validate-release command: validateReleasePr (branch/title/base/same-repo/changed-files shape) composed with validateVersionFiles (synchronized versions, progression, floor rules including the pending minAppVersion raise from #3) and validatePreviousTagHistory plus tag identity/floor checks. The inline reimplementation of version parsing, floor comparison, recorded-floor lookup, and the pending-floor exception is gone; prepare, validate, and release now share one semantic model. API-shaped forensics (PR provenance, commit structure, tree SHA, ancestry, tag resolution) stay inline, and the recovery-branch + dispatch writes moved to a separate step that only runs after the contract passes.

Recovery path (#9). The EVENT_SHA === releaseSha pin made any post-merge recovery impossible once the default branch moved (PodNotes 2.19.3, chhoumann/PodNotes#291/#293). Validate now accepts exactly two event identities: the merge event (default branch at the merge commit, unchanged predicate) or an explicit workflow_dispatch from the current default-branch head - the same trusted recovery source model stage 3 already uses. Everything else is re-derived from the PR number and fails closed; the stage-3 higher-tag and tag-target checks make a replayed old release inert. The trigger stub template gains the workflow_dispatch recovery trigger and a workflows-ref pin, and the README documents dispatch recovery as canonical with webhook redelivery as the merge-time-exact alternative.

Also included, kept in lockstep with the rewrite:

Fixes #6
Fixes #9

@chhoumann
chhoumann merged commit 2e74259 into main Jul 11, 2026
1 check passed
@chhoumann
chhoumann deleted the fix/validate-contract branch July 11, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant