The hash-prefetch loop in BeesHashTable::prefetch_loop() guards the
on-disk stats-file write with `if (m_ctx->home_fd())`, intending to
skip the write when paths.home is unavailable (state.persistent=no
with the directory missing). The guard never worked: crucible's Fd
exposes `operator int() const` (returns -1 when empty) and
`bool operator!() const` but no `operator bool()`, so `if (fd)` falls
through to the int conversion and `if (-1)` is unconditionally truthy.
Use `!!m_ctx->home_fd()` to force the operator! path, matching the
existing project idiom.
Assisted-by: Claude-Code:claude-opus-4-7
Signed-off-by: Zygo Blaxell <bees@furryterror.org>
// above still fires so operators see the same content; only
// the file write is suppressed to avoid throwing from the
// inert BeesStringFile handle.
- if (m_ctx->home_fd()) {
+ if (!!m_ctx->home_fd()) {
catch_all([&]() {
m_stats_file.write(graph_blob.str());
});