Skip to content

fix: upgrade isbinaryfile to 5.0.7#88

Merged
edelauna merged 1 commit into
Zoo-Code-Org:mainfrom
f14XuanLv:fix/upgrade-isbinaryfile-to-5.0.7
May 13, 2026
Merged

fix: upgrade isbinaryfile to 5.0.7#88
edelauna merged 1 commit into
Zoo-Code-Org:mainfrom
f14XuanLv:fix/upgrade-isbinaryfile-to-5.0.7

Conversation

@f14XuanLv

@f14XuanLv f14XuanLv commented May 13, 2026

Copy link
Copy Markdown
Contributor

Related GitHub Issue

This PR addresses the same root cause as the following Roo Code issues (inherited bug, still present in Zoo Code):

Roo Code Task Context (Optional)

N/A

Description

This PR upgrades the isbinaryfile dependency from ^5.0.2 (resolving to buggy 5.0.4) to ^5.0.7 to fix a crash when processing files containing multibyte UTF-8 characters (Chinese, Japanese, Korean, emoji, etc.).

Problem

When Zoo Code processes a file whose UTF-8 multibyte sequence falls across the 512-byte buffer boundary used for binary detection, the extension crashes with:

RangeError: Invalid array length
    at isbinaryfile@5.0.4/lib/index.js:36:16
    at readProtoMessage (isbinaryfile@5.0.4/lib/index.js:68:20)
    at isBinaryProto (isbinaryfile@5.0.4/lib/index.js:82:14)
    at isBinaryCheck (isbinaryfile@5.0.4/lib/index.js:228:32)

Version history of isbinaryfile

  • 5.0.4 — Crashes on certain UTF-8 files ❌
  • 5.0.7 — Comprehensive fix for both issues ✅

Changes

# src/package.json
- "isbinaryfile": "^5.0.2",
+ "isbinaryfile": "^5.0.7"

pnpm-lock.yaml is updated accordingly (5.0.45.0.7).

Test Procedure

  1. Download the test fixture: utf8-boundary-truncation_case.py (contains Chinese comments positioned exactly at the 510–512 byte boundary).
  2. Open it in a workspace and ask Zoo Code to read/analyze the file.
  3. Before this PR: extension crashes with RangeError: Invalid array length (see screenshot below).
  4. After this PR: file is correctly identified as a Python text file and processed normally.

The fixture is also part of the upstream test suite to prevent regression.

Pre-Submission Checklist

  • Issue Linked: References original Roo Code issues #8109 and #6242
  • Scope: Focused dependency bump only
  • Self-Review: Reviewed (two-line dependency update + lockfile)
  • Testing: Reproduced the crash on 5.0.4 and verified the fix on 5.0.7
  • Documentation Impact: None required
  • Contribution Guidelines: Read and agreed

Screenshots / Videos

Crash reproduced on Zoo Code (with isbinaryfile@5.0.4):

zoo_crash

Error: RangeError: Invalid array length when reading a UTF-8 file with Chinese characters at the buffer boundary. The extension becomes unresponsive.

After applying this PR (isbinaryfile@5.0.7), the same file is processed without error. Verification can be reproduced via the test procedure above.

Documentation Updates

  • No documentation updates are required.

Get in Touch

GitHub: @f14XuanLv
Discord: f14xuanlv

Summary by CodeRabbit

  • Chores
    • Updated an internal dependency to improve stability and compatibility. This brings in upstream fixes and reduces potential runtime issues without changing any user-facing APIs or workflows. No additional configuration is required.

Review Change Stack

@f14XuanLv f14XuanLv requested a review from hannesrudolph as a code owner May 13, 2026 12:33
@coderabbitai

coderabbitai Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5fb29f2c-7dcf-4282-88b2-a414263b2911

📥 Commits

Reviewing files that changed from the base of the PR and between 43196f256ac8c68130673dcfb108c58735b3917c and 187a55f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • src/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/package.json

📝 Walkthrough

Walkthrough

This PR updates src/package.json, changing the dependencies.isbinaryfile version from ^5.0.2 to ^5.0.7.

Changes

Dependency Version Update

Layer / File(s) Summary
isbinaryfile version bump
src/package.json
Dependency version constraint updated from ^5.0.2 to ^5.0.7.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I’m a rabbit with a tiny quill,
I hopped and bumped a package, what a thrill.
isbinaryfile now sings five-dot-seven,
Patch-lined paths toward a safer heaven.
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: upgrade isbinaryfile to 5.0.7' directly and specifically describes the main change in the PR: upgrading a single dependency version.
Description check ✅ Passed The PR description comprehensively covers all required template sections: linked issues, problem context, implementation details, test procedure with specific reproduction steps, completed checklist items, and supporting evidence (screenshots).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@roomote

roomote Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor

1 check still pending after the review wait window.

  • platform-unit-test (windows-latest) is still pending after the 10-minute wait window.

@codecov

codecov Bot commented May 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@edelauna edelauna force-pushed the fix/upgrade-isbinaryfile-to-5.0.7 branch from 43196f2 to 187a55f Compare May 13, 2026 15:11

@edelauna edelauna 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.

Thank you for addressing this and referencing the upstream issue.

@edelauna edelauna merged commit 58da384 into Zoo-Code-Org:main May 13, 2026
10 checks passed
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.

2 participants