Repository navigation
Open
Labels
Description
This was generated by AI during triage.
Problem
thirdshift update (src/update.rs) uses axoupdater. That costs two things:
- Build weight.
axoupdaterneedsaxoasset'sremotefeature, which always pulls inimage(withmoxcmsandpxfm) and turns on reqwest'sdefault-tls(rustls with aws-lc). Stop building aws-lc-sys, and axoupdater's image stack if a flag allows #203 removed aws-lc from our own reqwest but found no flag that drops this stack, so it stays (see the comment inCargo.toml). In the Make the test suite faster #174 baseline,moxcms,imageandpxfmtook about 220s of a 616s cold build, and aws-lc stays in the tree only because of the updater. Every new Run worktree and every CI job pays this. - Wrong SELinux label. Console never starts on SELinux-enforcing hosts (502): updater mislabels binary, unit can't run from $HOME #1078 part 1: after an update, the binary is labelled
user_tmp_t, probably because the updater downloads into a temp directory andrename()s across it. systemd can't execute a file with that label, so the Console unit fails on SELinux-enforcing hosts.
Proposal
Replace axoupdater with a small updater of our own on the existing blocking reqwest (rustls with ring):
- Look up the latest
v<version>GitHub Release and choose the asset for this target (x86_64-unknown-linux-musl,aarch64-apple-darwin) asdistnames it. - Verify the download before installing it. Decide what to trust:
dist's published checksums at minimum, or GitHub artifact attestations / a signature. - Download into a temp file in the same directory as the installed binary,
fsync, set the mode, thenrenameover the binary. A same-directory rename avoids crossing filesystems and gives the file the directory's label, which fixes Console never starts on SELinux-enforcing hosts (502): updater mislabels binary, unit can't run from $HOME #1078 part 1. Otherwise runrestoreconwhere SELinux is present. - Keep ADR 0003's rule: replace only a copy that has the installer's receipt, and point crates.io or source installs to
cargo.
Why ready-for-human
Installing a binary from the network is security-sensitive, so a human should decide:
- what the update trusts (checksum vs attestation vs signature), and what happens when verification fails;
- the receipt format, to stay compatible with
dist's installer; - rollback if the new binary won't start;
- testing for real: an update from the previous release on Rocky 9 with SELinux enforcing, on WSL2, and on macOS.
Acceptance criteria
-
cargo tree -i image,cargo tree -i aws-lc-sysandcargo tree -i axoassetfind nothing - The PR reports cold
cargo test --no-runwall time against the Make the test suite faster #174 baseline -
thirdshift updateverifies the download before replacing anything, and leaves the old binary in place when verification fails - On Rocky 9 with SELinux enforcing, the updated binary is
home_bin_tandthirdshift-console.servicestarts - Copies without a receipt are left alone, as today
- ADR 0003's Consequences say that thirdshift's own updater replaces
axoupdater
Activity
JacobStephens2 commentedon Nov 9, 2026
Updated build-time evidence
This issue's build-weight argument cites #174's baseline, where
moxcms,imageandpxfmtook about 220 s of a 616 s cold build. That no longer describes the cost. A colddevbuild on 2026-11-09 (rustc 1.99.1, Lima VM, 4 vCPU aarch64) took 58–66 s:imagestack is now small:moxcmstakes 2.8 s andimage2.0 s, and they compile in parallel with other crates.aws-lc-sysis now the cost. Its build script compiles AWS-LC from C for about 30 s, andrustls→reqwest→thirdshiftwait on it, so it sits on the critical path.Measured end state. To approximate this issue's end state for the build only, I did three things in a scratch Worktree at
82f88ec8:axoupdaterand stubbed the update functions;rustls-no-providerplus rustlsring;cargo tree -i aws-lc-sysfinds nothing.The cold build dropped from 58.7 s to 42.4 s, about 16 s or 28%. Edit rebuilds were unchanged at about 6–7 s. Every new Run Worktree and CI job pays a cold build.
The acceptance criteria still hold:
cargo tree -i aws-lc-sysandcargo tree -i imageshould find nothing.ready-for-humanstill fits, for the security reasons in the body. #1868 records the full experiments indocs/research/rust-build-profile.md.