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

bedrock-kv / bedrock / 91c9f3602124020affb1fddbfefc869eb82a6c2f
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:09PM UTC coverage: 78.637% (+0.09%) from 78.548%
91c9f3602124020affb1fddbfefc869eb82a6c2f

push

github

web-flow
Report the recycler's failures instead of masking them (#216)

Closes bedrock-m7j and bedrock-20c.

Two defects in `SegmentRecycler.Server`, both in how a failure is
*reported*, and both invisible to a test that only walks the happy path.

### 1. Transposed `stop/2` arguments discarded the cause
`Replies.stop/2` is `stop(state, reason)`. `handle_continue` called it
as `stop(reason, :shutdown)`, exiting with `:shutdown` and installing
the real cause as the GenServer's state.

The payoff is **narrower than it first appears**, and the audit is why
this PR says so. The reason does *not* reach Shale's
`classify_resource_error/1` — that only sees the return value of
`start_link/1`, and `init/1` can fail only with
`:path_is_not_a_directory`. An allocation failure happens in the
post-`init` continue, after `proc_lib` has acked `{:ok, pid}`, so it
reaches the log as an async link EXIT that kills it either way.

What the fix genuinely buys: gen_server **suppresses error_info for
`:shutdown`**, so the crash report was silent and the cause was thrown
away. Now `:enospc` or `:eacces` appears in the log, and the `State`
struct survives to `terminate/2`. A log whose disk filled no longer
looks like it shut down politely.

### 2. No refill after an exhausted checkout
`Logic.check_out/2` returns `{:error, :unavailable}` exactly when the
pool is empty — so the one moment a refill was most needed was the one
moment nothing scheduled it, and nothing else drives that continue. Not
reachable today (every path that lowers the pool is immediately followed
by the refill, which stops the process if it cannot restore the floor);
reachable the moment allocation can fail transiently, e.g. a full disk
that later clears.

### Neither fix changes what happens to the owning log
The audit specifically tried to break this and could not. `:shutdown` is
special to *supervisors* and to gen_server's error logging, **not** to
link propagation — only `:normal` is — and Shale does not trap ex... (continued)

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

1 existing line in 1 file now uncovered.

6806 of 8655 relevant lines covered (78.64%)

1032.04 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
90.0
47.14% lib/bedrock/service/foreman/health.ex
Jobs
ID Job ID Ran Files Coverage
1 91c9f3602124020affb1fddbfefc869eb82a6c2f.1 26 Aug 2026 04:26PM UTC 217
78.64
GitHub Action Run
Source Files on build 91c9f3602124020affb1fddbfefc869eb82a6c2f
  • Tree
  • List 217
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 91c9f360 on github
  • Prev Build on develop (#734FAABA...)
  • Next Build on develop (#12776D42...)
  • 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