Skip to content

fix: allow pending minAppVersion floors ahead of a release#3

Merged
chhoumann merged 2 commits into
mainfrom
fix/pending-min-app-version
Jul 11, 2026
Merged

fix: allow pending minAppVersion floors ahead of a release#3
chhoumann merged 2 commits into
mainfrom
fix/pending-min-app-version

Conversation

@chhoumann

Copy link
Copy Markdown
Owner

A commit on the default branch may legitimately raise manifest.minAppVersion before the release that materializes the new floor into versions.json. The v2 contract required strict equality between the current version's recorded floor and the manifest floor, so any floor bump on master broke every subsequent Prepare and validate run until hand-edited.

This ports the pending-floor semantics from PodNotes' local pipeline (its 2.18.4 fix - the reference implementation this repo was extracted from): the manifest floor must equal the recorded floor or increase from it, and may never fall below it.

Four sites change:

  • validateCurrentVersionFiles: pending-aware; still requires the current version to be recorded
  • materializeVersionFiles: pending-aware; the new release entry materializes the pending floor
  • validateVersionFiles: base root pending-aware; the candidate check stays strict (a release PR always records its floor)
  • release-validate.yml inline gate: base half pending-aware, release half strict

Tag-state checks stay strict throughout because a tag always materializes its floor.

Two prior tests encoded the strict behavior; both now assert the real failure modes (missing record, lowered floor). Three new pending-floor regression tests. 46/46 passing.

Found by Codex review on chhoumann/PodNotes#289 - merging that consumer PR without this would regress PodNotes' pending-floor support.

A commit on the default branch may raise manifest.minAppVersion before the
release that materializes it into versions.json. The contract previously
required strict equality between the current version's recorded floor and
the manifest floor, so any floor bump landed on the default branch broke
every subsequent Prepare and validate run until hand-edited.

Port the pending-floor semantics from PodNotes' local pipeline (its 2.18.4
fix): the manifest floor must equal the recorded floor or increase from it,
never fall below it. Tag-state checks stay strict because a tag always
materializes its floor. Found by Codex review on chhoumann/PodNotes#289.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fe11121dbe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

* @param {string} label
*/
export function assertPendingMinAppVersion(recorded, manifest, label) {
if (manifest !== recorded && compareVersions(manifest, recorded) <= 0) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject lowered history before pending-floor planning

Checked the release-prepare.yml plan job: before it opens the bot PR it only runs release-plan.mjs and release-contract.mjs materialize, not the previous-tag history check. With this predicate, a base where versions.json["2.17.3"] was rewritten from 1.0.0 to 0.9.0 while manifest.minAppVersion stays 1.0.0 is accepted as a pending floor (manifest > recorded), so the generated PR carries the forged history and the pipeline only rejects it after merge in release-validate. Please compare the recorded floor with the current tag/history before accepting recorded < manifest during planning/materialization.

Useful? React with 👍 / 👎.

@chhoumann
chhoumann merged commit 2bf7ebe into main Jul 11, 2026
1 check passed
@chhoumann
chhoumann deleted the fix/pending-min-app-version branch July 11, 2026 10:48
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