Skip to content

Share apt-install and the release steps across repositories - #25

Merged
GavinLucas merged 9 commits into
mainfrom
feature/apt-install
Nov 19, 2026
Merged

GavinLucas merged 9 commits into
mainfrom
feature/apt-install

Conversation

@GavinLucas

@GavinLucas GavinLucas commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What

A shared actions/apt-install composite action, for any job that installs from the runner image's apt sources. It combines what the two existing local implementations each got right:

  • Downloads are cached and checked. The downloaded .deb files are cached under a key naming each package, version and architecture. Each restored file is checked against the SHA-256 the signed index lists before apt installs it. This part comes from quaffed's local action unchanged.

  • Each apt call is bounded and retried, which neither repository did fully:

    • a timeout on each call, so a hung mirror fails in minutes, not at the job's limit;
    • apt's Acquire::Retries=3, for a download refused for a moment, such as a 503;
    • a fresh read of the package lists after a failed install, because an index naming a version the pool doesn't hold yet (a 404) is not fixed by downloading again;
    • five attempts in all, 15 seconds apart.

    A step that still fails says what it was doing and how the last attempt ended, and names a timeout as one.

Why

  • quaffed's Debian package (amd64) job failed on a pull request because the mirror returned 503 Service Unavailable once, and its local action made one attempt.
  • send-to-influx hand-wrote a five-attempt loop for the stale arm64 index. Earlier, an apt-get update with no bound hung one of its runs for over twelve minutes.

Tested

  • tests/test_apt_install.py runs the shipped retry.sh, and the action's step that reads the package lists, under bash -eo pipefail. It uses stand-ins for apt-get, sudo, timeout and sleep. It covers:
    • the bound and the retry flag on every call;
    • a failed install reading the lists again before its next attempt;
    • all attempts failing, with the exact error;
    • a timeout named as one;
    • a failed re-read of the lists not ending an attempt early;
    • the plan step retrying, and failing, when the lists can't be read.
  • Locally, the whole suite passes (107 tests), and actionlint and shellcheck are clean.
  • Not tested: a real mirror, the cache, and the install step's check of cached files against the index. The check reads apt's own archive directory, so a test would need root. That code is unchanged from quaffed's action, where it runs in CI.

After merge

Callers reach it once a release moves v2. It adds a new action and changes nothing existing, so a minor release, v2.1.0, fits. Then quaffed and send-to-influx each move to it in their own pull request:

  • quaffed deletes its local action, and updates the test and the doc that require all apt installs to go through it;
  • send-to-influx replaces its hand-written retry loop.

The installs inside send-to-influx's debian:12 container can't use an action, and are not covered.


Added: the shared release steps

Three more shared pieces, for the steps quaffed's and send-to-influx's release workflows each wrote for themselves:

  • actions/release-preflight checks that the release is this organisation's and that its tag is the declared version.
    • Versions are compared as text, after a tag-prefix input that defaults to v, the form new repositories tag with. send-to-influx, which tags a bare 6.2, passes tag-prefix: ''. The input-defaults premerge job shows on GitHub's runner that an input given as '' arrives empty and does not fall back to the default, and keeps showing it.
    • A release with major version 0 must be marked pre-release, as decided for every repository.
  • actions/release-attach attaches the built files, then reads each one back from the release and compares it with the build.
    • A file of the same name already on the release is replaced, as decided: preflight lets through only releases that should be built, so a file already there means this run is recovering from an earlier failure.
    • An identical file is left alone.
    • files: takes whitespace-separated paths or globs.
    • Publishing somewhere else as well, such as pushing to the package repository, would be a change in this one place.
  • .github/workflows/release-cancelled.yaml turns a cancelled release job into a failure, so a timeout doesn't end the release silently.

Tested: tests/test_release_actions.py runs each step's shipped script, with stand-ins for gh and curl sharing a fake release on disk. It covers:

  • every preflight refusal, including a two-part version and the pre-release rule;
  • attaching, an identical file left alone, a different file replaced, an unfinished upload replaced, globs, a missing file, a refused upload with GitHub's answer, and a release serving the wrong bytes;
  • the cancelled-release failure.

