ci: run build and the three test suites on every PR - #49
Merged
Conversation
This was referenced Aug 29, 2026
oreofeolurin
added a commit
that referenced
this pull request
Aug 29, 2026
* fix(linux): repair the Linux build (#50) `flo` did not compile on Linux, and the next release tag would have failed: release.yml runs `zig build --release=safe -Dtarget=<linux>`, which errors on current dev. Three Zig 0.16 API removals, all in Linux-only branches: - `std.fs.openFileAbsolute` and `File.readAll` in host_stats.zig, which reads /proc. Replaced with `stdx.fs.readFile`, which also collapses open + readAll + close into one call. - `std.posix.timerfd_create` / `timerfd_settime` in reactor.zig. Replaced with the raw `std.os.linux` syscalls, mapping errno the way stdx.net already does. Zig analyses lazily, so a macOS host never compiles either branch — the code could reference symbols that do not exist while every local build stayed green. Same trap that previously hid the metrics exporter and util/http/response.zig being dead code. Worth noting `stdx.fs.openFileAbsolute` already existed. The stdx wrappers are there exactly to track the std API this codebase targets; host_stats.zig called std.fs directly and bypassed the convention. Verified: zig build --release=safe -Dtarget=x86_64-linux # fails on dev, passes here zig build --release=safe -Dtarget=aarch64-linux # both release targets green macOS build, test-unit and test-integration all still pass. Native Linux Debug is covered by the CI in #49, which is what surfaced this. * chore(): clean up stdx and comments
oreofeolurin
force-pushed
the
ci/pr-checks
branch
2 times, most recently
from
August 29, 2026 17:02
142adab to
ff74348
Compare
This was referenced Aug 29, 2026
oreofeolurin
added a commit
that referenced
this pull request
Aug 29, 2026
…) (#53) `listen_port = 0` means "bind an ephemeral port", so it is not a base to add an offset to. The helpers added theirs unconditionally and produced ports 1 (metrics), 2 (dashboard), 500 (Raft) and 600 (gossip) — all privileged, all refused on Linux without CAP_NET_BIND_SERVICE. `Runtime: boot 2 shards and shutdown` uses `.listen_port = 0`, and both metrics_enabled and dashboard_enabled default to true, so it tried to bind port 2 and failed. The metrics exporter hit it first but survived — it got graceful bind-failure logging in #43; the dashboard has no such guard and failed the whole runtime start. An unresolved base now derives an unresolved port: the helpers return 0 when listen_port is 0. An explicitly configured port still wins. macOS permits bind(0.0.0.0, <low port>) where Linux does not, which is why every local run passed. Second Linux-only failure found by the CI in #49, after #50. Also updates the ephemeral-port test added in #47, which asserted effectiveRaftPort() == 500 — that pinned the buggy behaviour.
Nothing gated pull requests. The only workflows here were release.yml and docker-publish.yml, both tag-triggered, so a PR could be merged having been built and tested only on a contributor's machine. Adds a CI workflow on pull_request and on pushes to dev/main: - web console — `npm run build`, which runs `tsc -b` first, so a TypeScript error fails here rather than in the release build (the console is compiled into the Zig binary) - build — `zig build` - test-unit, test-integration, test-e2e — as a matrix with fail-fast off, so one failing suite does not mask the other two The console is built once and handed to the Zig jobs as an artifact instead of being rebuilt three times. No `zig fmt --check` gate yet: 12 files on dev are already unformatted, so it would fail every PR on day one, and two of them are touched by a PR currently in flight. Reformatting is a separate cleanup, best landed when nothing is open. Its first run already earned its keep: it caught that the Linux build was broken and that the next release tag would have failed (#50, fixed in #51).
oreofeolurin
force-pushed
the
ci/pr-checks
branch
from
August 29, 2026 17:31
ff74348 to
dfd1856
Compare
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.
Nothing gated pull requests in this repo. The only workflows were
release.ymlanddocker-publish.yml, both tag-triggered — so a PR could be merged having been built and tested only on a contributor's machine. That is exactly the state the four currently-open PRs are in:mergeable=MERGEABLE,reviews=none,checks=0.What runs
On
pull_requestand on pushes todev/main:npm run buildrunstsc -bfirst, so a TypeScript error fails here instead of in the release build — the console is compiled into the Zig binaryzig buildfail-fast: falseso one failing suite doesn't mask the other twoThe console is built once and passed to the Zig jobs as an artifact rather than rebuilt three times. PR runs cancel superseded in-flight runs;
dev/mainruns never cancel, since those are the record of what the branch did.Note
No
zig fmt --checkgate. 12 files ondevare already unformatted, so the gate would fail every PR on day one — including PRs that don't touch those files. Two of them (src/cli/commands/server.zig,src/config/server.zig) are touched by #47 right now, so reformatting here would conflict with open work. It's a separate cleanup, best landed when nothing is in flight.