booth: tell an outage from a refusal, not a wrong password Eleven reads folded "the database errored" and "there is no such row" into one None, so an unreachable postgres read as WRONG PASSWORD, INVALID TOKEN, NOT SIGNED IN. Clients then discard creden… #25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "honest-outage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Eleven reads folded "the database errored" and "there is no such row" into one None, so an unreachable postgres read as WRONG PASSWORD, INVALID TOKEN, NOT SIGNED IN. Clients then discard credentials that were always valid and the damage outlives the outage. Ten wore `.ok()?`; the eleventh, oidc's alive(), wore `let Ok(pack) = .. else { return false }` and made a live actor read as barred, so a refresh got invalid_grant. Every one now returns Result<Option<T>, Error>, the shape guard() already had, and callers split it: Err -> 500, Ok(None) -> 401/404. crews() returns a plain Vec — no rows is an empty crew, never an absence. OIDC lied twice more at the status layer: sour("server_error") answered 400, and a failed end("Renew") was reported as invalid_grant. Both are outages, so both now answer 500 through spoil(). Per RFC 6749 5.2 a 400 tells the client its request was malformed, which makes it stop retrying. The nine repeated `.map_err(|_| INTERNAL_SERVER_ERROR)` chains that the split would have cost pushed door.rs over negentropy's 300-line law. The law was pointing at a missing trait, not a missing line budget: util's Sound collapses each chain to `.sound()?`, and door.rs lands at 272 — 11 lines shorter than before this change. Verified against a real postgres, not a build: a valid password answers 500 during the outage and 201 once keel revives the connection, while a wrong password stays 401 throughout. Dual-engine acts green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>