Skip to content

fix: preserve int64 file IDs - #228

Open
victor0602 wants to merge 1 commit into
mainfrom
codex/preserve-file-id
Open

fix: preserve int64 file IDs#228
victor0602 wants to merge 1 commit into
mainfrom
codex/preserve-file-id

Conversation

@victor0602

@victor0602 victor0602 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Stop coercing file IDs through JavaScript Number in CLI and FileSDK deletion paths.
  • Normalize positive int64 IDs as decimal strings and reject invalid or unsafe numeric inputs locally.
  • Support string, safe integer number, and bigint inputs in FileSDK.
  • Add coverage for IDs above Number.MAX_SAFE_INTEGER and the int64 boundary.

Why

JavaScript Number cannot precisely represent the complete int64 range documented by the file deletion API.

Impact

Large file IDs are sent without precision loss, while existing safe numeric callers remain supported.

Checks

  • bun test — 453 passed
  • bun run typecheck
  • bun run lint — no errors; one pre-existing test warning
  • git diff --check

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@victor0602
victor0602 marked this pull request as ready for review August 5, 2026 12:11
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