Locally, all 132 tests pass and actionlint is clean. Not tested: GitHub's real upload, delete and download endpoints. Nothing here runs on a real release until a caller uses it.

After merge: quaffed's and send-to-influx's release workflows each move to these in their own pull request, along with the apt-install move.

Not tested before merge

release-attach has not run against GitHub's real release API: the tests use a fake release. It first runs for real on the first quaffed or send-to-influx release after either moves to it. If that fails, the release run fails without attaching anything, and a re-run recovers, since a re-run may replace what an earlier one left. A CI job testing against a throwaway draft release was considered and not added.

Two repositories installed from apt in their own ways, and each had
learned half of what a flaky Ubuntu mirror needs.  One cached the
downloaded packages and checked each restored file against the signed
index, but made each apt call once, so a mirror answering 503 for a
moment failed a package build before anything was built.  The other
retried an install five times, because the arm64 ports mirror can list a
version its pool does not hold yet, and moved a service to a container
after apt-get update hung a run for over twelve minutes.

This action takes the cache and the index check, and bounds and retries
each apt call.  A timeout ends a hang, which nothing else bounds inside a
composite action.  apt's own Acquire::Retries covers a refused download.
A failed install reads the package lists again before the next attempt,
since a stale index is not fixed by downloading again.  The whole is
tried five times, 15 seconds apart, and a step that still fails says
what it was doing and how the last attempt ended, naming a timeout as
one.

The retry logic is in retry.sh beside the action, sourced by its steps,
so the tests drive the shipped code against stand-ins for apt-get, sudo,
timeout and sleep under bash -eo pipefail, as GitHub runs the step.

Signed-off-by: Gavin Lucas <Gavin@L337.org>
@github-actions

Copy link
Copy Markdown

Claude review: changes requested

Findings

1. Bug: calling the action twice in one job leaves the first call's cache entry permanently useless, with no warning (actions/apt-install/action.yml:91-97, :73)

The install step deletes every .deb in /var/cache/apt/archives that is not in its own plan. The actions/cache post steps for both calls run at job end, and both save whatever *.deb is left in that directory at that time.

Take a job that installs build dependencies with one call and test dependencies with a later call:

  1. Call 1 downloads A's packages.
  2. Call 2's loop deletes them as "unused" and installs B.
  3. At job end, call 2's post step saves B's files under key2, and call 1's post step saves B's files under key1.

On the next run, key1 is an exact hit (cache-hit: true). Every file it restores is deleted as unused, and A is downloaded again. The README says an exact entry is never overwritten, so this repeats on every run. None of the existing warnings fire, because the empty-directory warning sees B's files.

The README does not tell callers to use the action only once per job. Possible fixes:

  • Refuse a second call in the same job, for example with a marker in $RUNNER_TEMP, and say so in the README.
  • Or give each call its own directory, using -o Dir::Cache::Archives=…, so one call never deletes another's files.

2. Bug: a multi-line packages: input installs only its first line, then fails the step with an unrelated error (actions/apt-install/action.yml:43, :85, :63-66)

read -ra packages <<<"$PACKAGES" reads only the first line. I checked this locally: with $'musl-tools\nlintian\n' it gives the single word musl-tools. The cache prefix is built from the raw $PACKAGES, so the newlines end up in $GITHUB_OUTPUT as lines lintian and - with no =. The runner then fails the step with "Invalid format", which has nothing to do with the real cause.

A YAML block scalar (packages: | with one package per line) is a natural way to write a list, and so is > (which keeps a trailing newline). The input description says "separated by spaces", but nothing enforces it.

The raw $PACKAGES in the key also leaves it exposed to actions/cache's 512-character key limit. A long package list would fail the restore step with a validation error.

Fix: split on any whitespace, for example read -ra packages -d '' <<<"$PACKAGES" || true or mapfile plus word splitting. Then build the prefix from the normalised list, or from a short hash of the sorted names, not from the raw input.

