a73x

91097513

release: v0.0.1-15 — one flag parser for the four binaries

a73x   2026-08-27 08:43

Commit message
release: v0.0.1-15 — one flag parser for the four binaries

`cliflags` reads each binary's flags off its Opts struct: a flag missing
from the usage prose fails the build, arity and value parsing have one
owner, and `--quic-idle-ms 0` or an unspellable `--session` are refused
by their types. Every binary answers `--help` and `--version` on stdout;
`--` ends flags. Behind it, server.zig is split into a core and its test
siblings, the e2e suite is a runner and fourteen groups, and coverage
runs to completion.

Changed on the line: a repeated `--sock` is last-wins, not a conflict;
`muxd --key ""` falls through to MUX_KEY_FILE like the other three;
`mux wall` refuses a bad `#session` before dialling anything.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Makefile
Old New
@@ -65,7 +65,7 @@ release:
65 install -m755 $(RELDIR)/stage/bin/muxd $(RELDIR)/stage/bin/mux \ 65 install -m755 $(RELDIR)/stage/bin/muxd $(RELDIR)/stage/bin/mux \
66 $(RELDIR)/stage/bin/muxa $(RELDIR)/stage/bin/muxweb $(RELBIN)/ 66 $(RELDIR)/stage/bin/muxa $(RELDIR)/stage/bin/muxweb $(RELBIN)/
67 strip $(RELBIN)/muxd $(RELBIN)/mux $(RELBIN)/muxa $(RELBIN)/muxweb 67 strip $(RELBIN)/muxd $(RELBIN)/mux $(RELBIN)/muxa $(RELBIN)/muxweb
68 @for b in muxd mux muxweb; do \ 68 @for b in muxd mux muxa muxweb; do \
69 got=$$($(RELBIN)/$$b --version | awk '{print $$2}'); \ 69 got=$$($(RELBIN)/$$b --version | awk '{print $$2}'); \
70 [ "$$got" = "$(VERSION)" ] || { \ 70 [ "$$got" = "$(VERSION)" ] || { \
71 echo "release: $$b reports $$got, expected $(VERSION)"; exit 1; }; \ 71 echo "release: $$b reports $$got, expected $(VERSION)"; exit 1; }; \
build.zig
Old New
@@ -643,7 +643,7 @@ comptime {
643 643
644 pub fn build(b: *std.Build) void { 644 pub fn build(b: *std.Build) void {
645 // Single source for both binaries' --version. Bumped at tag time. 645 // Single source for both binaries' --version. Bumped at tag time.
646 const version = "0.0.1-14"; 646 const version = "0.0.1-15";
647 const version_opts = b.addOptions(); 647 const version_opts = b.addOptions();
648 version_opts.addOption([]const u8, "version", version); 648 version_opts.addOption([]const u8, "version", version);
649 649