fix(ci): make the CLI release pipeline work end to end - #531
Merged
Conversation
codegen.sh formats its generated Rust with `cargo +nightly fmt`, so the runner job failed before it could bundle anything.
`sed -n '0,/re/'` is a GNU extension. On the macOS runner's BSD sed it yields nothing, so the darwin build failed its version check, and `make cli-dist` on a Mac would have produced an archive with an empty version in its name.
The publish job downloads `cli-*`, which also matched the `cli-runner` artifact, so runner.js would have been uploaded to the release as a stray asset alongside the archives that already contain it.
macOS reports current_exe as the path used to launch, so a binary started through the PATH symlink named that symlink and every installed copy looked unmanaged: 'truapi-host update' refused to run on a copy the installer had just placed. Linux was unaffected, which is why the e2e never caught it.
valentinfernandez1
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four fixes found by dispatching
release-cli.ymlmanually againstmain, which is the only way to exercise it: it is otherwise gated on arelease:commit landing onmain. The first three broke the publish; the fourth broke the installed binary on macOS.1. The runner job had no nightly rustfmt.
scripts/codegen.shformats its generated Rust withcargo +nightly fmt, and only stable was installed. The job is aneeds:dependency for the whole matrix, so all three builds and the publish were skipped.2.
sed -n '0,/re/'is a GNU extension. The macOS runner's BSD sed returns nothing, so the darwin leg compared""against the declared version and bailed. The same expression was in theMakefile, where CI masks it by passingCLI_VERSIONexplicitly, somake cli-diston any Mac would have quietly producedtruapi-host--aarch64-apple-darwin.tar.gz. Both now useawk -F'"' '/^version = /{print $2; exit}'.3. The publish job's
pattern: cli-*swept in the runner bundle, sorunner.jswould have been uploaded as a stray release asset next to the archives that already contain it. The artifact is nowrunner-bundle.4.
current_exe()is not resolved on macOS. It reports the path as invoked, so a binary started through thePATHsymlink named that symlink, whose grandparent is.localrather thanversions. Every installed copy looked unmanaged:truapi-host updaterefused to run on a copy the installer had just placed, and the background auto-update silently never ran. Linux reports/proc/self/exe, which is already resolved, which is why the e2e never caught it. Detection now canonicalises first, covered by a regression test over the real symlink chain.Verification
release-cli.ymlnow runs green end to end, and the published artifacts install and self-check:Fix 4 is verified on Linux plus a mutation-checked unit test over the symlink chain; the macOS code path itself is unverified, since I have no macOS runner to install on.
Worth merging before #530, so that release inherits all four.