diff --git a/RESUME-cubefs-daemon.md b/RESUME-cubefs-daemon.md index 209921c..3009333 100644 --- a/RESUME-cubefs-daemon.md +++ b/RESUME-cubefs-daemon.md @@ -54,32 +54,40 @@ Two separate bugs hid behind the "FUSE write didn't reach the daemon" symptom: integration test (spins up a live cube-server, runs the two `#[ignore]`d daemon-backed tests via `--ignored`). -## GATE STATUS (2026-08-13) +## GATE STATUS (2026-08-13, end of session) - `./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. + real daemon (3 ignored tests via --ignored all pass). +- `./check mount` (live FUSE, root) GREEN — 27/27 pass. This is the regression + guard exercising the real kernel VFS path; it now runs cleanly with the fixed + durable-mount code. Run before any future filesystem work. ## NEXT STEPS (current) -1. ~~Repeat the single-daemon + single-mount e2e INSIDE the VM...~~ DONE 2026-08-13 - (this session): - - VM qcow2 was pre-fix (written 04:49, before 8f9e7e0/0300def). Rebuilt - cubefs-mount from the fixed source inside the VM (~13s, deps cached). - - Rewired /etc/systemd/system/cubefs.service from `--seed` (in-memory) to - `--socket /run/cube/cube.sock` with `Requires=cube-server.service`. - - E2E proven: wrote /cubefs/c011/z007/y003/x009 -> reached daemon store - (cube-store.json + .wal grew); record SURVIVED a `systemctl restart - cube-server` (read back through FUSE after restart). Durable-mount - contract holds inside the VM. ./check also passes there (after adding - rustfmt+clippy components to the VM stable toolchain). +1. ~~Repeat the single-daemon + single-mount e2e INSIDE the VM...~~ DONE (see below). 2. Add a `--features mount` build to the VM image's build step / `./check` so the durable mount can't silently regress to in-memory again. (DONE on host ./check; VM image build step not yet updated.) 3. Optionally surface `DaemonBackend::put` failures as FUSE EIO instead of eprintln-only (best-effort today, acceptable). -4. Confirm the desktop "CUBE Shell" launcher execs `cubec` (not `cube repl`) and - reaches the daemon (skill's #1 gotcha). Not yet visually verified. +4. ~~Confirm the desktop "CUBE Shell" launcher execs `cubec`...~~ DONE 2026-08-13: + `/usr/share/applications/cube.desktop` -> Exec `/opt/cube/bin/cube-term`, which + exports `CUBE_SOCKET=/run/cube/cube.sock` and `exec /opt/cube/bin/cubec`. The + skill's #1 gotcha (must use `cubec`, not `cube repl`) is satisfied at the file + level (not visually launched, per user instruction to not block on viewability). + +## COMPLETED THIS SESSION +- Fixed `DaemonBackend` envelope round-trip (commit 0300def) — was returning the + bare body instead of the full record envelope; the `--socket` mount could not + read back FUSE writes. Fixed by round-tripping the full envelope verbatim. +- Fixed `--features mount` compile break (commit 8f9e7e0) — `Czyx` field access. +- Enforced BOTH bugs via `./check daemon` (the two #[ignore]d integration tests + now run via --ignored and would fail if either regressed). +- Host: `./check` + `./check daemon` + `./check mount` all GREEN. +- VM (/var/lib/cubevm/cubelinux-vm.qcow2, was pre-fix): rebuilt cubefs-mount from + the fixed source, rewired cubefs.service to `--socket /run/cube/cube.sock` with + `Requires=cube-server.service`, and proved a FUSE write survives a daemon + restart (WAL persistence). Injected SSH key for cube+root to drive the VM. + ./check also passes inside the VM (rustfmt+clippy components added). ## KEY FILES - /home/CUBELinux/CUBELinux-2/cubesys/src/commands.rs (raw* commands + helpers)