fix(atlas): limit bounds every array, not only flows #274

Merged
coilysiren merged 1 commit from coilyco-ops/atlas-bounds-every-array into main 2026-08-13 22:55:29 +00:00 AGit
Member

closes #286 - one of six arrays honoured limit, leaving ~45 KB at limit=1

One of five pull requests against #286. Also the upstream half of coilyco-gaming/sirens-echo#449: bounded arrays never reach the consumer's 8 KiB cap, so its trailing warnings are never cut. Slice of #267, which stays open.

closes #286 - one of six arrays honoured limit, leaving ~45 KB at limit=1 One of five pull requests against #286. Also the upstream half of coilyco-gaming/sirens-echo#449: bounded arrays never reach the consumer's 8 KiB cap, so its trailing warnings are never cut. Slice of #267, which stays open.
get_crafting_atlas returned roughly 45 KB at limit=1. limit bounded
flows and left five arrays whole:

  byCrafted            ~470 rows
  byStation            ~120 rows
  byGathered           ~115 rows
  byCitizen             ~90 rows
  byCitizenIterations   ~90 rows

Each grows with world size, which is the condition #267 says must be
bounded, and the tool's own stated purpose is a slice that keeps a
no-argument call inside a client's response cap.

_bound_rows already truncates a named key and emits shown-of-total, so
this names the five that were missing rather than adding a second
mechanism beside the one that works.

Rule 5 holds without changes: totalEvents, perActionCounts, rollupEvents
and rollupIterations are computed from the full population before
serialization, so bounding the detail arrays narrows no summary. The test
asserts totalEvents survives a limit of 5.

This is also the upstream half of a consumer defect. sirens-echo bounds a
tool result with a head slice and this server carries warnings as its last
JSON key, so a response over that 8 KiB cap loses its caveats first. A
45 KB payload hits it every time. Bounded arrays never reach the cap, so
nothing is cut. See coilyco-gaming/sirens-echo#449.

Mutation: bounding only flows again fails the new test.

Slice of #267, which stays open: get_trades' byItem, get_currency's
shadowed 15-row cap, the four tools with no limit parameter, and the
25-tool audit are all untouched.

Refs #267

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
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!274
No description provided.