发布

  • fix(grep): enforce_time_budget option for zero-match searches (#826) (#827)
    e2e Tests / e2e (macos-latest) (push) Has been cancelled
    e2e Tests / e2e (ubuntu-latest) (push) Has been cancelled
    e2e Tests / e2e (windows-latest) (push) Has been cancelled
    e2e Tests / e2e (alpine-musl) (push) Has been cancelled
    Lua CI / lua-language-server type check (push) Has been cancelled
    Lua CI / luacheck lint (push) Has been cancelled
    Nix CI / check (push) Has been cancelled
    Oxc / Check packages with oxfmt and oxlint (push) Has been cancelled
    Python CI / Python bindings (macos-latest) (push) Has been cancelled
    Python CI / Python bindings (ubuntu-latest) (push) Has been cancelled
    Python CI / Python bindings (windows-latest) (push) Has been cancelled
    Build & Publish / Build Neovim aarch64-apple-darwin (push) Has been cancelled
    Build & Publish / Build Neovim aarch64-linux-android (push) Has been cancelled
    Build & Publish / Build Neovim aarch64-pc-windows-msvc (push) Has been cancelled
    Build & Publish / Build Neovim aarch64-unknown-linux-gnu (push) Has been cancelled
    Build & Publish / Build Neovim aarch64-unknown-linux-musl (push) Has been cancelled
    Build & Publish / Build Neovim x86_64-apple-darwin (push) Has been cancelled
    Build & Publish / Build Neovim x86_64-pc-windows-msvc (push) Has been cancelled
    Build & Publish / Build Neovim x86_64-unknown-linux-gnu (push) Has been cancelled
    Build & Publish / Build Neovim x86_64-unknown-linux-musl (push) Has been cancelled
    Build & Publish / Build C FFI aarch64-apple-darwin (push) Has been cancelled
    Build & Publish / Build C FFI aarch64-linux-android (push) Has been cancelled
    Build & Publish / Build C FFI aarch64-pc-windows-msvc (push) Has been cancelled
    Build & Publish / Build C FFI aarch64-unknown-linux-gnu (push) Has been cancelled
    Build & Publish / Build C FFI aarch64-unknown-linux-musl (push) Has been cancelled
    Build & Publish / Build C FFI x86_64-apple-darwin (push) Has been cancelled
    Build & Publish / Build C FFI x86_64-pc-windows-msvc (push) Has been cancelled
    Build & Publish / Build C FFI x86_64-unknown-linux-gnu (push) Has been cancelled
    Build & Publish / Build C FFI x86_64-unknown-linux-musl (push) Has been cancelled
    Build & Publish / Build MCP aarch64-apple-darwin (push) Has been cancelled
    Build & Publish / Build MCP aarch64-pc-windows-msvc (push) Has been cancelled
    Build & Publish / Build MCP aarch64-unknown-linux-gnu (push) Has been cancelled
    Build & Publish / Build MCP aarch64-unknown-linux-musl (push) Has been cancelled
    Build & Publish / Build MCP x86_64-apple-darwin (push) Has been cancelled
    Build & Publish / Build MCP x86_64-pc-windows-msvc (push) Has been cancelled
    Build & Publish / Build MCP x86_64-unknown-linux-gnu (push) Has been cancelled
    Build & Publish / Build MCP x86_64-unknown-linux-musl (push) Has been cancelled
    Build & Publish / Build Python wheels aarch64 (macos-latest) (push) Has been cancelled
    Build & Publish / Build Python wheels x86_64 (macos-latest) (push) Has been cancelled
    Build & Publish / Build Python wheels aarch64 (ubuntu-latest) (push) Has been cancelled
    Build & Publish / Build Python wheels x86_64 (ubuntu-latest) (push) Has been cancelled
    Build & Publish / Build Python wheels x86_64 (windows-latest) (push) Has been cancelled
    Build & Publish / Build Python sdist (push) Has been cancelled
    Spelling / Spell Check with Typos (push) Has been cancelled
    Stylua / Check lua files using Stylua (push) Has been cancelled
    Rust CI / Test (macos-latest) (push) Has been cancelled
    Rust CI / Test (ubuntu-latest) (push) Has been cancelled
    Rust CI / Test (windows-latest) (push) Has been cancelled
    Rust CI / Fuzz Tests (macos-latest) (push) Has been cancelled
    Rust CI / Fuzz Tests (ubuntu-latest) (push) Has been cancelled
    Rust CI / Fuzz Tests (windows-latest) (push) Has been cancelled
    Rust CI / Build i686-unknown-linux-gnu (push) Has been cancelled
    Rust CI / cargo fmt (push) Has been cancelled
    Rust CI / cargo clippy (push) Has been cancelled
    Build & Publish / Release (push) Has been cancelled
    Build & Publish / Publish Python wheels to PyPI (push) Has been cancelled
    Build & Publish / Publish Rust crates (push) Has been cancelled
    Build & Publish / Publish npm packages (push) Has been cancelled

    frostbyte_neo 发布于 2026-09-08 18:53:07 +00:00

    • fix: enforce grep time budget on zero-match searches (#826)

    The plain/regex deadline check was gated on all_matches.len() > 1, so a
    search that matched nothing never aborted and scanned every candidate file.
    Removing the gate alone is not enough: both accounting paths overwrote
    files_consumed with the full slice length whenever no file matched, which
    zeroed out next_file_offset and lost the resume cursor.

    Workers now latch the abort in their map_init state and record the lowest
    index they skipped, so the resume cursor is the exact first unsearched file.
    Matches past that index are dropped and re-found on the next page, keeping
    paging free of both gaps and duplicates.

    Closes #826

    • fix(grep): gate zero-match time budget behind enforce_time_budget (#826)

    Per review: enforcing the budget on zero-match searches unconditionally
    changes behaviour for existing callers, who relied on a full scan when
    nothing matched. Make it opt-in instead.

    • GrepSearchOptions.enforce_time_budget, default false. Off keeps the
      historical plain/regex rule (budget dormant until matches exist).
    • Exposed as enforceTimeBudget (node/bun), enforce_time_budget
      (lua config + python kwarg), and new fff_live_grep_ex /
      fff_multi_grep_ex C symbols. The existing C symbols keep their exact
      signature and forward with false.
    • Fuzzy grep already enforced the budget unconditionally; unchanged.
    • Cursor accounting fix stays unconditional: an aborted page now reports
      how far it actually got instead of claiming the whole slice.
    • Never skip file 0, so an abort cannot emit next_file_offset == 0,
      which callers read as "done".
    • test(grep): move zero-match budget helpers to end of file

    Repo style: private helpers live at the bottom, plain comments not doc
    comments.

    • fix(python): declare enforce_time_budget in grep type stubs

    • refactor(grep): drop redundant budget_exceeded flag and tighten comments


    Co-authored-by: gustav-fff 286169375+gustav-fff@users.noreply.github.com
    Co-authored-by: Dmitriy Kovalenko dmtr.kovalenko@outlook.com

    下载附件