From 9ecd8482ea3b1a42c197aa9e253b308c526da1fb Mon Sep 17 00:00:00 2001 From: zzstoatzz Date: Thu, 28 May 2026 22:11:41 -0500 Subject: [PATCH] note: pending websocket v0.1.2 cross-repo bump Carried over from the old zzstoatzz.io/zlay location. Coordinated release across websocket.zig + zat still TODO. Co-Authored-By: Claude Opus 4.8 (1M context) --- WEBSOCKET-V0.1.2-BUMP.md | 83 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 WEBSOCKET-V0.1.2-BUMP.md diff --git a/WEBSOCKET-V0.1.2-BUMP.md b/WEBSOCKET-V0.1.2-BUMP.md new file mode 100644 index 0000000..625c24c --- /dev/null +++ b/WEBSOCKET-V0.1.2-BUMP.md @@ -0,0 +1,83 @@ +# bump websocket.zig to v0.1.2 (cascades through zat) + +Started 2026-05-24 in a prefect-server session. Punted to a separate sweep +because it needs a coordinated release across two upstream repos. + +## what's in v0.1.2 + +`zzstoatzz/websocket.zig` v0.1.2 fixes a real bug in `Handshake.parse`: +when the request contained `Connection: keep-alive` or a non-websocket +`Upgrade` token, parse returned `error.InvalidConnection` / +`error.InvalidUpgrade` **inline** the moment it saw that header — before +the body-completeness check at the end of the function ran. For +fragmented POSTs/PATCHes (headers in one TCP segment, body in the next), +this caused `httpFallback` to dispatch with `body.len == 0` even when +`Content-Length` was non-zero. + +Effect on zlay: any non-websocket POST endpoint (e.g. `/_admin/*`, +`/_metrics/*` or whatever else lives behind `api.handleHttpRequest`) +under load with httpx-style clients would intermittently see empty +bodies and 400 / "invalid JSON" responses. Hard to repro without the +right back-to-back timing; easy to attribute to "flaky test". + +See the patch on `zzstoatzz/websocket.zig` tag `v0.1.2`, file +`src/server/handshake.zig` — the `deferred_fallback_err` variable + the +unified gate at the bottom of `parse`. Three regression tests in the +same file cover the three failure cases. + +## why this is a cascade + +zlay's deps: + +``` +.zat = { url = ".../zat/archive/v0.3.2.tar.gz", hash = "..." }, +.websocket = { url = ".../websocket.zig/archive/refs/tags/v0.1.1.tar.gz", hash = "..." }, +``` + +zat v0.3.2 internally pins `websocket = v0.1.1`. If zlay alone bumps to +v0.1.2, zig sees two copies of `websocket` in the module graph (zlay's +direct `v0.1.2` + zat's transitive `v0.1.1`) and fails to compile with: + +``` +error: file exists in modules 'build' and 'build0' +``` + +(Same error class as the april 2026 incident — see zlay commit `168d9f1` +"bump websocket.zig + zat: fix requestCrawl POST hang", which solved it +by bumping both deps in lockstep.) + +## what needs to happen + +1. **zat** (`~/tangled.org/zat.dev/zat`): + - bump `build.zig.zon`'s `.websocket` URL+hash to v0.1.2 (hash + should be `websocket-0.1.2-ZPISdfZLBAAhY83ZO-p-Lvk9Pc2PkNToszN895WFfVzq` + — verified via `zig fetch --save` on tag `v0.1.2`) + - bump `.version` to `0.3.3` + - `zig fmt --check` + `zig build` + `zig build test` (or whatever zat's + full check is) + - commit + tag `v0.3.3` + push to `tangled.org/zat.dev/zat` + +2. **zlay** (here): + - bump `.zat` to `v0.3.3` (compute new hash via `zig fetch --save`) + - bump `.websocket` to `v0.1.2` (hash above) + - `zig fmt --check` + `zig build -Dtarget=x86_64-linux-gnu` + `zig build test` + - commit + push + +## what NOT to do + +- don't bump zlay's websocket alone — module conflict +- don't bump just zat — zlay's direct dep needs to match too +- don't release zat without a deliberate semver bump; this is a + user-visible behavior change for anyone consuming zat that does + HTTP fallback + +## related context + +- the fork lives at `~/github.com/zzstoatzz/websocket.zig` +- the prefect-server zig port already bumped to v0.1.2 in commit + `9a1523c`'s parent — and verified end-to-end with a 30-run HA + smoke (zero `failed to read body` 400s, where prior was ~15-20% + intermittent under back-to-back smoke) +- prefect-server's CLAUDE.md path is `~/tangled.org/zzstoatzz.io/prefect-server` + +— claude (a previous session) -- 2.51.2