chadtmiller.com/monolith
An atproto PDS
pds xrpc writes an empty blob as nothing, {} only for an empty answer
OpenThis changes pds xrpc to print {} only for an answer with no body and no Content-Type. An empty body under any Content-Type is now written as nothing. That matches getBlob serving an empty blob under its own type, which was the nightly's failure.
I read the code change in xrpc.rs. json is None only when there is no Content-Type, so (None, _) if bytes.is_empty() does what the spec says. An empty body under JSON falls through to the bytes arm and writes nothing. The spec page "Any call" is updated and the changeset is written for those who call the server. The new harness check in checkXrpc is stricter and compares four cases against a host of the harness's own. The url bump to 2.5.9 only touches Cargo.lock, so it adds no crates. I found no change needed in docs/guide/calling.md, which doesn't describe this output.
The one cost is the one the body already names: a forwarded method whose service answers nothing under a JSON Content-Type now prints nothing instead of {}. The spec states that trade explicitly, so I'm not asking for a change.
1 approval
3 passed, 1 skipped
pds xrpcprinted{}for an empty blob served as JSON, so last night's nightly failed at seed 41. Now{}is only for an answer with neither a body nor aContent-Type. Also movesurlto 2.5.9, past an advisory that fails every pull'scargo deny.Claude Opus 5.5 · high
What changes
Spec.
spec/COMMANDS.md, "Any call":{}for an answer with no body and noContent-Type, as a method that answers nothing; any other answer written as its bytes, so a blob of no bytes, under whateverContent-TypegetBlobserves it, evenapplication/json, writes nothing.Harness.
checkXrpcinharness/checks/commands.mjs: a host of the harness's own answers200with no body, with noContent-Typeand withapplication/json,text/plainandapplication/octet-stream;pds xrpcmust print{}\nfor the first and nothing for the others. It runs in every--commandsrun, where the nightly's case needed a random draw.CLI.
crates/pds-cli/src/xrpc.rs:{}only when the answer is empty and has noContent-Type. A change file (patch).Cargo.lock.
url2.5.8 to 2.5.9 (andform_urlencoded1.2.3): RUSTSEC-2026-0592, a stack overflow inUrl::origin()on nestedblob:URLs, whichcargo deny checknow refuses, so every pull's gates fail at their first step until it lands.Why
The nightly on main
ff58fc8c88a3failed at step 765 of seed 41 (--crash-every 15 --firehose --commands):command pds sync get-blob differs, the reference0 bytes, the server's3 bytes. The server served the empty blob as 0 bytes (its log:"bytes":0); the harness had routed the call throughpds xrpc(harness/lib/xrpc.mjsdraws one of tool, command andpds xrpc), which printed{}\nfor an empty body under a JSONContent-Type, as the spec's "an answer with no body{}" allowed. A method that answers nothing is answered200with noContent-Type, so that alone tells the two apart.How it was checked
The spec and harness commit pushed without the fix (with the
urlbump, so the gates reach the harness): the gates atfd9355563b69fail in each of the three--commandsruns (seeds 31, 32, 33) at step 0,pds xrpc query com.example.harness.empty type==application/json differs: spec/COMMANDS.md, "Any call", and nowhere else. With the fix, the gates, docs and citations at4e1507f9d8b2pass.Shortcomings
A forwarded method whose service answers nothing under a JSON
Content-Typenow prints nothing rather than{}.One gates run at
fd9355563b69failed onspace_credentials::tests::credentials_are_verified_row_by_row(401 BadJwtfor a credential whoseiatis 5 seconds ahead, the skew's edge), which passed on the run again and on main: flaky, untouched here. Only a clock stepping back between the test'snowand the check's seems to explain it.