Skip to content

feat(app-server): expose filesystem metadata size#28928

Open
nornagon-openai wants to merge 1 commit into
mainfrom
nornagon/codex/app-server-fs-size
Open

feat(app-server): expose filesystem metadata size#28928
nornagon-openai wants to merge 1 commit into
mainfrom
nornagon/codex/app-server-fs-size

Conversation

@nornagon-openai

Copy link
Copy Markdown
Collaborator

Why

Codex Apps adapts app-server filesystem responses to its execution-host interface, which needs file sizes from metadata queries.

What

Add sizeBytes to the fs/getMetadata response 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-schema
  • just test -p codex-app-server-protocol
  • just test -p codex-app-server fs_get_metadata
  • just fmt

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +81 to +82
#[ts(type = "number")]
pub size_bytes: u64,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant