- One address rule (api/Address.kt): scheme in any case, host lower-cased, path, query and
fragment dropped; an http:// address is answered at the address step (this app needs https).
- User-Agent llembas-android/<version> on every request, and the same string as the device
code's client_id (the server only stores and shows it).
- A 401 of the instance's own (WWW-Authenticate: Bearer realm="lembas") marks the instance
whose token it was as signed out: nothing more is asked with it, its pages stay underneath a
page that offers the sign-in in one step, and nothing else is forgotten. A 403 stays the
server's sentence; a 401 passed on from a provider behind /v1 signs nobody out.
- Streams: 45 s of silence is a broken connection (the server's keepalive is every 15 s on all
three routes); reconnect 1 s doubling to 60 s, jittered ±20 %, short again only after 30 s of
health; a 429 waits for Retry-After.
- A sentence for each failure: unreachable, timeout, certificate not trusted, not LLeMbas,
"the server answered N", too old, too new. Sign-in polls end by their real reason and survive
a dropped network or a restarting server.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>