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

Merged
PerishFire merged 1 commit from honest-outage into main 2026-07-21 14:35:49 +00:00
Owner
No description provided.
booth: tell an outage from a refusal, not a wrong password
All checks were successful
guard / guard (pull_request) Successful in 3m27s
4782462756
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>
PerishFire deleted branch honest-outage 2026-07-21 14:35:49 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PerishLab/ensign!25
No description provided.