You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] File reads load entire files before truncating and report partial data as complete #248
readFile calls readFileSync(abs, "utf8") before slicing to MAX_OUTPUT. It can synchronously load an arbitrarily large workspace file, block the console, and return only a prefix with exit code 0 and no truncation marker. Unlike snapshot, it does not check size or reject binary content.
Fix / acceptance
Read a bounded byte/line range from the file instead of loading the whole file. Return path, returned range, total size where known, and an explicit truncation/continuation indication.
Reject or clearly identify binary/unsupported content. Preserve valid UTF-8 at range boundaries and existing workspace path checks.
Add optional range arguments through the canonical registry/protocol and relevant local/hosted consumers; keep existing callers compatible through a bounded default.
Test a large/sparse file, final-line continuation, empty file, binary file, multibyte boundaries and read errors. Memory must scale with the requested bound, not file size, and partial content must never masquerade as a complete file.
Priority: P1. This prevents partial reads from feeding unsafe whole-file replacements.
Activity
fix: bound file reads and report continuation (#248) (#260)