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

bedrock-kv / bedrock / 734faabad0557b8c84ffd93a3a96dd7d7607b876
82%

Build:
DEFAULT BRANCH: develop
Ran 26 Aug 2026 04:26PM UTC
Jobs 1
Files 217
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

26 Aug 2026 04:08PM UTC coverage: 78.548% (+0.09%) from 78.457%
734faabad0557b8c84ffd93a3a96dd7d7607b876

push

github

web-flow
Roll the WAL on the Demux's configured cut interval, not the default (#212)

Closes bedrock-61c.1 (epic bedrock-61c).

The WAL's segment-roll boundary and the Demux's cut boundary are the
**same boundary** — a segment holds exactly one cut bucket, which is
what lets trimming drop history at the cut cadence even though the
active segment is trim-immune. Both modules document this.

They agreed only by coincidence:
- `Pushing.crosses_cut_boundary?/2` read
`Demux.Server.default_cut_interval_us/0` directly
- `DemuxControl.start/1` — documented as the single place a log's Demux
is started from, where *"initialization and recovery reset must agree on
every option"* — never passed `:cut_interval_us` at all

Both sides defaulted, so both matched, and the Demux's documented
`:cut_interval_us` option was unreachable from a log.

### Changes
- `State.cut_interval_us/1` is the single resolution point for the
default
- `DemuxControl` hands that value to the Demux; `Pushing` measures the
roll against the same value
- carried on the **manifest params**, not `State` alone: the Foreman
rebuilds a restarted worker from its manifest, so an init-only field
would revert to the default after a crash and the log would resume
rolling on boundaries its already-written chunks were not cut on —
reintroducing across a restart exactly the drift this closes in-process

### Scope
This is a coupling fix. No production behaviour changes today, because
until now nothing could configure the width. A drift's cost is
**retention, not durability**: a segment spanning several cuts stays
un-trimmable until the last cut covering it lands. The trim floor is the
Demux watermark alone and eligibility is content-derived, so an
unaligned segment is never trimmed early.

### Verification
2802 tests, 0 failures. Credo and dialyzer clean.

Adversarially audited by a cold agent, which found no off-by-one at the
bucket boundary, confirmed no explicit `nil` can reach `div/2`, verified
the recovery-rese... (continued)

7 of 8 new or added lines in 3 files covered. (87.5%)

12 existing lines in 1 file now uncovered.

6796 of 8652 relevant lines covered (78.55%)

1027.78 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
94.74
0.0% lib/bedrock/data_plane/log/shale/pushing.ex

Coverage Regressions

Lines Coverage ∆ File
12
79.66
3.3% lib/bedrock/data_plane/log/shale/segment_recycler.ex
Jobs
ID Job ID Ran Files Coverage
1 734faabad0557b8c84ffd93a3a96dd7d7607b876.1 26 Aug 2026 04:26PM UTC 217
78.55
GitHub Action Run
Source Files on build 734faabad0557b8c84ffd93a3a96dd7d7607b876
  • Tree
  • List 217
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 734faaba on github
  • Prev Build on develop (#6C58CD94...)
  • Next Build on develop (#91C9F360...)
  • 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