3. Maintainability: the most intricate step has no test, and no CI job runs the action (tests/test_apt_install.py:1-8, README.md:317, .github/workflows/premerge.yaml:51-54)

The tests cover retry.sh and the plan step against a stub apt-get. Nothing covers the install step's loop over /var/cache/apt/archives: the filename decoding (%3a), the plan match, the SHA-256 check and the deletions. Nothing exercises the real apt-get -s output, the chown, or the cache restore and save.

The test docstring says this cannot be tested because the step reads apt's own archive directory. Two ways around that:

  • Take the directory from a variable, so a test can point the loop at a scratch directory with a stub apt-cache.
  • Add a premerge.yaml job that runs ./actions/apt-install on ubuntu-latest with a small package, the way action-pins runs its own action from the commit under review.

Two places list what this repository's CI covers, and neither mentions apt-install now: README "Changing anything here" ("…and the action-pins check over sample references (tests/)") and the shared-behaviour job comment in premerge.yaml. Either update both, or reword them so they don't list every check.

4. Maintainability (recorded state): actions/apt-install/retry.sh:5-8

"each seen in this organisation's CI" and "(a 404 on arm64's ports mirror)" record what was observed on particular runs. The reasons for the timeout, the retries and the re-read stand without them. The commit message already records the incidents ("…moved a service to a container after apt-get update hung a run for over twelve minutes"), and that is where this kind of record belongs. Drop the history and keep the three failure modes as the rationale.

What I checked

  • Every file in the range: README.md, actions/apt-install/action.yml, actions/apt-install/retry.sh, tests/test_apt_install.py. I also read the surrounding premerge.yaml, the existing tests and the README sections the change sits beside.
  • The Inst-line sed pattern against real apt-get -s install --no-install-recommends lintian musl-tools output on Ubuntu 26.04. All 112 Inst lines parsed, including [all] packages.
  • apt-cache show "pkg:all=ver" and an epoch version (vim-tiny:amd64=2:…). Both return SHA256 lines and exit 0 under pipefail.
  • shellcheck on retry.sh: clean.
  • The retry logic by reading it:
    • The || status=$? pattern keeps -e from cutting an attempt short.
    • There is no sleep after the last attempt.
    • The best-effort re-read after a failed install never ends an attempt early.
    • The 124 timeout is named in both the warning and the error.
    • The tests' stub argument parsing matches the calls.
  • actions/cache is pinned by SHA, and package names go through env:, not expression interpolation.

What I did not check

  • I could not run the pytest suite: uvx and pytest are not installed in this environment.
  • I did not run the action on a real runner, so the chown, cache restore and save, and the hash-mismatch path are reviewed by reading only.
  • I did not run actionlint.

full review of c80a7f3127c8..1361af3a0eca. Run.

…a runner

Two calls in one job shared apt's archive directory, which the cache saves
when the job ends.  The later call deleted the earlier one's files as
unused, so the earlier call's entry was saved holding the later call's
files, and every run after restored files it deleted and downloaded
again.  Each call now downloads into a directory named for the packages
it was asked for, through Dir::Cache::archives, and that directory is the
one its cache entry holds.

A package list written one to a line, as a YAML block scalar gives it,
installed only its first line, and the raw newlines broke the step's
output.  The list is now split on any whitespace.  The cache key is built
from a hash of the sorted names, not the raw input, so a long list cannot
reach the key's length limit.

The install step's check of cached files against the index is now tested
against a scratch directory and a stand-in apt-cache.  A premerge job runs
the action itself on a runner, twice in one job, and checks each call kept
its own files, which no stand-in can show.  retry.sh keeps the three ways
a mirror fails as its reasons, and leaves the incidents to the history.

Signed-off-by: Gavin Lucas <Gavin@L337.org>
@GavinLucas

Copy link
Copy Markdown
Contributor Author

