computerd: writes applied over sync do not reach inotify watchers on the FUSE mount
I maintainer di solito rispondono entro 1 giorno
@aron-cf ci sta già lavorando.
Dal 3/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Describe the bug
When the host pushes a change to computerd, the entry is applied straight into the in-container VFS. Reads through the FUSE mount return the new bytes, but the kernel never sees an operation on the path, so no inotify event is emitted. File watchers inside the container (Vite/chokidar, astro dev, tsc --watch, node --watch) never notice the change.
The workflow this breaks: an agent edits files through workspace.fs (or the worker-shell backend) while a dev server runs in the container. Hot module replacement never fires, and new files are not picked up by the dev server's router until it restarts.
Writes made inside the container through the mount do emit events, because they go through the kernel.
Expected behavior
A change applied by the sync push handler is visible to inotify watchers on the mount, the same way a local write is, without syncing anything back to the host.
Steps to reproduce
computerd built from main (2f76387), FUSE_MOUNT=fuse, MOUNT_POINT=/workspace. The host side is driven by pushOnce, pullOnce and reconcileWatermarks from @cloudflare/computer-rpc/driver on a SQLiteTestStorage database, as in script/computerd-soak.mjs.
- Run
inotifywait -m -r /workspace, then write a file on the host andpushOnce. The file content is correct on the mount and no event is printed. A localecho hi > /workspace/xprints CREATE, MODIFY and CLOSE_WRITE. - Run
astro dev(Astro 7, Vite 8, chokidar 4) on a project in the mount, with an HMR WebSocket client connected. Push an edit tosrc/site.ts: no HMR message arrives and the page keeps serving the old content. - Push a new
src/pages/nova.astro:GET /novareturns 404.
Environment
@cloudflare/computer0.4.0,computerdfrommainat 2f76387- Linux x86_64 (kernel 6.18), Node 22, libfuse 2.9.9, real FUSE (
/dev/fuse) - Host side run locally with the sync driver; not yet reproduced on Cloudflare Containers
Proposed fix
Pass the applied paths to the existing afterApply hook, and in the real FUSE backend set the times of each applied path and its parent directory through the mount after the batch commits:
ServerOptions.afterApplybecomes(applied: { readonly paths: readonly string[] }) => void | Promise<void>. The shim'safterApplyignores the argument, so existing callers keep compiling.computerdregistersafterApply: ({ paths }) => announceAppliedPaths(paths)when FUSE is mounted.utimeson the file covers edits;utimeson the parent covers creates and deletes. ENOENT is ignored.- The FUSE
utimenshandler only records times in driver metadata, so the poke does not produce a VFS change and nothing syncs back.
The patch is about 30 lines in packages/rpc/src/server.ts and packages/computerd/src/cli/computerd.ts. I can share it as a diff or open a pull request if a maintainer asks for one.
Results with the patch
| Case | Without patch | With patch |
|---|---|---|
| Pushed edit to an imported module | no HMR, stale page | full-reload 25 ms after the push, page updated |
| Pushed new page | /nova returns 404 |
/nova returns 200 |
| Pull after the poke | 0 entries | 0 entries (no echo) |
tsc --noEmit for packages/rpc and packages/computerd reports the same pre-existing errors in test files before and after the change.
Compatibility and open questions
- The hook signature change is additive for implementers of
afterApply. - Large batches: touching every applied path may be worth bounding, for example to the parent directories once a batch passes some size.
- The touch sets the times to now. Using the VFS mtime instead would keep
statconsistent with what the host wrote. - A privileged Docker test in the style of
src/exec/runner.fuse.test.tscould runinotifywaitand assert an event after a push.
- Lingua principale
- TypeScript
- Stelle
- 9.5k
- Fork
- 552
- Merge medio
- 1g 21h
- PR unite (30g)
- 42
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudflare/computer
-
Feature: add workspace.inspect() and the workspace_summary toolForse già presa @aron-cf l’ha presa 1 giorno fa. Apertaenhancement
cloudflare/computer#226 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Sync planning scans the full pending change set before yielding; repeated Durable Object CPU-limit failuresForse già presa @aron-cf l’ha presa 2 giorni fa. Apertabug
cloudflare/computer#225 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
cloudflare/computer#224 · 5 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Always run the "next" computerd workflow on push to the `release` branchForse già presa @aron-cf l’ha presa 3 giorni fa. Apertabug
cloudflare/computer#222 · 2 commenti · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Make just-bash and acorn optional peer dependencies, pulled in only by the backend that needs themApertaenhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
cloudflare/computer#220 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cloudflare/computer
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
microsoft/playwright#43327 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/TypeScript#64758 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
opensearch-project/OpenSearch-Dashboards#12937 ·
I maintainer di solito rispondono entro 2 giorni
-
Liveness marks block-included attesters live in the block's epoch instead of the attestation's epochAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
status: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
a2ui-project/a2ui#3158 ·
I maintainer di solito rispondono entro 2 giorni