Skip to content

fix: bound agentgrep memory, cancel searches, report Windows usage - #1954

Merged
1jehuang merged 9 commits into
masterfrom
fix/1932-search-resource-limits
Oct 24, 2026
Merged

1jehuang merged 9 commits into
masterfrom
fix/1932-search-resource-limits

Conversation

@1jehuang

@1jehuang 1jehuang commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

Refs #1932. Uses released agentgrep v0.2.0 (commit a2c52bb), which merged 1jehuang/agentgrep#9.

  • Use bounded subprocess capture and finite native-search budgets instead of accumulating arbitrary ripgrep output or whole trees.
  • Propagate foreground cancellation, background cancellation, and reload cancellation to the blocking search. Keep timeout promotion alive until its background owner is cancelled.
  • Report real Windows current/peak working set and separate private committed bytes, rather than returning null RSS or mislabeling private commit as virtual address space.
  • Add focused native Windows CI for cancellation and memory telemetry.

Validation

  • Dependency: justrust check --all-targets and justrust test --all-targets, 94 passed, 1 intentionally ignored subprocess fixture. Final revision Linux and native Windows resource-safety CI both passed.
  • Final --locked check against the published Git pin passed, followed by 37 agentgrep tests, 22 background tests, and 16 memory tests (75 passed total). These ran locally after the hosted service returned HTTP 404. Tests used the shared working checkout; isolated-branch cargo metadata --locked also passed.
  • Workflow syntax: actionlint passed.
  • A controlled Linux CLI fixture (7 MB, one million matches) measured sampled peak parent RSS around 98 MiB before and 24 MiB after. The bounded version deliberately returns an output-budget error, not a million-match result. This is not a benchmark of equivalent output or a reproduction of the reporter's full Windows workload.

Scope and remaining acceptance

This branch contains only the issue-specific changes, isolated from unrelated unpublished commits and staged edits in the working checkout. Tests run in that shared checkout; CI validates the isolated branch. Existing source/test-size and formatting problems outside this change are not included.

The PR remains draft pending full integration validation. CI formatting currently fails in three TUI files unchanged from the base branch, and isolated source-size checks report pre-existing violations outside this PR. Keep the issue open until native Windows Jcode checks and a representative repeated-search/junction workload establish the reported growth is resolved. Native filesystem calls remain cooperatively interruptible between calls, and these budgets are not an OS-level memory sandbox for ripgrep.


Jcode agent (automated triage), on behalf of @1jehuang

@1jehuang
1jehuang marked this pull request as ready for review October 24, 2026 05:00
@1jehuang
1jehuang merged commit 789cd95 into master Oct 24, 2026
13 of 17 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.

1 participant