feat(app-server): expose filesystem metadata size#28928
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e65603cc65
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #[ts(type = "number")] | ||
| pub size_bytes: u64, |
There was a problem hiding this comment.
Use an exact wire type for file sizes
When fs/getMetadata is called on a sparse or otherwise very large file whose length exceeds Number.MAX_SAFE_INTEGER, this new u64 is exposed to generated TypeScript clients as a number, so JS clients lose low bits before using the size for range/copy decisions. Since the field is meant to carry filesystem metadata, expose an exact representation (or reject/cap unsafe values) rather than advertising every u64 as a JS number.
Useful? React with 👍 / 👎.
Why
Codex Apps adapts app-server filesystem responses to its execution-host interface, which needs file sizes from metadata queries.
What
Add
sizeBytesto thefs/getMetadataresponse and map the existing filesystem metadata size through app-server. Update the protocol fixtures, API documentation, and metadata behavior coverage.This PR is intentionally limited to file size metadata. Symlink semantics and exclusive copies are split into independent changes.
Validation
just write-app-server-schemajust test -p codex-app-server-protocoljust test -p codex-app-server fs_get_metadatajust fmt