Repository navigation
[upstream pr #518] Report mtime and nlink from fs.stat, and mode, mtime and nlink from fs.list #46
Copy link
Copy link
Open
Labels
upstream-prMirrored upstream pull request as an issueMirrored upstream pull request as an issueupstream-syncMirror of Ephemeral-AI-Lab/layerfs upstreamMirror of Ephemeral-AI-Lab/layerfs upstream
Description
[upstream PR Ephemeral-AI-Lab#518] Report mtime and nlink from fs.stat, and mode, mtime and nlink from fs.list
- Upstream: Report mtime and nlink from fs.stat, and mode, mtime and nlink from fs.list Ephemeral-AI-Lab/layerfs#518
- Type: pull request
- State: OPEN
- Draft: False
- Mergeable: MERGEABLE
- Updated: 2026-10-30
- Upstream labels: -
Original body (excerpt)
Closes Ephemeral-AI-Lab#486.
fs.stat already reports mode. Readers that use only the Store still had to
call it once per directory entry for times and link counts, and it did not
report either. This adds those fields end to end.
What changes
fs.statreportsmtimeSeconds,mtimeNanosecondsandnlinkbeside
type,inode,sizeandmode.fs.listentries reportmode,mtimeSeconds,mtimeNanosecondsand
nlinkbesidename,path,typeandinode.nlinkis the committed namespace link count: 0 for the root, 1 for any
other directory or symlink, and the number of names for a regular file.
Hard-linked names shareinode.mtimeSeconds/mtimeNanosecondsare the portable modification time
(Unix epoch seconds and the fractional second). They are two integers so a
JavaScript Number keeps them exactly. A single nanosecond timestamp is not a
safe integer after 1970.- Inline portable metadata is still served from the inode value (no object
read). Root-form metadata uses the listing's existing memo. - The listing reply budget per entry is 240 bytes to cover the extra fields.
- CLI summaries for
fs statandfs listname the new fields. - Docs:
api/docs/agent.mdcovers the fields and the listing.
No Store format change: every entry already stores mode, mtime and the
namespace link count. inode was already the hard-link group id.
Commits
- feature, tests, docs and golden. Production LOC: 102831 -> 102851 (delta +20).
Tests
No test deleted or weakened. The sdk_methods golden adds the new fields to
its fs.stat and fs.list lines; mtime integers are masked as <varies>.
- New
engine/crates/layerfs-api/tests/fs_stat_metadata.rs: Init keeps a
host mtime and hard link;fs.statandfs.listagree; a content write's
mtime reads back;mainis untouched. sdk_method_golden,sdk_list_entries,fs_mode,stat_symlink,
write_refusals: pass.- rustfmt, and Clippy
-D warningsonlayerfs-store-serviceand
layerfs-api: clean. - JS against the fake binding:
api/agent/test/calls.mjsand
api/cli/test/cli.test.mjs: pass.
Not run: the macOS/Windows worker routes. They forward the same SDK calls and
were not changed.
Author
- I ran the checks listed above
- Docs match the implemented fields
Demo
Sync note
这是只读镜像,不是上游仓库的替代。上游 issue/PR 仍是唯一真源;本镜像不复制评论、不复制代码分支。
Metadata
Metadata
Assignees
Labels
upstream-prMirrored upstream pull request as an issueMirrored upstream pull request as an issueupstream-syncMirror of Ephemeral-AI-Lab/layerfs upstreamMirror of Ephemeral-AI-Lab/layerfs upstream

Activity