deps: common-auth 0.22.0; skip our usage poll while insula is warming up or rate-limited

Merged
AN
20h ago
+423-58

Adopts @cortexkit/common-auth@0.22.0 (npm gitHead 52518f69, dist.shasum e8bd7d62, integrity sha512-02yOfdzA…; uncompressed tar identical to the candidate signed off) and uses its classified insula misses.

After insula restarted at about 19:10Z on 20 Oct, all five Claude accounts got 429 from Anthropic's usage endpoint at once: on any insula miss our vault quota sweep polled Anthropic itself, on top of insula's own first read. lookup() now says why a reading is missing:

  • Background sweep: cold (insula warming up) and upstream-failed (Anthropic is already rate-limiting insula for that account) make no usage GET, record no poll and arm no backoff; the stored reading stays. stale, credential, absent and unreachable keep exactly one GET, and a current reading makes none. A cold miss turns into unreachable after two minutes, so fallback can't be blocked indefinitely.
  • Request-time admission: keeps its single GET for every miss except upstream-failed, where it uses the attached dated reading or the existing unknown-quota rule (an enabled floor still refuses on unknown quota).
  • The quota-source log line records the miss kind.

Red-first on 0.21.1 for the cold and upstream-failed cases; mutation rows vault-insula-cold-skips-usage-poll and vault-insula-upstream-failed-skips-usage-poll CAUGHT. Closure guard and fixtures moved to 0.22.0.


Summary by cubic

Updates vault quota polling to skip redundant Anthropic usage GETs while insula is warming up or rate-limited, adopting @cortexkit/common-auth@0.22.0.

Previously any insula miss triggered a usage poll. Now lookup() classifies misses into cold, upstream-failed, stale, credential, absent, and unreachable, and:

  • Background sweeps skip polls on cold and upstream-failed misses, leaving stored quota and poll bookkeeping untouched; a cold miss becomes unreachable after two minutes so fallback can't block forever.
  • Request-time admission skips polls only on upstream-failed, using an attached dated reading when present, otherwise falling back to the existing unknown-quota rule (an enabled floor still refuses).
  • The quota-source log now records the miss kind, and two new mutation controls cover the cold and upstream-failed suppression paths.