Commit Graph

17 Commits

  • Fixed a flaky Windows test that is consistently causing a CI failure (#10987)
    Loop wait_for_complete/wait_for_updates_at_least until deadline to
    prevent Windows CI false timeouts in query-change session tests.
  • file-search: multi-root walk (#10240)
    Instead of a separate walker for each root in a multi-root walk, use a
    single walker.
  • file-search: improve file query perf (#9939)
    switch nucleo-matcher for nucleo and use a "file search session" w/ live
    updating query instead of a single hermetic run per query.
  • feat: move file name derivation into codex-file-search (#8334)
    ## Summary
    
      - centralize file name derivation in codex-file-search
      - reuse the helper in app-server fuzzy search to avoid duplicate logic
      - add unit tests for file_name_from_path
    
      ## Testing
    
      - cargo test -p codex-file-search
      - cargo test -p codex-app-server
  • Follow symlinks during file search (#4453)
    I have read the CLA Document and I hereby sign the CLA
    
    Closes #4452
    
    This fixes a usability issue where users with symlinked folders in their
    working directory couldn't search those files using the `@` file search
    feature.
    
    ## Rationale
    
    The "bug" was in the file search implementation in
    `codex-rs/file-search/src/lib.rs`. The `WalkBuilder` was using default
    settings which don't follow symlinks, causing two related issues:
    
    1. Partial search results: The `@` search would find symlinked
    directories but couldn't find files inside them
    2. Inconsistent behavior: Users expect symlinked folders to behave like
    regular folders in search results.
    
    ## Root cause
    
    The `ignore` crate's `WalkBuilder` defaults to `.follow_links(false)`
    [[source](https://github.com/BurntSushi/ripgrep/blob/9802945e6342ec284633924cb7d8d3ce67204995/crates/ignore/src/walk.rs#L532)],
    so when traversing the file system, it would:
    
    - Detect symlinked directories as directory entries
    - But not traverse into them to index their contents
    - The `get_file_path` function would then filter out actual directories,
    leaving only the symlinked folder itself as a result
    
    Fix: Added `.follow_links(true)` to the `WalkBuilder` configuration,
    making the file search follow symlinks and index their contents just
    like regular directories.
    
    This change maintains backward compatibility since symlink following is
    generally expected behavior for file search tools, and it aligns with
    how users expect the `@` search feature to work.
    
    Co-authored-by: Eric Traut <etraut@openai.com>
  • [App Server] Allow fetching or resuming a conversation summary from the conversation id (#5890)
    This PR adds an option to app server to allow conversation summaries to
    be fetched from just the conversation id rather than rollout path for
    convenience at the cost of some latency to discover the rollout path.
    
    This convenience is non-trivial as it allows app servers to simply
    maintain conversation ids rather than rollout paths and the associated
    platform (Windows) handling associated with storing and encoding them
    correctly.
  • fix: resume lookup for gitignored CODEX_HOME (#5311)
    Walk the sessions tree instead of using file_search so gitignored
    CODEX_HOME directories can resume sessions. Add a regression test that
    covers a .gitignore'd sessions directory.
    
    Fixes #5247
    Fixes #5412
    
    ---------
    
    Co-authored-by: Owen Lin <owen@openai.com>
  • [mcp-server] Expose fuzzy file search in MCP (#2677)
    ## Summary
    Expose a simple fuzzy file search implementation for mcp clients to work
    with
    
    ## Testing
    - [x] Tested locally
  • Improve @ file search: include specific hidden dirs such as .github, .gitlab (#2981)
    # Improve @ file search: include specific hidden dirs
    
    This should close #2980
    
    ## What
    - Extend `@` fuzzy file search to include select top-level hidden
    directories:
    `.github`, `.gitlab`, `.circleci`, `.devcontainer`, `.azuredevops`,
    `.vscode`, `.cursor`.
    - Keep all other hidden directories excluded to avoid noise and heavy
    traversals.
    
    ## Why
    - Common project config lives under these dot-dirs (CI, editor,
    devcontainer); users expect `@.github/...` and similar paths to resolve.
    - Prior behavior hid all dot-dirs, making these files undiscoverable.
    
    ## How
    - In `codex-file-search` walker:
      - Enable hidden entries via `WalkBuilder.hidden(false)`.
    - Add `filter_entry` to only allow those specific root dot-directories;
    other hidden paths remain filtered out.
      - Preserve `.gitignore` semantics and existing exclude handling.
    
    ## Local checks
    - Ran formatting: `just fmt`
    - Ran lint (scoped): `just fix -p codex-file-search`
    - Ran tests:
      - `cargo test -p codex-file-search`
      - `cargo test -p codex-tui`
    
    ## Readiness
    - Branch is up-to-date locally; tests pass; lint/format applied.
    - No merge conflicts expected.
    - Marking Ready for review.
    
    ---------
    
    Signed-off-by: lionelchg <lionel.cheng@hotmail.fr>
  • chore: upgrade to Rust 1.89 (#2465)
    Codex created this PR from the following prompt:
    
    > upgrade this entire repo to Rust 1.89. Note that this requires
    updating codex-rs/rust-toolchain.toml as well as the workflows in
    .github/. Make sure that things are "clippy clean" as this change will
    likely uncover new Clippy errors. `just fmt` and `cargo clippy --tests`
    are sufficient to check for correctness
    
    Note this modifies a lot of lines because it folds nested `if`
    statements using `&&`.
    
    ---
    [//]: # (BEGIN SAPLING FOOTER)
    Stack created with [Sapling](https://sapling-scm.com). Best reviewed
    with [ReviewStack](https://reviewstack.dev/openai/codex/pull/2465).
    * #2467
    * __->__ #2465
  • chore(rs): update dependencies (#1494)
    ### Chores
    - Update cargo dependencies
    - Remove unused cargo dependencies
    - Fix clippy warnings
    - Update Dockerfile (package.json requires node 22)
    - Let Dependabot update bun, cargo, devcontainers, docker,
    github-actions, npm (nix still not supported)
    
    ### TODO
    - Upgrade dependencies with breaking changes
    
    ```shell
    $ cargo update --verbose
       Unchanged crossterm v0.28.1 (available: v0.29.0)
       Unchanged schemars v0.8.22 (available: v1.0.4)
    ```
  • feat: introduce --compute-indices flag to codex-file-search (#1419)
    This is a small quality-of-life feature, the addition of
    `--compute-indices` to the CLI, which, if enabled, will compute and set
    the `indices` field for each `FileMatch` returned by `run()`. Note we
    only bother to compute `indices` once we have the top N results because
    there could be a lot of intermediate "top N" results during the search
    that are ultimately discarded.
    
    When set, the indices are included in the JSON output when `--json` is
    specified and the matching indices are displayed in bold when `--json`
    is not specified.
  • feat: make file search cancellable (#1414)
    Update `run()` to take `cancel_flag: Arc<AtomicBool>` that the worker
    threads will periodically check to see if it is `true`, exiting early
    (and returning empty results) if so.
  • chore: change arg from PathBuf to &Path (#1409)
    Caller no longer needs to clone a `PathBuf`: can just pass `&Path`.
  • fix: add tiebreaker logic for paths when scores are equal (#1400)
    ---
    [//]: # (BEGIN SAPLING FOOTER)
    Stack created with [Sapling](https://sapling-scm.com). Best reviewed
    with [ReviewStack](https://reviewstack.dev/openai/codex/pull/1400).
    * #1401
    * __->__ #1400
  • feat: standalone file search CLI (#1386)
    Standalone fuzzy filename search library that should be helpful in
    addressing https://github.com/openai/codex/issues/1261.