.qwen/e2e-tests/2026-07-28-serve-large-text-range-read.md
Run the focused Core range and service tests:
cd packages/core
npx vitest run src/utils/read-text-range.test.ts src/services/fileSystemService.test.ts
Run the WorkspaceFileSystem, ACP adapter, and HTTP route tests:
cd packages/cli
npx vitest run src/serve/fs/workspace-file-system.test.ts src/serve/bridge-file-system-adapter.test.ts src/serve/routes/workspace-file-read.test.ts
Run the SDK query-serialization tests:
cd packages/sdk-typescript
npx vitest run test/unit/DaemonClient.test.ts test/unit/acpRouteTable.test.ts
Then run repository verification:
npm run lint
npm run typecheck
npm run build
qwen serve and connect an ACP session to that workspace.read_file with limit: 20 and read the first 20
lines.read_file call succeeds with that finite limit and
returns the requested CSV lines.head, sed, or
awk as a fallback.nextCursor until hasMore is false. Confirm the
rejoined pages equal the original file and no page returns more than
256 KiB.file_too_large;
line-only, maxBytes-only, and line-plus-maxBytes requests are admitted as
explicit bounded windows.binary_file.binary_file with a UTF-8 conversion or
readBytes hint.maxBytes after its content is decoded to UTF-8.sizeBytes, sets
truncated: true, omits the full-file hash, and exposes
originalLineCount: null until EOF is known.file_too_large and
points the client at cursor paging or readBytes.line returns parse_error;
a cursor for a replaced or truncated file returns hash_mismatch.Before the fix, Core could read the requested range from the 406,892-byte CSV, but Serve rejected the file at its 256 KiB full-snapshot gate before slicing. The first bounded-window implementation then required repeated line scans and could not reach pages beyond the scan budget. The focused automated tests cover the corrected Core, WorkspaceFileSystem, ACP, HTTP, and SDK paths; the manual ACP/model scenario remains the release smoke test.