A token has a lifetime and it will end while a client is running. The session
record in #5 decides whether the core renews ahead of expiry or reacts to a
rejection. This issue implements that decision and proves it.
What this produces
Detection of an expired or rejected token that is distinguishable from a wrong
password and from an unreachable server.
The renewal path, whichever direction #5 chose, with the number of attempts and
the interval bounded and stated.
Exactly one renewal in flight at a time. Twenty tile requests failing at once
must not start twenty renewals, which is the bug that turns one expiry into a
rate-limited server.
Every request that was in flight when the token died either retried once against
the new token or failed with a named error, with no case that silently returns
empty data.
Done when
A test drives the fake server to reject a token mid-run and proves a single
renewal was started for many concurrent failures, and proves each in-flight
request ended in a retry or a named error. Blocked on #5, and on #102, which
decides whether a token is ever refused on the device's own reading of the
clock rather than only on the server saying so.
A token has a lifetime and it will end while a client is running. The session
record in #5 decides whether the core renews ahead of expiry or reacts to a
rejection. This issue implements that decision and proves it.
What this produces
Detection of an expired or rejected token that is distinguishable from a wrong
password and from an unreachable server.
The renewal path, whichever direction #5 chose, with the number of attempts and
the interval bounded and stated.
Exactly one renewal in flight at a time. Twenty tile requests failing at once
must not start twenty renewals, which is the bug that turns one expiry into a
rate-limited server.
Every request that was in flight when the token died either retried once against
the new token or failed with a named error, with no case that silently returns
empty data.
Done when
A test drives the fake server to reject a token mid-run and proves a single
renewal was started for many concurrent failures, and proves each in-flight
request ended in a retry or a named error. Blocked on #5, and on #102, which
decides whether a token is ever refused on the device's own reading of the
clock rather than only on the server saying so.