get_currency attributes every trade to numeric currency IDs; all named currencies report zero #217
Labels
No labels
burndown-2026-06
headless
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/eco-app#217
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during a full 22-tool QA sweep of the eco MCP against Eco via Sirens (
eco.coilysiren.me:3001), cycle 14 / day 40, Eco 0.13.0.4, on 2026-08-12.Observed
get_currencyreturns 185 currencies. Trade attribution splits perfectly the wrong way:nameis a bare numeric string (2533707,2967954,131058, …) carry all 3,668 trades.get_currency(currency="Spectres")resolves (notFound: false) but returnstradeCount: 0,tradeVolume: 0. Meanwhilefind_trade(item="CementItem")shows Spectres is actively in use: 1,114 Cement on sale at 0.6 Spectres, plus a second market in Racines at 0.7.Root cause evidence
get_tradesshowscurrency: ""on every one of the 526 detailed rows, while the same payload setstrade_currency_column_seen: true. Example row:So the ledger parse is dropping the currency name, aggregation falls back to some numeric key (currency object ID?), and the named-currency list is joined from a different source that never matches.
Expected
Trades attributed to named currencies.
get_currency(currency="Spectres")should report the tradesfind_tradecan already see.Impact
The whole currency view is unusable: money supply, per-currency volume, and the
narrativeline all describe currencies no player recognises. It also makes thecurrencyfilter onget_market/find_tradeuntrustworthy.Landed in
69451e9. Recording the diagnosis and the one live step this needs, because the repository half is done but production attribution is not.Root cause
The exporter keys a
CurrencyTraderow by the Currency object's id;CreateCurrencywrites its name. Nothing joined them, and both consumers of that column mishandled it in opposite directions:currency.pykept the raw cell and calledsnapshot.record(<id>), minting a phantom currency named after the id. That is where the 18 numeric-named entries carrying all 3,668 trades came from.trades.pyran the cell through_clean_name, whose_NONSENSE_KEY_REtreats a bare number as a misalignment artifact and blanks it. That is why all 526 detailed rows readcurrency: ""while the same payload settrade_currency_column_seen: true.Both symptoms, one column, one missing join key.
Why the fix touches the mod
No export carried both halves of the key.
CreateCurrencyhas names only;/api/v1/storeshas names only; the ledger has ids only. The stores/economy exporter mod already reads both offCurrencyManager, soCurrencyHoldingsDtonow emitsidnext tocurrency, and eco-app builds the id→name map from that surface.The map is applied once, to the shared parsed rows in
fetch_parsed_trades, soget_trades,get_storesandget_marketall inherit one join. The lookup is skipped entirely when no row carries a numeric currency, so a server whose export already names currencies pays nothing.Operator action required
The Python side ships with this commit, but attribution stays unresolved on Sirens until the rebuilt mod DLL is on the server:
mods/stores(ward exec build-mod-stores— verified locally, 0 warnings) and install the resultingEcoStoreExporter.dll.curl -H "X-API-Key: …" http://eco.coilysiren.me:3001/api/v1/currency-holdings | headshould show an"id"field next to"currency".get_currency(currency="Spectres")should report a non-zerotradeCount, andget_tradesrows should carrycurrency: "Spectres"rather than an id.Until that happens
The behaviour is honest rather than wrong. Unmapped ids are kept — the volume is real — but never presented as currency names: those records carry
unresolvedId: truewith the raw value undercurrencyId, and bothget_currencyandget_tradesemit a warning naming how many trades are affected. No caller will read a bare number as a currency a player recognises.Sibling issues #236 and #234 depend on this join and are being worked next; they should be re-verified against the live server after step 3.