Skip to content

fix(sourcehunt): file reading updates to reduce stalling - #245

Open
jorge-garcia-le wants to merge 5 commits into
fix/stalling-searchesfrom
fix/sourcehunt-read-file-pagination
Open

jorge-garcia-le wants to merge 5 commits into
fix/stalling-searchesfrom
fix/sourcehunt-read-file-pagination

Conversation

@jorge-garcia-le

@jorge-garcia-le jorge-garcia-le commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Make read_file return complete source lines with an explicit continuation line and EOF status based on delivered content.
  • Reduce the default read window to 100 lines and align tool-start range reporting.
  • Track source lines actually delivered to each hunter in a merged, run-wide coverage ledger. Use the same ledger for read-overlap metadata and stall progress, normalize repository-relative and /workspace paths, and retain coverage through context compaction.
  • Check every fully covered read_file or read_function request. Give the model one retry per turn, then block another covered read without refresh=true before the tool runs. Show all merged coverage ranges for the file and its total line count in the warning. Explicit refreshes remain available and add no new source coverage or stall progress.
  • Route successful read_function calls through the same 12,000-character source view, delivered-line coverage ledger, and stall-progress accounting as read_file. Resolve function names through the callgraph, and direct truncated function reads to the next read_file range.
  • Add regression coverage for clipping, EOF, continuation, path aliases, compaction, mixed tool batches, retry accounting, covered reads of different ranges in the same file, file-wide warning text, and function reads that are new, covered, long, missing, or ambiguous.

Evaluation comparison

Using qwen3.8-27b

CVE Main branch Current branch
CVE-2026-32316 Fail; stalled Pass; completed
CVE-2026-44420 Fail; stalled Pass; completed
CVE-2026-45796 Fail; stalled Pass; completed
CVE-2026-27775 Pass; stalled Pass; completed
CVE-2026-41401 Fail; stalled Fail; completed with an unrelated finding

@jorge-garcia-le
jorge-garcia-le force-pushed the fix/sourcehunt-read-file-pagination branch from 6cad9e8 to 849fd87 Compare September 30, 2026 23:23
@jorge-garcia-le
jorge-garcia-le added this pull request to stack #246 October 1, 2026 05:18
@jorge-garcia-le jorge-garcia-le changed the title fix(sourcehunt): make file read pagination truthful fix(sourcehunt): file reading updates to reduce stalling Oct 1, 2026
@jorge-garcia-le
jorge-garcia-le marked this pull request as ready for review October 1, 2026 05:31
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