All four points are fixed in 0464624.

  1. Two calls in one job: confirmed by reading the code, and fixed. The install loop deletes every file outside its own plan, from a directory the cache saves at the end of the job. Each call now downloads into its own directory under /var/cache/apt/apt-install/, named from a hash of the sorted package names and passed to apt as Dir::Cache::archives. Its cache entry holds only that directory. Each call also has its own plan file. The new apt-install premerge job runs the action twice in one job and checks that each call kept its own file.

  2. A package list one to a line: confirmed and fixed. The list is now split on any whitespace, so a block scalar and a space-separated line give the same plan and the same key. An input that names no package is an error that says so. The key's prefix is a hash of the sorted names, not the raw input, so a long list cannot reach the key limit.

  3. No test of the install loop, and no run on a runner: fixed. The install step reads its directory from the plan step, so a test can point the loop at a scratch directory, with a stand-in apt-cache serving the index's SHA-256. The tests cover:

    • a matching file being kept, with an epoch version's %3a decoded;
    • a mismatched file being deleted, with the warning and the gh cache delete advice;
    • a file outside the plan being deleted as unused;
    • the warning when nothing is left to cache;
    • the Dir::Cache::archives argument.

    The new premerge job runs the real action on ubuntu-latest. The README's account of this repository's CI, and the shared-behaviour comment, now mention both.

  4. The incident history in retry.sh: fixed. The incidents are removed, and the three ways a mirror fails are kept as the reasons. The incidents stay in the first commit's message.

Locally: the 112 tests pass, and actionlint and shellcheck are clean. The apt-install job's first run is on this push.

@github-actions

Copy link
Copy Markdown

Claude review: approve

Resolved

  1. Two calls in one job (action.yml): each call now downloads into /var/cache/apt/apt-install/<hash of sorted names>. That directory is passed to apt as Dir::Cache::archives (retry.sh). The call's plan file and its cache path are per directory too. One call can no longer delete another's files. The new apt-install premerge job runs the action twice and checks each call kept its own file.
  2. Multi-line packages: (action.yml): read -ra packages -d '' <<<"$PACKAGES" || true splits on any whitespace. An input with no names fails with a clear error. The key prefix is a hash, so the 512-character key limit cannot be reached. Tests cover a block scalar against a spaced list (same prefix and key) and the empty input.
  3. No test of the install loop and no CI run (tests/test_apt_install.py, premerge.yaml): the install step now takes APT_ARCHIVES and PLAN from the plan step's outputs, so the tests can point it at a scratch directory with a stand-in apt-cache. They cover keep, hash-mismatch delete with the gh cache delete advice, unused delete, %3a decoding, the nothing-to-cache warning, and the Dir::Cache::archives argument. The real action also runs on ubuntu-latest. The README's CI description and the shared-behaviour comment are updated.
  4. Incident history in retry.sh: removed. The three failure modes remain as the rationale.

Still open
None.

Declined
None.

New

  • Preference, action.yml nothing-left-to-cache warning (the ::warning:: text at the end of the Install step). The warning still lists "a clean hook" as a cause of an empty directory. The header comment now says the per-call directory keeps files "out of reach of an image's hooks that empty apt's own". Such hooks run a bare apt-get clean against the default archive directory, so they can no longer empty this one. Only APT::Keep-Downloaded-Packages, which is global config, still can. I did not check this against a real image hook. Dropping "or a clean hook" would make the message agree with the header comment.
  • Preference, tests/test_apt_install.py:9-11: import hashlib is separated from the other imports by a blank line. This is cosmetic only.
  • No bugs found in the new commits.

What I checked

  • The whole delta: action.yml, retry.sh, the tests, the premerge.yaml job and the README edit.
  • The apt_install_once handling of the empty archives array under set -u: "${archives[@]}" on an empty array is safe in the bash versions GitHub runners ship.
  • The plan, restore and install steps' output wiring.
  • The premerge job's assertions.
  • The new comments for recorded state: none found. The README's list of CI checks was an option the earlier review offered ("update both").

