Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug]: Byte-capped Read reports prefix count as whole-file total

Abierto
#53,230 1 comentario 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@neriousy ya está trabajando en esto.

Desde el 4/10/2026.

  • #53231 de @Sypher760-gif — abierto
  • #53324 de @kpdagrt22 — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Description

The legacy Read tool reports a partial scan count as the whole-file total when it stops at the 50 KiB byte cap. For a 1,000-line file, it returns lines 1–506 with truncated: true but incorrectly reports totalLines: 507.

Steps to reproduce
  1. Create a file containing 1,000 lines of 100 ASCII characters each, joined by newlines without a trailing newline.
  2. Read it with the legacy Read tool from offset 1 with limit 2000.
  3. Inspect the raw tool metadata: the returned range is 1–506 and continuation starts at 507, but totalLines is 507 instead of an unknown total.
Expected behavior

Omit totalLines when the byte cap prevents scanning to EOF. Report the exact total after a complete scan. Returned text and continuation offsets should stay unchanged.

OpenCode version

Source checkout dev at 907b3bc518fa48e90e8ec24dd327d13eee71c36c; Bun 1.3.14 test runtime.

Operating System

Windows 11 x64.

Terminal

Git Bash; native Bun invoked through Python.

Lenguaje dominante
TypeScript
Estrellas
212k
Forks
28.1k
Merge medio
8 h 49 min
PR fusionados (30 d)
348

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de anomalyco/opencode

Todos los issues de anomalyco/opencode

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.