Repository navigation
test(ci): install the rpm, and complete a read-only mount (#149) - #541
Conversation
Two gaps in `ci.yml`'s `packaging` job, both of which let something ship unexercised for several releases. **The rpm was never installed.** All three rpms are built on every pull request, which is where a malformed header surfaces and nowhere near enough: `scripts/postinstall.sh` and `scripts/preremove.sh` had been run by dpkg and by `internal/config`'s tests against a staged root, and by no rpm anywhere. So every published rpm carried maintainer scripts no rpm had executed — and the two package managers call the same script with different arguments, dpkg's `configure`/`remove`/`upgrade` against rpm's instance counts. The tests drive both spellings; only a real rpm confirms what rpm passes. Installed in `rockylinux/rockylinux:9` over a read-only `dist/`, asserting the same filesystem facts the deb path asserts, then removed with `rpm -e` and asserted to have left nothing — including `/sbin/mount.objectfs`, which neither package manager owns because `postinstall.sh` creates it, so only `preremove.sh` can take it away. **No CI mount had ever completed.** `mount(8)` was proven to *resolve* `-t objectfs` to the installed helper; nothing had had a filesystem mounted and read a byte through it. Now a real `sudo mount -t objectfs s3://objectfs-ci /mnt/objectfs-ro -o ro,config=...` against a standalone `substrate server`, with the bytes of a 21-byte object and a 1 MiB object under a prefix compared through the mount, `ro` asserted in the kernel's own option list, a write refused with EROFS, and the mountpoint empty after `umount`. Three deviations from the issue body, each measured rather than assumed: - **On the runner, not in a container.** `--device /dev/fuse` presupposes the host has the device, so a container does not sidestep whether `ubuntu-latest` has it — and the deb is already installed at that point, so mounting here exercises the *installed* `/sbin/mount.objectfs`. - **`rockylinux/rockylinux:9`, not `rockylinux:9`.** `library/rockylinux:9` was last pushed 2024-05-30 and is the deprecated location; `rockylinux/rockylinux:9` was pushed 2026-06-12. - **substrate at the version in `go.mod`, not `@latest`,** so the endpoint this mount is proven against is the code `internal/testaws` runs in-process. Plus the durable half: `TestEveryPackagedFormatIsInstalledAndRemovedInCI` couples `nfpms.formats` to what the `packaging` job installs *and* removes, so a third format — nfpm also writes apk, archlinux, ipk — fails until CI learns it rather than being published by the `dist/` upload glob with its scriptlets never executed.
The mount step added in the previous commit probed the device rather than
assuming it, and the answer contradicts what this repository has been
asserting since the fuse_mount tag was introduced:
crw-rw-rw- 1 root root 10, 229 Sep 20 04:15 /dev/fuse
fusermount3 version: 3.14.0
fusermount3 and /etc/fuse.conf are there too, and none of the three was
installed by that job — it reports `0 upgraded, 1 newly installed` for the
.deb alone. ubuntu-latest ships all of it.
Four claims are corrected to the measurement:
- ci.yml's build-tags matrix said "ubuntu-latest has no /dev/fuse, so they
cannot run here". The suite is still compiled-only, but for a reason that
is honest about what is unknown rather than one that is false.
- kernel_options_live_test.go's doc comment said the same, and used it to
justify a coverage gap. The gap is real; its stated cause was not. Its
only other dependency is testaws — in-process, no bucket, no credential —
so the device was the whole barrier.
- The packaging header said a busy FUSE mount "needs /dev/fuse and a
bucket" and so had to be left to the Go tests. Neither half holds. That
path is exercisable here and is simply not exercised, which is now
written down as a gap instead of as an impossibility.
- The same header said "dpkg only" and proposed `rpm -qp` as the follow-on.
The previous commit does a real `rpm -i` and `rpm -e` in a container,
which is the thing that matters: `rpm -qp` reads a header without running
a scriptlet, and the scriptlets were the entire exposure.
What remains unknown is whether the fuse_mount suite *passes* on this
runner, and this commit deliberately does not guess. It would mount as a
non-root `go test` through fusermount3's setuid path rather than as root,
and it counts kernel READ requests, which is a property of the kernel
version rather than of objectfs. Filed as #543 with the evidence.
The `[ ! -c /dev/fuse ]` check stays. A runner image is not a constant —
ubuntu-latest migrates to Ubuntu 26 from 2026-10-19 — and a device that
arrived without being promised can leave the same way.
Refs #149, #543
The job log answered the one question this PR left open
A world-writable character device, The probe itself stays. What the mount step observed
The kernel carries Everything else in that step is silent on success by construction — two What the rpm step observed
The version is
|
Closes #149.
Two gaps in
ci.yml'spackagingjob. Both let something ship unexercised for several releases, andboth are invisible from a green tree.
The rpm was never installed
All three rpms are built on every pull request. That is where a malformed header surfaces and nowhere
near enough:
scripts/postinstall.shandscripts/preremove.shhad been run by dpkg, and byinternal/config's tests against a staged root, and by no rpm anywhere. So every rpm this projecthas published carried maintainer scripts that no rpm had executed — and the two package managers call
the same script with different arguments, dpkg's
configure/remove/upgradeagainst rpm's instancecounts. The tests drive both spellings; only a real rpm confirms what rpm actually passes.
Now installed in a container over a read-only
dist/, asserting the same filesystem facts the deb pathasserts in the same order, then removed with
rpm -eand asserted to have left nothing — including/sbin/mount.objectfs, which neither package manager owns, becausepostinstall.shcreates it so thepackage contains no path under an aliased directory. That leaves
preremove.shas the only thing thatcan take it away, and
/sbinis a symlink to/usr/sbinon Rocky, which makes this the stronger testof the two.
No CI mount had ever completed
mount(8)was proven to resolve-t objectfsto the installed helper. Nothing had ever had afilesystem mounted and read a byte through it.
A real
sudo mount -v -t objectfs s3://objectfs-ci /mnt/objectfs-ro -o ro,config=/etc/objectfs/ci.yamlagainst a standalone
substrate server, and then:/proc/mountsentry exists, and its option list containsro— which is what says-o roreached the mount syscall rather than only the process. Withoutinternal/fuse/mount.go'sroappend the filesystem would enforce read-only in userspace while thekernel believed the mount was writable, which is the half-wired state A read-only mount: --read-only for objectfs mount, and ro for the fstab helper #532 found the feature in
cmp'd against what the aws CLI put inthe bucket. The large one is not decoration: a small file is one GetObject, 1 MiB spans several reads,
so it is the one that can fail on offsets or on ranges assembled out of order. The prefix means
sub/is a directory the mount has to invent
stat(2)'s size asserted separately from the bytes, because a read that returns the right contentwhile the attribute path reports a wrong length is a state
cmpcannot see andls -lcanEROFSis the only answer that means A read-only mount: --read-only for objectfs mount, and ro for the fstab helper #532's gate is what refusedumount, then/proc/mountsclean and the directory underneath empty — a mount point still listingthe bucket's entries after
umountwould mean the tree had been written into the covered directory,which is the failure that looks most like success
Three deviations from the issue body, each measured rather than assumed
On the runner, not in a container. The body prescribes
--device /dev/fuse --cap-add SYS_ADMIN.Passing
/dev/fusethrough presupposes the host already has it, so a container does not sidestepwhether
ubuntu-latesthas the device — it adds a second place for the answer to be no. And the deb isinstalled on the runner by then, so mounting there exercises the installed
/sbin/mount.objectfs,which is #136's subject.
rockylinux/rockylinux:9, notrockylinux:9. Checked on Docker Hub rather than assumed:library/rockylinux:9was last pushed 2024-05-30 and is the deprecated location, whilerockylinux/rockylinux:9— where the project moved — was pushed 2026-06-12.substrate at the version in
go.mod, not@latest.go list -mreads it, so the endpoint thismount is proven against is the same code
internal/testawsruns in-process, and a disagreement betweenthem cannot be a version difference. Dependabot moves both, because there is one version to move.
Also: credentials go in root's
~/.aws/credentials, not this shell's environment.sudoresets theenvironment and an
/etc/fstabentry has none at all — it ismount -aat boot, as root, with whateverthe AWS default chain finds on disk.
internal/storage/s3's config has no credential keys, so the chainis the only way in. The pair used is substrate's public built-in emulator credentials, the same ones
internal/testawsuses; no secret is read and no live credential is on this path.The durable half
TestEveryPackagedFormatIsInstalledAndRemovedInCIcouplesnfpms.formatsto what thepackagingjobinstalls and removes. It is
release_packages_test.gowith the arrows the other way round: that filecouples "a format ci.yml builds" to "a format release.yml ships", and this one couples "a format the
packaging produces" to "a format CI has ever installed" — where the rpm's answer was no, for every
release.
Driven off the config's own
formats:list, which is the part that lasts. nfpm also writes apk,archlinux and ipk; a third format is a one-line change that
release.yml'sdist/upload glob wouldpublish immediately and nothing would install. That format now fails this test until CI learns it.
Verification
Local golangci-lint is v2.13.2 and
ci.ymlpins v2.12.2, so that run is a signal and not themeasurement — the required check is.
Mutation-verified, 8 mutations, 8 caught, 1 measured equivalent. Two results worth recording:
rpm -e objectfsfrom the workflow passed the first version of the gate. The job's owndiagnostics say "/sbin/mount.objectfs survived rpm -e, dangling", and an
echo "::error::…"isexecutable text rather than a comment, so stripping comments does not remove it — the gate was reading
a message about the removal while the removal was gone. That is the
cosign verify-blobfailure inrelease_signing_test.goone level down, reproduced by someone who had just read that comment, whichis the argument for the structural rule over care. Fixed with a line-prefix match (
runsCommand), andthe identical mutation is now caught by name.
dpkg -iin thereinstall step still installs the format. Deleting both is caught. Measured, not assumed.
step removed 8 lines of it. Deleting the real line range is caught.
Two things this deliberately does not do
No gate asserting the mount step exists. It would have to pin one step's exact command spelling,
which fails on a legitimate rewrite and catches little beyond deletion — and the step is self-checking
the moment it runs. The format-coverage gate is driven by
.goreleaser.yml's data instead of by myspelling, which is why that one is worth having and this one is not.
ci.yml'sbuild-tagscomment still says "ubuntu-latest has no /dev/fuse". That claim is what thisPR's mount step measures, and it is a comment rather than an observation. I am not editing it on a
prediction — the probe at the top of the new step reports the answer, and the comment gets corrected
from the job log rather than from reasoning.
Filed upstream
scttfrdmn/substrate#1237— the standalone server exposes/health,/readyand/_substrate/resetand no request log over HTTP, so an out-of-process consumer cannot count PUTs. The zero-writes claim here
is therefore a state diff (key, size, ETag) rather than the PUT count
internal/difftestgets fromtestaws' in-process recorder. The comment in the workflow says so, so the weaker proof is labelled rather
than mistaken for the real one.