What I did not check

  • I could not run pytest: it is not installed here.
  • I did not run the apt-install premerge job. The job assumes sl and figlet are absent from the runner image and that each brings in no other package that has to be downloaded. If either assumption fails, the job fails on its file-count check.
  • I did not run actionlint or shellcheck.

delta review of 1361af3a0eca..04646248a75b. Run.

Each call's archive directory is its own, which an image's hooks that
empty apt's default one never reach, so only APT::Keep-Downloaded-Packages
can still leave it empty.  The warning now names only that.  The test
file's imports lose a stray blank line.

Signed-off-by: Gavin Lucas <Gavin@L337.org>
@GavinLucas

Copy link
Copy Markdown
Contributor Author

Both preferences are fixed in e494324. The warning now names only APT::Keep-Downloaded-Packages, which matches the header comment, and the stray blank line among the test imports is gone.

@github-actions

Copy link
Copy Markdown

Claude review: approve

Resolved

  • Both preferences from the previous review are fixed in e494324. The nothing-left-to-cache warning in actions/apt-install/action.yml:150 now names only APT::Keep-Downloaded-Packages, which matches the header comment. The stray blank line between the imports in tests/test_apt_install.py is gone.

Still open
None.

Declined
None.

New
None. The delta is one warning string and one blank line. A grep for "clean hook" finds no remaining mention anywhere in the repository, so no other text contradicts the new wording. The new warning text records no state that could go stale.

What I checked

  • The full delta (2 files).
  • The repository for leftover "clean hook" references.

What I did not check

  • I did not run pytest, actionlint, shellcheck or the premerge jobs. Neither changed line affects behaviour: one is warning text and the other is whitespace.

delta review of 04646248a75b..e494324c4c75. Run.

…release

Two repositories release a .deb from a published GitHub release, each with
its own copy of the same three steps, which had drifted.  Shared, a change
to how a release is published - pushing to the package repository rather
than leaving it to pull - is a change in one place.

release-preflight checks the release is this organisation's and that its
tag is the declared version.  Versions are compared as text after a
tag-prefix input, because one repository tags v1.2.3 and another tags 6.2;
parsing them would have to know both forms.  A major version of 0 is
always a pre-release, so such a release must be marked one, read from the
release when the step runs so that ticking the flag and re-running is
enough.

release-attach attaches the built files and reads each back from the
release to compare with the build.  A file of the same name already on
the release is replaced rather than refused: preflight lets through only
releases that should be built, so one there means an earlier run of this
release failed after attaching it, and this run is recovering.  An
identical file is left as it is.

release-cancelled turns a release job that ended as cancelled, as a
timeout leaves it, into a failure, since a cancellation raises no
notification and a release runs unattended.

Signed-off-by: Gavin Lucas <Gavin@L337.org>
@GavinLucas GavinLucas changed the title Share an apt-install action that retries a failing mirror Share apt-install and the release steps across repositories Nov 19, 2026
@github-actions

Copy link
Copy Markdown

Claude review: approve

Resolved
None. The previous review had no open findings.

Still open
None.

Declined
None.

New
Nothing blocks a merge. The delta adds the release-preflight action, the release-attach action, the release-cancelled workflow, their tests and the README section. The three points below are all preferences.

  • preference, actions/release-attach/action.yml (upload curl call): name=$name goes into the URL unencoded. A file name with &, # or % would be misparsed. .deb names don't contain these, and the action's stated use is dist/*.deb. Either URL-encode the name or state the limit in the files input description.
  • preference, tests/test_release_actions.py (CURL stub): the new asset id is wc -l assets + 100. After a delete, the next upload can reuse a live asset's id. The current tests never delete one asset and then upload two, so none hits this. A counter file would make the stub robust against a later test that does.
  • preference, actions/release-attach/action.yml:46: read -ra words -d '' and matches=($word) work. Shellcheck flags words as SC2154 (words referenced but not assigned) on this construct. CI's actionlint run does not lint action.yml files, so nothing fails. Anyone running shellcheck by hand on the extracted script will see a false warning.

