Repository navigation
Conversation
Starting a worker for another LayerFS home currently sweeps every layerfs-worker-* directory in the shared temporary parent. This removes a live peer's private overlay and output-spool paths, breaking subsequent Store writes and large workspace.exec results with ENOENT. Remove that startup sweep. Keep the existing random per-start directory and instance-owned graceful-shutdown cleanup. Add real-addon regression coverage for container and stdin startup, independent writes, spooled output, peer shutdown and retained failure evidence. Production LOC: 102831 -> 102830 (delta -1) Scope: combined first-party core, engine and api product source; tests, docs, tools, generated and third-party sources excluded. Method: tools/production_loc.py --root <git-archive-tree> --json on exact parent 35d3657 and staged tree 038697c, using counter blob 3341e4d on both trees. Reference absent (retired R9c; last counted 65,417 at tree 498dd19).
This was referenced Oct 30, 2026
[upstream pr #503] fix(runtime): preserve peer worker temporary directories
tokenaissance/layerfs#51
Open
Member
|
感谢贡献,也感谢 AI 协作工具在多 home 场景下发现这个误删缺陷 🙏 真实评估(已读 diff):原 对 AI agent 的使用价值:这是多个 agent 工具(各自独立 LayerFS home)在同一台机器共存的基础保障。 建议:合入前在真实双 home 环境实测一次(先起 A、再起/停 B、确认 A 的 worker 存活且后续调用正常)。功能性调整等 LayerFS 2.0(#446)发布后再做。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Starting a worker for a second LayerFS home deletes the first worker's live temporary directory when they share a temporary parent. The first worker stays alive, but its next
fs.writefails to bind its private overlay withENOENT;workspace.execoutput beyond the inline limit also fails when it needs its output spool.Remove the prefix-wide startup cleanup. Each start already creates a random private directory, and graceful stdin shutdown already removes only that instance's directory. Directories left by abnormal exits remain available for explicit cleanup rather than being deleted by another worker.
Add
api/runtime/test/verify/worker_temp_real.mjs, using the real addon, Disposable Store, Docker and daemon. It starts two homes under an isolated shared TMPDIR and checks:Validation on Linux/WSL2 with Node 22.19.0 and Rust 1.85.1:
ENOENTand passes after this fix.worker_temp_real.mjs containerandworker_temp_real.mjs stdinpass undertools/worktree.py run --timeout 90with fresh isolated Stores.worker_real.mjs inner, plus runtimetransport-order,macos-worker,worker-framesandworker-docker, pass.cargo test --locked --offline -p layerfs-node -p layerfs-daemon --all-targets --no-run, warning-denying Clippy for the same targets,cargo fmt --all -- --check, andgit diff --checkpass.Both startup protocols were exercised on Linux; native macOS and Windows launcher integration was not tested. No SDK documentation changes are included.