Skip to content

land: ten-thousand-grep - #514

Merged
ualtinok merged 6 commits into
mainfrom
land/ten-thousand-grep
Oct 18, 2026
Merged

ualtinok merged 6 commits into
mainfrom
land/ten-thousand-grep

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Separates filesystem access accounting from helper queueing so healthy reads on a loaded machine are no longer reported as blocked. The per-access time cap starts only when an admitted helper begins work; time spent waiting in the helper queue no longer counts against it. Calls that never start report read_io_queue_timeout instead of read_blocked, while the caller's own deadline stays enforced during access. Directory-probe waiters follow the owner's queue and access phase deadlines, so queue starvation and blocked running access report distinct codes while each waiter's shorter request deadline is retained.

Tests

  • Adds regression tests for queue wait not consuming the access cap, shared-probe waiter deadline and timeout-code coverage, and running access retaining the shorter request deadline.
  • Adds a 10,000-file grep integration test covering indexed and fallback root probes, plus a release note and a benchmark slice descriptor.

Written for commit b4d3b81. Summary will update on new commits.

View guided diff Turn on auto-fix

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable issues or outstanding previous findings remain.

Summary

This PR gives filesystem queueing and running access separate time limits.

  • Filesystem access gets a fresh time limit when helper work starts.
  • Directory waiters follow the shared probe’s current deadline.

Both supplied previous findings are addressed in the current code. Neither thread has a supplied comment number, so neither appears in previousFindings. No new actionable issues were found.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Q[Wait for helper] --> S{Helper starts before queue deadline?}
    S -->|No| QT[read_io_queue_timeout]
    S -->|Yes| A[Start separate access allowance]
    A --> D[Keep the earlier request deadline]
    D --> C{Access finishes in time?}
    C -->|Yes| R[Return result]
    C -->|No| B[read_blocked]
    W[Shared directory waiters] --> F[Follow owner's phase deadline]
    F --> D
Loading

Reviews (5) · Last reviewed commit: "Give the queued root-probe test seconds ..." · Reviewed by Greptile

ualtinok and others added 2 commits October 18, 2026 04:28
Start the per-access cap only when an admitted helper begins work, while retaining request/scan deadlines and queue-timeout classification for calls that never start. Queueing previously consumed almost all five seconds and a healthy access could then be labeled read_blocked.

Reproduce delayed first-root metadata access through path-keyed helper gates in both indexed and fallback 10,000-file grep. Add a focused timing regression and a shorter-request hang control; retain existing helper-count and searched-file assertions. The shared measurement assertion at base grep_executor.rs:2104 belongs to the same coverage.

Linux4c: 49 relevant unit tests passed (2 manual probes ignored); original 10k test passed 20/20. Reverting the execution-deadline reset reddened each new queue regression while queue/hang and original-count controls stayed green. Windows warning-denying cross-check, Rust format, and 16 tool-call parity tests passed. Include engine_unwired/none descriptor; no ranking behavior changed.
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Comment thread crates/aft/src/bounded_io.rs Outdated
Comment thread crates/aft/src/bounded_io.rs Outdated
Keep absent request deadlines optional, and share queue/access phase deadlines with directory-probe waiters under the owner's timing lock. Retain shorter waiter request deadlines and distinguish queue starvation from blocked running access.

Add no-budget and shared-waiter regressions, shorter-waiter deadline coverage, and shared timeout-code checks. Both deadline regressions failed before implementation and each independent reversion mutation reddened only its intended test. Existing test expectations are unchanged.

Verification: library scope excluding the baseline sandbox-network assertion passes 365 tests; Windows warning-denying test compilation, rustfmt, and 16 tool-call parity tests pass. The unmodified library gate reproduces the baseline blackholed_backend_never_blocks_status_or_search failure because the offline runner returns Network is unreachable instead of a timeout.
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@ualtinok
ualtinok added this pull request to the merge queue Oct 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 18, 2026
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@ualtinok
ualtinok added this pull request to the merge queue Oct 18, 2026
@ualtinok
ualtinok removed this pull request from the merge queue due to a manual request Oct 18, 2026
@ualtinok
ualtinok added this pull request to the merge queue Oct 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 18, 2026
The test held the root probe queued for 750 ms and running for 500 ms under a
1 s cap, leaving 500 ms for the actual root access; loaded Linux runners took
longer and failed with read_blocked. Use a 3 s cap with a 2 s queue hold and a
1.5 s running hold: queue plus running still exceeds the cap, so charging queue
time would still fail, and the real access gets 1.5 s.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@ualtinok
ualtinok added this pull request to the merge queue Oct 18, 2026
@ualtinok
ualtinok removed this pull request from the merge queue due to a manual request Oct 18, 2026
@ualtinok
ualtinok added this pull request to the merge queue Oct 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 18, 2026
The test released its held probe and then needed the real root access to
finish within 1.5 s of the cap. On a loaded Linux runner running the whole
library suite that was not enough. The holds now leave at least 4 s each
while their sum still exceeds the cap, so charging queue time still fails.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@ualtinok
ualtinok added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 1d0fc50 Oct 18, 2026
49 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