I found no stale recorded state in the new comments, README text or action descriptions. They state rules, and the tests hold the behaviour they describe. The premerge job runs pytest tests, so the new test file runs in CI. The new workflow has timeout-minutes and permissions: {}, as the repository's own hygiene rules expect.

What I checked

  • The full delta (5 files), read line by line.
  • The README text against the behaviour of the two actions and the workflow.
  • The test stand-ins' logic against the scripts under test.
  • The extracted action scripts with shellcheck.
  • premerge.yaml, to confirm the tests and linting cover the new files.

What I did not check

  • I did not run pytest. It is not installed here and uvx is unavailable, so I traced the tests by reading them.
  • I did not run actionlint.
  • I did not run the actions against real GitHub, so the upload endpoint, asset states and the Accept header download behaviour are untested here.

delta review of e494324c4c75..054d5fb6c51b. Run.

A name holding &, # or % went into the upload URL as it was, where GitHub
would read it as more than one parameter, or a fragment.  It is now
percent-encoded.  The fake release in the tests numbers its assets from a
counter, so a delete followed by two uploads cannot reuse a live id, and
words is declared before read fills it, so shellcheck reads it as assigned.

Signed-off-by: Gavin Lucas <Gavin@L337.org>
@GavinLucas

Copy link
Copy Markdown
Contributor Author

All three preferences are fixed in 9238505.

  • The upload URL: the file name is now percent-encoded with jq's @uri. A new test attaches a&b#1%.deb and checks it reaches the release whole. Names can't hold whitespace, because files: is split on it and the asset listing is read by field, so the input's description now says so.
  • The fake release's asset ids: they come from a counter, so a delete followed by two uploads can't reuse a live id.
  • The shellcheck warning: words is declared before read fills it.

Locally, all 133 tests pass and actionlint is clean.

@github-actions

Copy link
Copy Markdown

Claude review: approve

Resolved

  • Upload URL: release-attach/action.yml now percent-encodes the name with jq @uri. The new test test_a_name_url_syntax_would_split_reaches_github_whole attaches a&b#1%.deb. It asserts the encoded URL and that the asset is served under its whole name.
  • Stub asset ids: the fake release in tests/test_release_actions.py now takes ids from a next-id counter, so an id is never reused after a delete.
  • Shellcheck SC2154: words=() is declared before read.
  • The files description now says a name cannot hold whitespace.

Still open
None.

Declined
None.

New
Nothing blocks a merge. I have one preference.

  • preference, actions/release-attach/action.yml, the new comment above encoded=: it says a name holding "a space" reaches GitHub as one parameter. The input description says names cannot hold whitespace, because files: is split on it and the asset listing is read by field. The comment overstates what the action supports. Drop "or a space" so the two agree.

I found no recorded state in the added comments or descriptions.

What I checked

  • The delta in action.yml and the test file, read line by line.
  • The stub's decoding: ${encoded//%/\\x} followed by printf %b turns a%26b%231%25.deb back into a&b#1%.deb, so the test's assertions should hold. This is a reading of the escaping, not a run.
  • That the new next-id counter works with assets that tests pre-seed with their own ids.

What I did not check

  • I did not run pytest or actionlint. I took the 133 passing tests from the author's comment.
  • I did not run the upload against real GitHub.

delta review of 054d5fb6c51b..923850596353. Run.

@GavinLucas

GavinLucas commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

The comment is fixed in c32bd2e: it now names only &, # and %, which matches the input's description. It's a comment-only change. (This reply first named the wrong commit, because the edit hadn't applied when I posted it.)

The comment named a space among the characters encoding lets through,
but a name cannot hold whitespace: files is split on it, and the asset
listing is read by field, as the input's description says.

Signed-off-by: Gavin Lucas <Gavin@L337.org>
@github-actions

Copy link
Copy Markdown

Claude review: approve

