fix(social): the reputation top lists are bounded like their trade twins #278

Closed
coilyco-ops wants to merge 2 commits from coilyco-ops/reputation-tops-are-bounded into main AGit
Member

closes #286 - topReputationGivers and topReputationReceivers are sorted and never sliced, the same shape as topBuyers

One of five pull requests against #286. Stacked on PR 277, not cut from main, because both edit the same _bound_rows call. Slice of #267, which stays open.

closes #286 - topReputationGivers and topReputationReceivers are sorted and never sliced, the same shape as topBuyers One of five pull requests against #286. Stacked on PR 277, not cut from main, because both edit the same _bound_rows call. Slice of #267, which stays open.
get_social accepted no limit at all, so reputationEdges had no bound it
could honour: roughly 210 rows on a live server, one per trading pair,
growing with the community.

The parameter now appears in the tool's own schema. A bound a caller
cannot pass is not a bound they can use, and a test asserts the property
is declared rather than only implemented.

totalReputationTransfers still counts every transfer, which the test
pins: rule 5 of #267 protects the summaries, and bounding a ranked detail
array does not narrow them.

Deliberately untouched, each for its own reason:

  playByDay, firstLoginsByDay   time series. get_species thins these to
                                evenly-spaced samples with endpoints
                                kept, and a head slice would redefine the
                                curve as the first N days.
  reputationColumnsSeen         the exporter's header row, recorded so a
                                mis-named column is fixable from the
                                warning. Bounding it defeats its purpose.
  topReputationGivers,          sorted and never sliced, so both hold one
  topReputationReceivers        row per citizen despite the name. Same
                                finding as topBuyers in PR 276. Reported
                                on the issue rather than bounded here,
                                because this claim did not name them.

Mutations: dropping the bound fails the bounding test, and renaming the
schema property fails the declaration test.

Slice of #267, which stays open. get_map, get_world and get_climate still
take no limit, get_currency's holder cap is shadowed behind a cached
fetch, and the generic invariant test still wants a should-bound call per
array.

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>
topReputationGivers and topReputationReceivers are sorted descending and
never sliced, so each holds one row per citizen who gave or received
reputation. The names promise a top-N the data does not keep.

This is the third and fourth instance of that shape. PR 276 found and
bounded the same thing in topBuyers and topSellers, which are built the
same way from the same kind of aggregate. Leaving the reputation pair
unbounded while their trade-side twins are bounded would be the
inconsistency.

totalReputationTransfers still counts every transfer, asserted in the
same test.

Stacked on PR 277 rather than cut from main, because 277 introduced the
_bound_rows call this extends and two independent edits to one argument
list is the conflict I created between PR 275 and PR 276 earlier today.

Mutation: naming only reputationEdges again fails the widened test.

Slice of #267, which stays open. get_map, get_world and get_climate still
take no limit, get_currency's holder cap sits behind a cached fetch, and
the generic invariant test still wants a should-bound call on playByDay,
firstLoginsByDay and reputationColumnsSeen, which I believe are exempt
and have not decided.

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>
coilysiren closed this pull request 2026-08-14 05:37:44 +00:00

Pull request closed

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!278
No description provided.