Skip to content

fix(fleet-search): align the search client surface with atlas-search - #13326

Merged
dezren39 merged 1 commit into
mainfrom
lane-xf-13281
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-xf-13281

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Aligns the fleet search client surface with atlas-search on the four disagreements the Atlas book survey recorded:

  1. fleet search serve — help, behaviour, and the client parser's error string disagreed. The binary routes search serve to the serve role before the client parser runs (live behaviour: it starts the service), so the rejection arm in cli.rs was dead for serve and its text wrongly lumped serve with init/fetch-model. serve now has its own arm naming the routed shape; init/fetch-model keep the rejection.
  2. The "mirroring" claim — help now names the surface as the wire-translating subset of atlas-search search. The omitted-flag count is pinned at 20, verified name-by-name against atlas-search's argument parser (the survey said 21 in one place; its own enumeration is 20). --expand is validated 0..=100 and --hydrate at most 1000 in the request builder, matching atlas-search's caps; the --model default is spelled in full in help.
  3. get-chunk — both usage texts now document that every argument beyond --neighbors/--text is forwarded verbatim to atlas-search get-chunk, whose --context/--backend/--db/--vecdb/--via-service/--service-url therefore work through the verb.
  4. = spelling — parse_search_args splits --flag=value like the serve role's parser (and clap); switches reject an attached value.

Books updated per the docs-sync contracts: the Atlas chapter records the aligned state; the fleet chapter drops the resolved model-spelling discrepancy note and documents the delegation.

Verification: cargo test -p fleet-search — 98 passed, 0 failed (laptop route); nix build .#atlas-docs and nix build .#fleet-docs both build. A remote dispatch of the same suite is running on this head.

Closes #13281


Get evidence
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…13281)

- cli.rs run(): `serve` gets its own arm naming the routed shape
  (`fleet search serve` is routed to `fleet serve search` by the
  binary); the old arm lumped it with the init/fetch-model
  rejection and called it "not part of the surface".
- proto_request: --expand validated 0..=100 (atlas-core
  MAX_EXPAND_NEIGHBORS) and --hydrate at most 1000 (atlas-proto
  request validation); both were checked only >= 0.
- parse_search_args: accept `--flag=value` alongside `--flag
  value`, splitting on `=` like the serve role's parser (and
  clap); switches reject an attached value.
- Help: the search options are named as the wire-translating
  subset of atlas-search search (not "mirroring"); the --model
  default is spelled in full; get-chunk's verbatim delegation of
  atlas-search's --context/--backend/--db/--vecdb/--via-service/
  --service-url is documented in both usage texts.
- Books: atlas chapter records the aligned state and pins the
  omitted-flag count at 20 (verified against atlas-search's
  parser); fleet chapter drops the resolved model-spelling
  discrepancy note and documents the delegation.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 11fff4e1-f87c-471d-a6d2-cf497c2c6e4d
Commits

Reviewing files that changed from the base of the PR and between b31cb2d and e4b3254.

Files selected for processing: 3

  • pkgs/atlas-search/book/reference/fleet-search.md
  • pkgs/fleet/book/reference/search.md
  • pkgs/fleet/crates/fleet-search/src/cli.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T13:36:02.757099Z e4b3254 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e4b325476f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +868 to +871
let spaced = parse_search_args(&args(&["q", "--k", "5", "--mode", "fts"])).unwrap();
let joined = parse_search_args(&args(&["q", "--k=5", "--mode=fts"])).unwrap();
assert_eq!(joined.k, spaced.k);
assert_eq!(joined.mode, spaced.mode);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Cover the argument-spelling invariant with property tests

The new --flag=value behavior establishes an equivalence invariant for every value-taking flag, but this test compares the two spellings only for fixed --k and --mode examples. This violates the repository testing doctrine requiring property tests for meaningful parser invariants; example tests do not replace that coverage. Add a proptest generating supported flags and values and comparing the parsed results of spaced and joined forms, with parsed-result equivalence as the oracle. The crate already has a proptest dev-dependency.

AGENTS.md reference: AGENTS.md:L36-L39

Useful? React with 👍 / 👎.

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.

fleet search surface disagreements: serve routing, the mirroring claim, get-chunk delegation, = spelling (book survey, #13251)

1 participant