Resolved

  • The one open preference from the previous review is fixed. The comment above encoded= in actions/release-attach/action.yml now names only &, # and %, so it agrees with the files input description, which says names cannot hold whitespace.

Still open
None.

Declined
None.

New
None. The range is one comment-only line in actions/release-attach/action.yml. It changes no code and no tests. The new comment states a rule and its reason, not recorded state.

What I checked

  • The full delta between 9238505 and c32bd2e. It is that single comment line.

What I did not check

  • I did not run pytest or actionlint. The change is comment-only, so neither should be affected.

delta review of 923850596353..c32bd2e5e694. Run.

A repository's tags only have to be consistent with its own history, so
both v1.2.3 and a bare 6.2 are supported, and each repository says which
it uses.  New repositories use v, but the default stays none: a
repository with bare tags would otherwise have to pass an explicit empty
string, and GitHub documents a default only for an input that is not
given, not for one given as empty.  The one runner report on the point
is for reusable workflows, open and unanswered.  A test holds the
default, so a later change to it is made knowingly.

Signed-off-by: Gavin Lucas <Gavin@L337.org>
@github-actions

Copy link
Copy Markdown

Claude review: approve

Resolved
None. The previous review left nothing open.

Still open
None.

Declined
None.

New
None. The range touches three files:

  • README.md now gives the prefix guidance: new repositories pass tag-prefix: v, and a repository with bare tags leaves it out.
  • actions/release-preflight/action.yml has a comment and an input description that give the reason the default is none. They agree with the README and with the default: '' on the input.
  • tests/test_release_actions.py adds test_the_prefix_defaults_to_none. It reads the YAML and asserts the default is "". That holds the stated rule in code. yaml, ROOT and PREFLIGHT are all defined earlier in the file.

The new text states rules and their reasons, not recorded state. The remark that GitHub does not document how an explicit empty input interacts with a default is the reason for the design, not a measurement. The comment says "v is what new repositories use", which is a convention, not a count.

What I checked

  • The full delta between c32bd2e and 9328f53.
  • That the test's imports and constants exist.

What I did not check

  • I did not run pytest, because it is not installed in this environment.
  • I did not run actionlint.
  • I did not verify GitHub's behaviour for an empty input against a default. The change presents that as undocumented, not as a tested fact.

delta review of c32bd2e5e694..9328f539ed60. Run.

release-preflight is to default tag-prefix to v, the form new repositories
tag with, leaving a repository with bare tags to pass tag-prefix: ''.
That works only if an input given as an empty string reaches the action
empty, and GitHub documents a default only for an input that is not
given.  A probe action, called both ways from this repository's own CI,
shows which it is, and keeps showing it, so a change in GitHub's
behaviour fails here before a release relies on it.

Signed-off-by: Gavin Lucas <Gavin@L337.org>
@github-actions

Copy link
Copy Markdown

Claude review: changes requested

Resolved
None. The previous review left nothing open.

Still open
None.

Declined
None.

New

  1. Bug (wrong premise, so the check guards nothing). .github/actions/input-default-probe/action.yml:3-7 and .github/workflows/premerge.yaml:113-115 say release-preflight defaults tag-prefix to v and that a bare-tag repository opts out by passing ''.

    • The current code says the opposite. actions/release-preflight/action.yml:23-26 has default: '', and its description says "None by default". README lines 87 and 103-104 say new repositories pass tag-prefix: v and bare-tag repositories leave it out. The previous round added test_the_prefix_defaults_to_none to hold exactly that.
    • Nothing relies on an empty value overriding a default, because the default is already empty. The probe has its own default: 'v', so it tests a scenario the repository does not use.
    • Its failure message, "differently from how release-preflight's tag-prefix relies on", is false. A future failure would send someone looking for a dependency that does not exist.
    • Fix: either delete the probe, the input-defaults job and the comments, or change the design back to a v default and update the action, README and test. The first fits the current design better.
  2. Maintainability (comment gives a reason that no longer applies). The probe description and the comment at .github/actions/input-default-probe/action.yml:1-2 and :5-7 tie the probe to a dependency on GitHub's undocumented behaviour. Deleting the probe, as in item 1, resolves this. If the probe stays, its description must say what it actually tests.

  3. Preference. A premerge job that checks out the repository and runs two probe steps to test GitHub's platform behaviour adds CI time and a permanent maintenance surface. That is hard to justify when no code depends on the result.

