small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo

fix(token_count): keep an endpoint that has counted, and log failed counts

A subscription's count endpoint is marked absent for a day on any refusal, since the credential may be refused the endpoint outright. That memo is keyed by the endpoint, so one request the provider refused for its own reasons switched counting off for every session on it, and the failure itself was silent: each request was then sized by estimate with nothing saying why. An endpoint that has answered a count is no longer marked absent by a later refusal. A failed count is logged once an hour per endpoint with the provider's words, and a provider encoder that raises while counting is logged by the loop. A unit test against a local endpoint pins both memo cases; no end-to-end route reaches a subscription's endpoint. Behaviour change: after a successful count, a refused count no longer stops counting on that endpoint for a day.


Author bunny.fae.mom
Committer Tangled Date Commit Parent 29cd34c9
+136 -5
3 changed files
+136 -5
3 changed files