Skip to content

emrg: no guard asks whether a release is owed at all #2957

Open

Description

@pm25coder

What was observed

This repository has five release guards, and every one of them starts from a tag:

guard the question it puts
scripts/check-release-tag.py does this tag name the version the tagged tree declares?
scripts/check-release-published.py is this tag published — run, release, draft/prerelease, assets?
scripts/check-release-orphan-tags.py is any tag on the repository published-less?
scripts/check-release-artifact-version.py does this artifact declare the claimed version?
scripts/check-release-prompt.py does this artifact carry the tree's prompt?

Not one of them asks whether a tag should exist. Checked by reading each guard's argument list: the first two and the last two take a tag or an artifact as an argument, and the fleet view enumerates tags that are already there. A tree that declares a version nothing has tagged is therefore invisible to all five — and that is not a hypothetical state.

Measured on this checkout at master d5b17fea:

emrg/__init__.py        __version__ = "0.3.59"
git describe --tags     v0.3.58
git rev-list --count v0.3.58..master    9

So nine merged commits, including two that change what every installation reads (#2944's submission-pace arithmetic and #2948's corrected index-guard failure line), are on master and reach no host, because a host only gets them from a published release and nothing published declares 0.3.59.

Why it matters

The condition is noticed today by a person or a cycle happening to look. The last two releases were each opened by hand, and each issue had to re-derive the same facts from scratch: that master is ahead of the newest tag, by how many commits, and that a bump is what closes the gap. That is a reading re-derived per release, which is the same argument that produced check-release-artifact-version.py and check-release-prompt.py in the first place.

It is also the one failure in this chain that gets worse with time rather than loud: every further merge adds commits a host cannot install, and nothing turns red. check-release-orphan-tags.py exists because three published-less tags were once found by hand; this is the same shape of question one step earlier, where no tag exists to ask about.

What the fix must satisfy

  1. One command answers "does this tree declare a version no tag carries?" — reading the declaration from emrg/__init__.py (the same file and anchored shape check-release-tag.py and tests/test_version_sync.py use) and the tag list from the repository, with no network.
  2. The answer names the three facts a release request needs: the declared version, the newest tag, and how many commits sit between them. A verdict without those numbers cannot be acted on.
  3. The family's exit contract, unchanged: 0 nothing is owed, 1 a release is owed (both versions printed), 2 nothing could be measured — no declaration, no tags, a git failure, an unparsable tag. Exit 2 is never a pass, and a guard that cannot read its subject must not report agreement.
  4. Version comparison is by numeric parts, not by string or by tag date: 0.3.10 is newer than 0.3.9, and a tag's commit date says nothing about which version is later. A tag that does not parse as three dotted numbers is reported and skipped, never sorted in as though it were one.
  5. It is a host-side screen, not a CI gate. Wired into CI it would be red on every unreleased master, which turns the release cadence into a permanently failing check and teaches readers to ignore it. The acceptance is a command a host runs before cutting a release, in the same role bump-version.py --check and check-release-tag.py already play.

Acceptance

  • On this checkout the guard reports exit 1, naming 0.3.59, v0.3.58 and the commit count between them.
  • On a tree whose declared version is the newest tag's version it reports exit 0 and says nothing is owed.
  • With no version declaration, no tags at all, or a git that cannot run, it reports exit 2 and never 0.
  • A tag list containing v0.3.9 and v0.3.10 picks v0.3.10 as the newest.
  • No existing guard is changed and no CI workflow is touched.

Activity

  1. pm25coder commented on Nov 18, 2026

    @pm25coder
    CollaboratorAuthor

    Handled by #2958

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions