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

Logflare / logflare / 34112280211-1
83%

Build:
DEFAULT BRANCH: main
Ran 07 Sep 2026 10:44AM UTC
Jobs 1
Files 455
Run time 1min
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

07 Sep 2026 10:35AM UTC coverage: 82.196% (+0.04%) from 82.16%
34112280211-1

push

github

web-flow
fix: build the rules tree and its rule lookup from one snapshot (#3937)

`RulesTree.matching_rules/2` was a two-step lookup. The tree stored bare rule
ids, and `Rules.Cache.get_rules/1` resolved each id to a `Rule`. The two steps
read different databases:

- `rules_tree_by_source_id/1` goes through `ContextCache.apply_fun/3` and so
  `Repo.apply_with_replica/3` — a randomly picked read replica.
- `get_rules/1` called `Rules.get_rule/1` directly inside the
  `ContextCache.fetch/3` fallback, bypassing the replica that the singular
  `Rules.Cache.get_rule/1` uses, and so read the primary.

After a rule delete committed on the primary, a tree rebuilt from a lagging
replica still carried the dead id, and resolving it against the primary returned
`nil`.

`Rules.rules_tree_by_source_id/1` already reads the rules it builds the tree
from, then discards them. Keep them and cache both halves in one entry, so the
ids and the rules come from one query, one cache entry and one bust. An id the
tree can match now always resolves.

Drops `Rules.Cache.get_rules/1` and its private `fetch_rule/2` — the tree was
their only caller.


Claude-Session: https://claude.ai/code/session_013kMNrQA6RgNdnjwA2QQuhf

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

3 of 3 new or added lines in 2 files covered. (100.0%)

1 existing line in 1 file now uncovered.

14681 of 17861 relevant lines covered (82.2%)

2210.88 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
54.39
-1.75% lib/logflare/context_cache/gossip.ex
Jobs
ID Job ID Ran Files Coverage
1 34112280211-1.1 07 Sep 2026 10:44AM UTC 455
82.2
GitHub Action Run
Source Files on build 34112280211-1
  • Tree
  • List 455
  • Changed 7
  • Source Changed 3
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34112280...
  • 92b84aae on github
  • Prev Build on main (#34111228...)
  • Next Build on main (#34142393...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc