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

bedrock-kv / bedrock / 0704a6b49bb241d7adcc1b0732705b68a5c17bb2
82%

Build:
DEFAULT BRANCH: develop
Ran 18 Aug 2026 07:23PM UTC
Jobs 1
Files 207
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

18 Aug 2026 07:22PM UTC coverage: 75.202% (+1.0%) from 74.179%
0704a6b49bb241d7adcc1b0732705b68a5c17bb2

push

github

web-flow
Make Shale WAL cold start transactional and preserve I/O errors (bedrock-qzr.27) (#136)

Fixes the P2 review finding from #121 (ticket bedrock-qzr.27).

## Why

Two defects in Shale's cold start. First, error identity was destroyed
on the way up: `Segment.from_path/1` collapsed every failure except the
legacy-format marker into `{:invalid_wal_format, path}`, so
`:emfile`/`:enfile`/`:enomem` while reading a segment header bypassed
the server's retry handling and crashed as "invalid recovery cursor",
and permission or device errors were mislabeled as format corruption.
Second, acquisition was not transactional: the linked SegmentRecycler
started *before* segment loading (which never used it), so a retryable
listing failure left an unowned recycler alive — and each retry started
another.

## What

**Errors keep their nature and their location.** Two domain shapes flow
through TransactionStreams → Segment → ColdStarting → Server:
`{:wal_format, path, :unsupported_wal_format | :invalid_wal_format}` for
bad bytes, and `{:wal_io, path, posix}` for open/read/list failures with
their real POSIX cause. The `File.exists?/1` precheck is gone — the
header read itself is the existence check, so there is no
check-then-open race.

**Retry policy lives once, at the Server initialization boundary.**
`:emfile`, `:enfile`, and `:enomem` — from directory listing, header
open, header read, or recycler/demux startup — enter the existing
bounded exponential backoff. Format errors fail closed as replay-cursor
failures; non-retryable I/O fails closed as a WAL I/O failure naming the
path and cause (a missing data directory now reads `WAL I/O failure at
<path>: :enoent` instead of the recycler's `:path_is_not_a_directory`).

**Every attempt owns what it starts.** Cold start now validates the
existing WAL set *first* — it needs no started resources — then acquires
the recycler, then the demux. Initialization is expressed as one flat
`with` pipeline whose clauses are normalized tr... (continued)

16 of 25 new or added lines in 2 files covered. (64.0%)

232 existing lines in 19 files now uncovered.

5959 of 7924 relevant lines covered (75.2%)

1108.24 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
81.98
10.1% lib/bedrock/data_plane/log/shale/server.ex

Coverage Regressions

Lines Coverage ∆ File
91
19.75
0.0% lib/bedrock/control_plane/coordinator/server.ex
28
80.75
23.51% lib/bedrock/data_plane/materializer/olivine/server.ex
24
70.24
0.9% lib/bedrock/data_plane/log/shale/recovery.ex
20
81.98
10.1% lib/bedrock/data_plane/log/shale/server.ex
13
91.5
0.17% lib/bedrock/data_plane/demux/shard_server.ex
10
70.69
1.72% lib/bedrock/control_plane/director/recovery.ex
8
67.86
7.86% lib/bedrock/data_plane/log/shale/segment.ex
7
93.57
-0.63% lib/bedrock/data_plane/materializer/olivine/logic.ex
6
81.25
-0.89% lib/bedrock/data_plane/log/shale/pulling.ex
5
76.92
0.92% lib/bedrock/control_plane/director/recovery/log_replay_phase.ex
5
93.67
9.36% lib/bedrock/data_plane/log/shale/pushing.ex
4
76.74
1.74% lib/bedrock/control_plane/coordinator/state.ex
4
93.22
0.12% lib/bedrock/data_plane/commit_proxy/server.ex
2
95.45
-4.55% lib/bedrock/data_plane/log/shale/transaction_streams.ex
1
97.06
0.18% lib/bedrock/control_plane/director/recovery/log_recovery_planning_phase.ex
1
99.58
0.01% lib/bedrock/data_plane/commit_proxy/finalization.ex
1
76.36
-1.82% lib/bedrock/data_plane/log/shale/segment_recycler.ex
1
96.0
0.55% lib/bedrock/data_plane/log/shale/writer.ex
1
95.03
-0.62% lib/bedrock/data_plane/materializer/olivine/index_update.ex
Jobs
ID Job ID Ran Files Coverage
1 0704a6b49bb241d7adcc1b0732705b68a5c17bb2.1 18 Aug 2026 07:23PM UTC 207
75.2
GitHub Action Run
Source Files on build 0704a6b49bb241d7adcc1b0732705b68a5c17bb2
  • Tree
  • List 207
  • Changed 27
  • Source Changed 0
  • Coverage Changed 27
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 0704a6b4 on github
  • Prev Build on develop (#B7A6402B...)
  • Next Build on develop (#B496EEA5...)
  • 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