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

Logflare / logflare / 34111228910-1
83%

Build:
DEFAULT BRANCH: main
Ran 07 Sep 2026 10:33AM 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:23AM UTC coverage: 82.16% (-0.009%) from 82.169%
34111228910-1

push

github

web-flow
fix: drop unresolvable rule ids in RulesTree.matching_rules/2 (#3935)

* fix: drop unresolvable rule ids in RulesTree.matching_rules/2

`RulesTree.matching_rules/2` resolves matched rule ids through
`Rules.Cache.get_rules/1`, which maps each id through `Repo.get(Rule, id)`.
`Repo.get/2` returns `nil` for a row that no longer exists, so a rule id that
still lives in the cached rules tree but no longer resolves to a rule comes back
as `nil`.

That `nil` reaches `SourceRouter.do_routing/3`, whose clauses all match `%Rule{}`.
The router raises a `FunctionClauseError` inside the Broadway batch processor, so
the whole batch fails and `Spool.ConsumerPipeline.ack/3` logs
`spool_consumer: N messages failed during processing`.

Reject `nil` entries, which also restores the router callback contract
(`matching_rules/2 :: [Rule.t()]`). The sibling `SourceRouter.Sequential` already
pattern-matches `%Rule{}` and is not affected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013kMNrQA6RgNdnjwA2QQuhf

* fix: guard the router comprehension and tighten the regression test

Address two review findings.

`route_to_sinks_and_ingest/3` passed whatever a router returned straight into
`do_routing/3`, whose clauses all require `%Rule{}`. Any other `matching_rules/2`
implementation could re-create the whole-batch Broadway failure. Match `%Rule{}`
in the comprehension so the crash is impossible at the layer where it costs 500
messages.

The router regression test asserted `route_to_sinks_and_ingest/3 == le`, which
also holds when `matching_rules/2` returns `[]` for any reason — a fixture drift
would leave it green while covering nothing. Use `expect/3` instead of `stub/3`
so `verify_on_exit!` fails when the stub is never reached.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013kMNrQA6RgNdnjwA2QQuhf

* fix: contain a spool dispatch failure to ... (continued)

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

8 existing lines in 3 files now uncovered.

14677 of 17864 relevant lines covered (82.16%)

1504.86 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
66.67
-20.83% lib/logflare/backends/consolidated_sup_worker.ex
2
59.57
-4.26% lib/logflare/sources/source/slack_hook_server/slack_hook_server.ex
1
77.27
-1.14% lib/logflare/logs/search_query_executor.ex
Jobs
ID Job ID Ran Files Coverage
1 34111228910-1.1 07 Sep 2026 10:33AM UTC 455
82.16
GitHub Action Run
Source Files on build 34111228910-1
  • Tree
  • List 455
  • Changed 10
  • Source Changed 3
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34111228...
  • aadb7c1e on github
  • Prev Build on main (#34088741...)
  • Next Build on main (#34112280...)
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