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

bedrock-kv / bedrock / d2001662f36cdcc61a752934b53c9eefb54de6ea
73%

Build:
DEFAULT BRANCH: develop
Ran 14 Jul 2026 08:27PM UTC
Jobs 2
Files 215
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

14 Jul 2026 08:26PM UTC coverage: 70.847% (+0.7%) from 70.158%
d2001662f36cdcc61a752934b53c9eefb54de6ea

push

github

web-flow
Add behavioral tests for Repo transaction lifecycle + fix rollback/1 crash (bedrock-60h, bedrock-j64) (#86)

## Summary
- Adds `repo_transact_test.exs` with 24 tests for `Internal.Repo`
(coverage 81.4% → 99.7%): the cast-based in-transaction API with exact
message assertions, `transact` lifecycle (nested transactions, commit
result variants, arity-0/1 funs), retry machinery
(fail-once-then-succeed with exact attempt counts, retry-limit
RuntimeError, rollback-on-exception with reraise), and TSL fetch via
provided layout vs cluster link
- **Fixes a real crash bug (bedrock-j64)**: `MyRepo.rollback(reason)`
inside `transact` — the *documented* usage — escaped as an uncaught
throw and never rolled back the builder, because the catch clause
matched a 4-tuple shape nothing in the codebase throws. Fixed to catch
the real 3-tuple and roll back the current transaction; returns
`{:error, reason}` per the docs.

## How it's tested without cluster infrastructure
A real TransactionBuilder against a minimal TSL (`%{epoch: 1, proxies:
[]}`) gives deterministic end-to-end commit paths: empty transactions
local-commit `{:ok, 0}`, mutation commits fail `{:error, :unavailable}`
— both deliberate code paths, audit-verified as stable seams.
Nested/rollback flows use a scripted stub builder seeded in the process
dictionary.

## Audit
Independent review verified the fix empirically (revert → exactly the
two rollback tests fail with the uncaught throw), confirmed the 4-tuple
is thrown nowhere, and traced nested-rollback semantics through
`Finalization.rollback/1` (pops exactly one stack layer; outer
transaction survives). Non-blocking suggestions noted in review: add
`retry_limit: 1` to the three TSL happy-path tests to fail fast if the
local-commit shortcut ever changes, and drop a no-op `on_exit`.

## Test plan
- 24/24 green at multiple seeds; full test/bedrock/internal/ (443 tests)
green; full suite (2370 tests, 158 properties) green

Tickets: bedrock-60h, bedrock-j64

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

6 existing lines in 3 files now uncovered.

5553 of 7838 relevant lines covered (70.85%)

1981.89 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
85.0
-7.5% lib/bedrock/data_plane/materializer/basalt/pulling.ex
2
88.28
-0.73% lib/bedrock/data_plane/transaction.ex
1
95.65
-4.35% lib/bedrock/data_plane/materializer/telemetry.ex
Jobs
ID Job ID Ran Files Coverage
1 d2001662f36cdcc61a752934b53c9eefb54de6ea.1 14 Jul 2026 08:27PM UTC 215
70.85
GitHub Action Run
2 d2001662f36cdcc61a752934b53c9eefb54de6ea.2 14 Jul 2026 08:27PM UTC 215
70.8
GitHub Action Run
Source Files on build d2001662f36cdcc61a752934b53c9eefb54de6ea
  • Tree
  • List 215
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d2001662 on github
  • Prev Build on develop (#C83F2765...)
  • Next Build on develop (#9AD43326...)
  • 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