get_currency describes a server that refused our token as one with no currencies #284

Closed
opened 2026-08-13 22:37:30 +00:00 by coilyco-ops · 0 comments
Member

Slice of #266, filed so PR #280 closes something it actually closes. Angie (ENG, claude seat).

The defect

The payload contradicts itself:

narrative:              "no currencies have been created or traded yet"
counts.total:            0
admin_ok:                true
money.activeCurrencies:  40        <- same payload
economy_desc:            "1773 trades, 5 contracts"   <- same payload

get_world against the same host returns HTTP 401 on all nine datasets it tries, so the refusal is unambiguous and a sibling tool already reports it correctly.

Cause

Two things combine.

admin_ok is bool(admin_token) — whether a token was configured, not whether the admin surface answered. _narrative reports unavailability only when admin_ok is false, so with a token present it falls through to asserting the world is empty.

And the refusal was discarded on purpose:

# 401/404/405 just means "this server doesn't expose that action" - silent.

404 and 405 do mean that. 401 means our token was rejected, which is exactly the case where the roster is unknown rather than absent. The comment conflated not-exposed with not-authorised.

Acceptance

  • A server that refused every action is described as unreadable, not empty.
  • A genuinely empty server still reads as early-cycle.
  • A partial 401 — one action locked, roster built from the others — stays silent in warnings, because that is a complete roster for what is available and a warning there is noise. test_fetch_currency_tolerates_locked_action pins this and must not change.
  • Each fails under a mutation restoring the old behaviour.

Not in scope

get_currency's 15-row holder cap. That is #267's rule 3, it sits behind a cached fetch, and the trap is documented there.

**Slice of https://forgejo.coilysiren.me/coilyco-gaming/eco-app/issues/266, filed so PR https://forgejo.coilysiren.me/coilyco-gaming/eco-app/pulls/280 closes something it actually closes.** Angie (ENG, `claude` seat). ## The defect The payload contradicts itself: ``` narrative: "no currencies have been created or traded yet" counts.total: 0 admin_ok: true money.activeCurrencies: 40 <- same payload economy_desc: "1773 trades, 5 contracts" <- same payload ``` `get_world` against the same host returns `HTTP 401` on all nine datasets it tries, so the refusal is unambiguous and a sibling tool already reports it correctly. ## Cause Two things combine. `admin_ok` is `bool(admin_token)` — whether a token was **configured**, not whether the admin surface **answered**. `_narrative` reports unavailability only when `admin_ok` is false, so with a token present it falls through to asserting the world is empty. And the refusal was discarded on purpose: ```python # 401/404/405 just means "this server doesn't expose that action" - silent. ``` 404 and 405 do mean that. **401 means our token was rejected**, which is exactly the case where the roster is unknown rather than absent. The comment conflated not-exposed with not-authorised. ## Acceptance - A server that refused every action is described as unreadable, not empty. - A genuinely empty server still reads as early-cycle. - A **partial** 401 — one action locked, roster built from the others — stays silent in `warnings`, because that is a complete roster for what is available and a warning there is noise. `test_fetch_currency_tolerates_locked_action` pins this and must not change. - Each fails under a mutation restoring the old behaviour. ## Not in scope `get_currency`'s 15-row holder cap. That is https://forgejo.coilysiren.me/coilyco-gaming/eco-app/issues/267's rule 3, it sits behind a cached fetch, and the trap is documented there.
Sign in to join this conversation.
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
coilyco-gaming/eco-app#284
No description provided.