What I checked

  • The full delta, which adds the probe action and the input-defaults job.
  • release-preflight/action.yml, to compare its default with the claim.
  • The README references to tag-prefix.

What I did not check

  • I did not run the workflow or actionlint, and I did not confirm GitHub's behaviour for an empty input against a default.

delta review of 9328f539ed60..100fdd399913. Run.

…de it

The probe, run on GitHub's runner, shows an input not given takes its
default and one given as an empty string arrives empty.  So the default
can be v, what new repositories tag with, and a repository with bare
tags passes tag-prefix: '' without falling back to v.  A test ties the
default to the probe's job, so the one is not changed without the other.

Signed-off-by: Gavin Lucas <Gavin@L337.org>
@GavinLucas

Copy link
Copy Markdown
Contributor Author

release-preflight's tag-prefix now defaults to v (commit 918b6c4). New repositories tag v1.2.3 and pass nothing; a repository with bare tags, such as send-to-influx's 6.2, passes tag-prefix: ''.

GitHub documents a default only for an input that isn't given, so whether '' overrides the default wasn't known. The new input-defaults premerge job calls a probe action both ways, and on 100fdd3 its log shows:

  • not given, the input arrived as 'v';
  • given as '', it arrived as ''.

The job keeps running, so if GitHub's behaviour changed, this repository's CI would fail before any release relied on it.

@github-actions

Copy link
Copy Markdown

Claude review: approve

Resolved

  • Previous item 1 (the probe guarded a premise the code did not hold): actions/release-preflight/action.yml now has default: 'v', so a bare-tag repository really does depend on tag-prefix: '' overriding the default. The probe's default: 'v', its error message and the premerge job comments now describe how the action is actually used.
  • Previous item 2 (comments giving a reason that no longer applied): the comments in the probe, the premerge job, the preflight header and the README now match the code.
  • Previous item 3 (preference: the job protects nothing): this no longer applies. The job now guards a real dependency on GitHub behaviour that is undocumented, and its failure would stop CI before a release depended on it.

Still open
None.

Declined
None.

New
None. I found nothing that should block a merge. Two small notes, neither a finding:

  • tests/test_release_actions.py reads the premerge job's with blocks to check that the empty-value step exists. That ties the test to the workflow's shape, but it is a reasonable guard against the probe being removed or edited so it no longer tests the case.
  • The new README sentence about input-defaults is a rule with its reason, not recorded state, so I am not raising it.

What I checked

  • The full delta: README, release-preflight/action.yml, and the test.
  • The probe action and the input-defaults job in premerge.yaml.
  • That PREFIX is passed to the script through env, so an empty prefix gives $PREFIX$VERSION equal to the bare version.
  • That the default, the README, the comments, the probe and the test all agree on v, and that none still says the default is none.

What I did not check

  • I did not run the workflow, actionlint or the tests.
  • I did not independently confirm GitHub's behaviour for an empty input. I am relying on the 100fdd3 log in the PR comment, which shows 'v' when the input is not given and '' when it is given as empty.

delta review of 100fdd399913..918b6c4e98a7. Run.

@GavinLucas

Copy link
Copy Markdown
Contributor Author

The changes-requested review of 100fdd3 is resolved by 918b6c4, as the next review confirms. 100fdd3 added the probe on its own, deliberately: the default changed to v only after the probe had shown on GitHub's runner that an input given as '' arrives empty. So for that one commit the probe described a default the code didn't have yet.

@GavinLucas
GavinLucas merged commit 9095a13 into main Nov 19, 2026
10 checks passed
@GavinLucas
GavinLucas deleted the feature/apt-install branch November 19, 2026 14:39
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