Skip to content

atlas/fleet-search: #9973 trace capture was never mirrored into the fleet-search copy — fleet serve search writes no atlas-query-trace records and omits query_id (parity guard red on main) #10445

Closed

Description

@dezren39

What's wrong

bash .github/scripts/check-fleet-search-parity.sh fails on current main HEAD 73ae4d58dc2b4268ab8acbf8fe69ea2ca4a59092 (exit 1) with two divergences between the atlas-search originals and their fleet-search copies:

::error::check-fleet-search-parity: render.rs diverged ...
@@ -97,9 +97,6 @@
         if let Some(qid) = out.get("query_id") {
             lines.push(format!("query_id: {}", py_str(Some(qid))));
         }
::error::check-fleet-search-parity: server.rs diverged ...
-use JsonlTraceSink ... TraceContext ... run_search_with_executor_traced,
+run_search_with_executor(
  • pkgs/atlas-search/crates/atlas-search/src/server.rs:671-687 builds JsonlTraceSink::new(JsonlTraceSink::default_dir()) and TraceContext::new("service-api", "agent", "atlas-service") and calls run_search_with_executor_traced(...). The fleet copy pkgs/fleet/crates/fleet-search/src/server.rs:668-676 calls plain run_search_with_executor(...) — the whole crate has zero references to JsonlTraceSink/TraceContext/run_search_with_executor_traced (grep -rn over pkgs/fleet/crates/fleet-search/src/ returns nothing).
  • pkgs/atlas-search/crates/atlas-search/src/render.rs:104-106 prints a query_id: line in human output; pkgs/fleet/crates/fleet-search/src/render.rs (~:101-106) prints no such line.

The drift was introduced by 135e87dc50 (feat(atlas): query-trace capture — atlas-query-trace/v1, fail-closed, #9973), which touched only the atlas-search copies. The #8306 parity restoration (edbcf08789) fixed the previous drift; this one is new.

Why it matters

Dedupe

No open issue and no open PR tracks this. #8306 (CLOSED) covered the earlier parameter drift; #9973 (CLOSED) scoped trace capture to atlas-search; #8573 is about flaky atlas tests, unrelated.

Acceptance criteria

  1. bash .github/scripts/check-fleet-search-parity.sh exits 0 on the PR head (no drift reported for render.rs or server.rs).
  2. server.rs copies match: same imports, same run_search_with_executor_traced call with the trace sink and a TraceContext. Decide and record one of: keep the "atlas-service" context string in both copies (byte parity, simplest), or extend the guard's normalizer to pin a fleet-search variant — in which case the guard, its pinned header text and check-fleet-search-parity.test.sh change in the same PR.
  3. render.rs copies both render query_id: when the envelope carries one.
  4. A fleet-side test proves fleet serve search writes a parseable atlas-query-trace/v1 record for a live search (temp trace dir), and that a failing trace sink fails the search (atlas: trace capture — atlas-query-trace/v1 records, fail-closed trace write (#6027 follow-on 1) #9973 fail-closed invariant).
  5. bash .github/scripts/check-fleet-search-parity.test.sh still passes.
  6. Coordination with the line limit: mirroring this adds ~30 production lines to pkgs/fleet/crates/fleet-search/src/server.rs, which is already 1 production line over the 2500 limit (separate linked issue), so the split should land first or in the same PR.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    priority/highImportant and time-sensitive
    effort/sSmall: expected under 2 hours of work
    on Nov 15, 2026
  2. developing-today commented on Nov 15, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 15, 2026

    @dezren39
    MemberAuthor

    Cross-link: the 2500-production-line overflow in the same two server.rs copies is filed separately as #10446. Mirroring this fix adds ~30 production lines to pkgs/fleet/crates/fleet-search/src/server.rs (already 1 over), so land #10446 first or in the same PR.

  4. dezren39 commented on Nov 15, 2026

    @dezren39
    MemberAuthor

    Follow-through for #7647: #10505 merged as 5a4f3cd46f71cbcd38692a4a716a657a58a5a5e9. It changes the shared Atlas trace record, not either server entry point. I checked main: atlas-search calls run_search_with_executor_traced, but fleet serve search still calls run_search_with_executor. Once the existing #10446 line-budget dependency is handled, extend the Fleet-side smoke test to match the response query_id to the JSONL record and check query_embedding_model, known per-result embedding_model, null for unavailable provenance, and embedding_model_breach only for two or more distinct known candidate models. Keep the existing sink-failure and hash-only query assertions. This is a test handoff, not a new claim or deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/highImportant and time-sensitivestatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions