Skip to content

fix(read): reject fractional PDF page ranges#210

Open
LI-Jialu wants to merge 2 commits into
lessweb:mainfrom
LI-Jialu:main
Open

fix(read): reject fractional PDF page ranges#210
LI-Jialu wants to merge 2 commits into
lessweb:mainfrom
LI-Jialu:main

Conversation

@LI-Jialu

Copy link
Copy Markdown

Summary

Reject fractional PDF page ranges instead of silently truncating them.

Before this change, pages: "1.9" was accepted as page 1, and pages: "2.1-3.9" was accepted as 2-3. Page ranges should be positive integers, so fractional values now return a validation error.

Testing

  • cd packages/core/src/tests && node --import tsx --test tool-handlers.test.ts
  • npm run format:check -- packages/core/src/tools/read-handler.ts packages/core/src/tests/tool-handlers.test.ts
  • npm run typecheck --workspace @vegamo/deepcode-core

LI-Jialu added 2 commits June 30, 2026 13:01
Add a regression test for rejecting fractional PDF page ranges.
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