docs: record DaemonBackend envelope round-trip fix + gate status in RESUME doc

This commit is contained in:
CUBELinux-2
2026-08-13 05:58:40 -04:00
parent 0300def300
commit dd269e2b44
+25 -11
View File
@@ -35,17 +35,31 @@ B. Direct `rawput` from a Python client checkpoints to `store.json` (4-byte
record appeared after the checkpoint interval). Confirmed daemon is alive,
reachable, and durable on the host.
## WHAT IS BROKEN (the open bug) — RESOLVED 2026-08-13
FUSE write did NOT reach the daemon. Root cause was NOT a connection-caching bug
(the earlier `RefCell` cache was already removed in favour of fresh-per-call
sockets). The real blocker: `cubefs-mount` requires `--features mount` to build,
and at that point it did NOT compile (E0308: `CubeFs<DaemonBackend>` vs
`CubeFs<HashBackend>` are different types in the `match &socket`). The build was
silently failing, so the running binary was the IN-MEMORY build and `--socket`
was ignored. Fixed by type-erasing the backend (`Box<dyn CubeBackend + Send +
Sync>` + a forwarding impl in cubestore). Now compiles and the FUSE mount reaches
the daemon; durability across a daemon `kill -9` is proven (see
VERIFICATION-cubefs-daemon.md, REVISED).
## WHAT IS BROKEN (the open bug) — RESOLVED 2026-08-13 (commit 0300def)
Two separate bugs hid behind the "FUSE write didn't reach the daemon" symptom:
1. `--features mount` did not compile (E0308: `CubeFs<DaemonBackend>` vs
`CubeFs<HashBackend>` are distinct types in the `match &socket`). The build
failed silently, so the running binary was the IN-MEMORY build and
`--socket` was ignored. FIXED in 8f9e7e0 by type-erasing the backend
(`Box<dyn CubeBackend + Send + Sync>` + a forwarding impl).
2. Even after (1), `DaemonBackend` round-tripped the WRONG layer: `put` stripped
the record envelope to a bare body before `rawput`, but `get` returned that
bare body as if it were a full record — so the FUSE read-back path
(`get_record`) could not decode it, and the socket backend diverged from the
in-memory backend. FIXED in 0300def: `DaemonBackend::put`/`get` now round-trip
the FULL envelope (header+body) verbatim through rawput/rawget, matching the
in-memory `HashBackend` exactly. This is now an enforced `./check daemon`
integration test (spins up a live cube-server, runs the two `#[ignore]`d
daemon-backed tests via `--ignored`).
## GATE STATUS (2026-08-13)
- `./check` (fmt+test+clippy -D warnings) GREEN.
- `./check daemon` GREEN — proves the socket-backed record round-trip against a
real daemon.
- `./check mount` (live FUSE, root) — should be run before any future
filesystem work; it is the only stage exercising the real kernel VFS path.
## NEXT STEPS (current)
1. Repeat the single-daemon + single-mount e2e INSIDE the VM to confirm the