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

bedrock-kv / bedrock / 216164972bb2edc5c4348892e48f9fbcf40e1908
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: 79.094% (+0.5%) from 78.59%
216164972bb2edc5c4348892e48f9fbcf40e1908

push

github

web-flow
A worker directory is one with a manifest; report the ones that are not (#213)

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

`worker_paths_from_disk/1` globbed every entry under the foreman's path
and called each a worker. That path is shared — the cluster supervisor
derives `object_storage/` from the same `:path` it hands the foreman,
and every deployment config puts the coordinator's `raft/` alongside it.
Both landed in the worker map as `{:failed_to_start,
:manifest_does_not_exist}`, as did the remains of workers whose
manifests are gone.

### Why the orphans are stuck

Retirement runs **through** the worker: `Foreman.worker_retired/2` is
called by a live process holding the id and foreman ref that its
*manifest* supplied. A directory with no manifest starts no process, is
never judged displaced, and can never retire itself. It is retried and
re-failed on every boot while holding its disk, invisibly. On the
cluster that prompted this, that is 129 MB across three directories
untouched since a crash five days earlier.

### Changes
- key enumeration off the manifest's presence, single-sourced as
`WorkingDirectory.manifest_path/1`
- **absence is the only thing that excludes.** A corrupt manifest is a
worker in trouble; a manifest that cannot be stat'ed for any reason
other than absence is a worker we cannot rule out. Both stay enumerated
and surface as `:failed_to_start`, so no live worker vanishes from the
foreman's view because of a permissions mistake (`File.exists?/1`
returns `false` on `EACCES` — that hole is closed)
- report manifest-less directories by name at boot, and leave them alone

### Deliberately not reclaiming
The directory may hold a WAL, and deleting data on a guess is not the
foreman's call. There is no automatic reclamation path and this PR does
not add one — cleanup is the operator's, which is why the log names the
paths.

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

Adversarially audited by a cold agent. It cor... (continued)

15 of 16 new or added lines in 3 files covered. (93.75%)

16 existing lines in 3 files now uncovered.

6878 of 8696 relevant lines covered (79.09%)

1044.39 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
16.67
16.67% lib/bedrock/service/foreman/working_directory.ex

Coverage Regressions

Lines Coverage ∆ File
13
85.56
-5.35% lib/bedrock/object_storage/local_filesystem.ex
2
95.16
0.33% lib/bedrock/object_storage/chunk.ex
1
86.44
6.78% lib/bedrock/data_plane/log/shale/segment_recycler.ex
Jobs
ID Job ID Ran Files Coverage
1 216164972bb2edc5c4348892e48f9fbcf40e1908.1 26 Aug 2026 04:26PM UTC 217
79.09
GitHub Action Run
Source Files on build 216164972bb2edc5c4348892e48f9fbcf40e1908
  • Tree
  • List 217
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 21616497 on github
  • Prev Build on develop (#12776D42...)
  • Next Build on develop (#5A520C96...)
  • 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