[codex] Build Linux release artifacts for generic CPU targets - #272
Conversation
Greptile SummaryThis PR fixes two root-cause issues from release proof Confidence Score: 4/5This PR is safe to merge; changes are straightforward, consistently applied, and directly address confirmed release failures. No P0 or P1 issues found. The Zig target pinning is applied uniformly across all three jobs and all build steps. The smoke-test tightening correctly removes the fallback that hid real crashes. The sed delimiter fix is accurate. Score of 4 rather than 5 because No files require special attention beyond confirming CI passes with the new Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Release trigger / workflow_dispatch] --> B{Matrix arch}
B -->|amd64 / x86_64| C["runner: ubuntu-latest\nzig: x86_64-linux-gnu"]
B -->|arm64 / aarch64| D["runner: ubuntu-24.04-arm\nzig: aarch64-linux-gnu"]
C --> E["zig build -Dtarget=x86_64-linux-gnu\n(vendor libs, libghostty,\ncmux-linux, cmuxd)"]
D --> F["zig build -Dtarget=aarch64-linux-gnu\n(vendor libs, libghostty,\ncmux-linux, cmuxd)"]
E --> G[Assemble DEB / RPM package]
F --> G
G --> H[VM smoke test]
H --> I{"cmux --version 2>&1\n|| cmux --help 2>&1"}
I -->|exit 0| J[✅ Pass]
I -->|non-zero| K[❌ Fail — illegal instruction caught]
Reviews (1): Last reviewed commit: "Build Linux release artifacts for generi..." | Re-trigger Greptile |
Summary
Makes Linux release artifacts build for generic Linux CPU targets instead of the native runner CPU, and tightens the distro VM smoke test so crashing binaries cannot pass.
Why
Release proof
25081237436showed two separate problems:cmux --versionandcmux --helptrapped withIllegal instruction. The current smoke test masked that with|| echo 'binary runs', so validation continued instead of failing at the real runtime issue.The illegal-instruction trace strongly points at native-runner CPU feature leakage in release builds. The release workflow was building all Zig components without
-Dtarget, which lets Zig optimize for the native builder CPU. That is not acceptable for distro artifacts expected to run inside older or more constrained VM/user CPUs.Changes
x86_64-linux-gnuaarch64-linux-gnucmux --versionorcmux --helpto actually succeed.Validation
nix-instantiate --parse nix/tests-distro.nixruby -e 'require "yaml"; YAML.load_file(".github/workflows/release-linux.yml"); puts "release-linux.yml parses"'git diff --checkactionlintis not installed locally, so full workflow validation will come from GitHub Actions.