Skip to content

fix(data): cache layer hardening per multi-agent review + ledger columns#384

Merged
Flotapponnier merged 2 commits into
devfrom
feat/per-chain-bench-pages
Jun 10, 2026
Merged

fix(data): cache layer hardening per multi-agent review + ledger columns#384
Flotapponnier merged 2 commits into
devfrom
feat/per-chain-bench-pages

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Summary

Multi-agent adversarial review of the data layer surfaced 9 real issues; all fixed:

  • Prom client: global 8-slot concurrency cap (cold-start burst was browning out Prom, the root cause of partial leaderboards) + one retry on null percentiles
  • Quorum floored at 3 so a legitimately decimated provider field can't draft forever after snapshot expiry
  • Snapshot ratchet now compares live coverage (was dead code: results array is padded with unavailable rows, lengths always matched); KV read failure skips the write instead of bypassing the guards; after() keeps the lambda alive until the fire-and-forget write lands
  • cellRanks: case-insensitive chain/region label matching; marginals restricted to providers covering every cell of the collapsed dimension (kills Simpson's bias where a single-region provider wins the chain average by omission, and keeps badge ranks consistent with the per-cell wins that earned them)
  • Product badges: collapsed claims (global/row/column) require full declared cell coverage, a one-cell degraded matrix can't mint a global drop journal framing #1
  • Badge SVG: scope label XML-escaped in attributes; last bare 404 got cache-control
  • Also carries the ledger_columns feature (per-bench ledger column relabeling) from the parallel session

Test plan

  • tsc, bun test, validate-specs (25 specs) pass
  • Staging: bench pages stable through a deploy (no partial boards), badges unchanged for dRPC/Mobula/Jupiter

- prom client: global 8-slot concurrency cap, kills the cold-start
  burst that browned out Prom
- spec: retry-once on null percentiles; quorum floored at 3 so a
  decimated field can still go live; cellRanks chain/region matching
  case-insensitive; marginals restricted to providers covering every
  cell of the collapsed dimension (Simpson's bias)
- snapshot: ratchet compares live coverage (was dead code against the
  padded results array); KV read failure skips the write; after() keeps
  the lambda alive until the write lands
- badge: escape scope label in SVG attrs, cache-control on the last
  bare 404
- products: collapsed badge claims require full declared cell coverage
- also carries the bench cache key bumps for ledgerColumns
@Flotapponnier
Flotapponnier merged commit a8e53d4 into dev Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant