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

AnimaLogica / kathikon / 057a2b3a937a0267ffec39a7d57022cc0950eef7-PR-85
96%
main: 96%

Build:
Build:
LAST BUILD BRANCH: v0.6.0/Ecto_storage_backend
DEFAULT BRANCH: main
Ran 27 Nov 2026 06:47AM UTC
Jobs 1
Files 34
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

27 Nov 2026 06:44AM UTC coverage: 95.993% (+1.4%) from 94.611%
057a2b3a937a0267ffec39a7d57022cc0950eef7-PR-85

Pull #85

github

thanos
All seven gaps now have tests, and the suite passes: 330 tests, 8 `:async_timing` excluded. Format, `credo --strict`, and dialyzer are all clean. I checked the coverage data, not just the test results, and every line I'd flagged is now hit.

**What was added** (in `test/kathikon/uniqueness_test.exs`, plus a worker and backend in `test/support/workers.ex`)
1. **Stale index row:** the job row is removed but its index row stays. The next insert drops the stale row and succeeds. This is the self-heal the article describes.
2. **`insert_many` abort on conflict:** `on_conflict: :error` with `on_error: :abort` returns `{:error, :unique}` and writes nothing.
3. **Invalid `on_conflict`:** raises `ArgumentError`.
4. **`unique: false` worker:** never coalesces.
5. **Chunk where every spec fails:** returns per-index errors with `inserted: 0`.
6. **Duplicate explicit `id:`:** returns `{:error, {:already_exists, id}}`.
7. **Backend without `insert_unique/2`:** falls back to plain insert, using `Storage.with_backend/2`.

I also added two small checks I'd flagged: a nil `inserted_at` never conflicts, and `schedule_once` with no `at:` or `in:` creates an available job.

**Remaining gaps in `insert_many.ex`:** the `telemetry: :per_job` events, map-shaped specs, and invalid chunk size are still untested. They predate this change. I can cover them if you want, but they aren't part of the uniqueness work.

I covered the three remaining `insert_many` gaps. All 336 tests pass (8 `async_timing` excluded), and `insert_many.ex` is now at 100% line coverage. Total coverage is 95.9%.

Tests added to `test/kathikon/insert_many_test.exs` (6 new, 12 in that file):

- **`telemetry: :per_job`**: with a duplicate spec in the batch, `[:kathikon, :job, :inserted]` fires once per written job and not for the coalesced spec. Without the option, no per-job events fire.
- **Map specs**: `%{worker:, args:, queue:}` and `%{worker:}` with no args work, and a map spec's `unique:` option coalesce... (continued)
Pull Request #85: v0.5.0 uniqueness

173 of 174 new or added lines in 7 files covered. (99.43%)

1749 of 1822 relevant lines covered (95.99%)

61.26 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
93.84
0.62% lib/kathikon/storage/mnesia.ex
Jobs
ID Job ID Ran Files Coverage
1 057a2b3a937a0267ffec39a7d57022cc0950eef7-PR-85.1 27 Nov 2026 06:47AM UTC 34
95.99
GitHub Action Run
Source Files on build 057a2b3a937a0267ffec39a7d57022cc0950eef7-PR-85
  • Tree
  • List 34
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #85
  • PR Base - main (#D2343DBD...)
  • Delete
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