Week of 2026-05-11 — NATS bus + Sonos driver substrate

Started 2026-05-11 · active · SMC17/stax-distro

The substrate week. Three primitives landed; one was promoted from "per-tool guard" to "session-default behavior."

2026-05-14 — Sonos driver: first reproducible playback frame

The driver is a single Zig binary that sits on the NATS bus, subscribes to audio.playback.request, resolves a track URI against the local library, and emits the SOAP envelope the Sonos control point expects. First end-to-end test: a play request from a Claude agent produced audible output on the kitchen speaker in 1.8 seconds. The latency budget is still loose; the SOAP-envelope assembly is doing two unnecessary allocations per frame that the next pass should fold into a single fixed-size buffer.

// What the request handler looks like right now. The
// envelope_buf is the allocation that wants to disappear.
fn handlePlay(req: PlayRequest, envelope_buf: []u8) !void {
    const envelope = try buildSoap(req, envelope_buf);
    try sonos.send(envelope);
}

2026-05-13 — stax-restore shipped

After the snapper-cadence incident on the 13th, stax-restore shipped as the recovery primitive: one command, one snapshot id, one path. The incident drill that triggered it was the ~/.local/state/stax/ inheritance bug — XDG_STATE_HOME was being walked by a tool that intended to wipe a subdirectory of the lane's own state, and instead wiped the parent. Snapper rolled back the directory; stax-restore is the CLI that wraps that recovery into a single command so the runbook isn't load-bearing.

2026-05-12 — NATS bus pinned at 2.10.x

The NATS subject hierarchy is committed:

JetStream is enabled but only used for bus.heartbeat. The other subjects are core-NATS fire-and-forget; durability for those lives in the substrate that produces the message, not in the bus.

What's blocked

socket privileges this user account doesn't currently have. The workaround is hardcoding the device's IPv4 address. The fix is a one-shot privileged helper that scans, caches, and drops privs.

publish to agent.<name>.event but consumers want a richer type-tagged hierarchy.

Status: active. Reroute to paused if the SSDP privilege blocker sticks past Friday.