• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Freegle / Iznik / 24502
72%

Build:
DEFAULT BRANCH: master
Ran 03 Jul 2026 08:55AM UTC
Jobs 4
Files 1369
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Jul 2026 08:27AM UTC coverage: 71.622% (-1.6%) from 73.252%
24502

push

circleci

edwh
perf(rippling): bound the metrics first-ripple subquery to the window start, not 100 days

/rippling/metrics was still timing out. The reply-rate (1), replies-per-post (1b) and
taken-rate (4) KPI queries each materialise the same `rip` derived table - the first
rippled_in=1 arrival per msgid - and each bounded it to `arrival >= NOW() - INTERVAL 100
DAY`. Over 100 days that range is not selective, so the optimiser scanned messages_groups
via the low-cardinality `deleted` index: EXPLAIN showed ~8.8M rows examined to find the
~129k (1.6%) rippled_in=1 rows. Three such queries run concurrently, so this dominated the
endpoint.

Bound the rip subquery to the requested window `start` instead. It's provably safe: a post
only enters the outer set when its ORIGIN (rippled_in=0) row's arrival is in [start, end),
and a ripple can only happen after the post is posted, so first_ripple >= origin arrival >=
start - bounding to start never drops a first_ripple for an in-window post. With a selective
range the optimiser uses the `arrival` index instead.

Measured on live data (30-day window): reply-rate query 20.3s -> 3.7s (5.5x), identical
results (row-for-row diff clean). Same win for replies-per-post and taken-rate, which share
the subquery. No schema change.

Remaining tall pole after this is the reply-distance median query (~6s); left for a follow-up.

Test: full Go suite green (3369), including TestRipplingMetricsAnchorsRippledCohortOnFirstRippleDate
which pins the first-ripple anchoring the bound relies on, plus the reply/taken/distance cohort tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AsgvoSgfeUwBMBbxKJHSNy

12231 of 16161 branches covered (75.68%)

Branch coverage included in aggregate %.

5 of 5 new or added lines in 1 file covered. (100.0%)

84 existing lines in 2 files now uncovered.

130409 of 182995 relevant lines covered (71.26%)

37.85 hits per line

Coverage Regressions

Lines Coverage ∆ File
46
87.29
-0.75% iznik-server-go/message/bulkItem.go
38
87.5
0.01% iznik-server-go/message/message.go
Jobs
ID Job ID Ran Files Coverage
24502 laravel - 24502 03 Jul 2026 08:55AM UTC 477
68.75
CircleCI Job 24502
24502 go - 24502 03 Jul 2026 08:55AM UTC 145
83.88
CircleCI Job 24502
24502 playwright - 24502 03 Jul 2026 08:55AM UTC 74
22.81
CircleCI Job 24502
24502 vitest - 24502 03 Jul 2026 08:55AM UTC 746
69.32
CircleCI Job 24502
Source Files on build 24502
  • Tree
  • List 1369
  • Changed 77
  • Source Changed 0
  • Coverage Changed 77
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • CircleCI Build #24502
  • fa94ac1c on github
  • Prev Build on master (#24486)
  • Next Build on master (#24524)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc