From aabefd59c5dd71e53c424d9fbb1534e23d318546 Mon Sep 17 00:00:00 2001 From: ualtinok <94532+ualtinok@users.noreply.github.com> Date: Sun, 18 Oct 2026 07:15:47 +0200 Subject: [PATCH 1/3] mason: preserve paused embedding notice during trigram build Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> --- .../next/paused-notice-building.md | 1 + .../land-paused-notice-building.json | 9 ++++ .../aft/src/commands/semantic_search/mod.rs | 46 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .alfonso/release-notes/next/paused-notice-building.md create mode 100644 benchmarks/aft-search/slice-descriptors/land-paused-notice-building.json diff --git a/.alfonso/release-notes/next/paused-notice-building.md b/.alfonso/release-notes/next/paused-notice-building.md new file mode 100644 index 000000000..630103c50 --- /dev/null +++ b/.alfonso/release-notes/next/paused-notice-building.md @@ -0,0 +1 @@ +- `aft_search` now keeps the approved paused-embedding notice visible while the keyword index is still building. diff --git a/benchmarks/aft-search/slice-descriptors/land-paused-notice-building.json b/benchmarks/aft-search/slice-descriptors/land-paused-notice-building.json new file mode 100644 index 000000000..e23dd86cf --- /dev/null +++ b/benchmarks/aft-search/slice-descriptors/land-paused-notice-building.json @@ -0,0 +1,9 @@ +{ + "slice_class": "engine_unwired", + "targeted_mechanism": "none", + "kind": "readiness", + "fixtures": [ + "crates/aft/tests/integration/tool_call_parity_test.rs" + ], + "note": "The paused-lane notice replaces only the semantic readiness line when embedding is paused and the semantic lane is unavailable. Keyword-index building disclosures and ranked rows remain unchanged." +} diff --git a/crates/aft/src/commands/semantic_search/mod.rs b/crates/aft/src/commands/semantic_search/mod.rs index e093afee7..068bf013e 100644 --- a/crates/aft/src/commands/semantic_search/mod.rs +++ b/crates/aft/src/commands/semantic_search/mod.rs @@ -1799,6 +1799,14 @@ impl SearchLaneStatus { [("trigram", &self.trigram), ("semantic", &self.semantic)] .into_iter() .map(|(name, lane)| { + if name == "semantic" && !lane.is_ready() && lane.effective != IndexEffective::Off { + let backend = ctx.semantic_backend_health_snapshot(); + if !backend.available && backend.paused_until_ms.is_some() { + // A scheduled pause is not an ordinary unavailable-index + // state, even when no lane is ready to run this request. + return PAUSED_EMBEDDING_DETAIL.to_string(); + } + } let state = match lane.effective { IndexEffective::Unavailable if lane.unavailable_reason.as_deref() @@ -8872,6 +8880,44 @@ mod tests { }); } + #[test] + fn lane_paused_trigram_building_search_shows_approved_sentence() { + use crate::synapse_embed::pause_test_support::*; + crate::semantic_index::with_lane_pause_clock(START, |_clock| { + let project = tempfile::tempdir().unwrap(); + let ctx = test_context(project.path()); + ctx.set_canonical_cache_root(project.path().to_path_buf()); + *ctx.semantic_index_status().write().unwrap() = SemanticIndexStatus::Building { + stage: "embedding".to_string(), + files: None, + entries_done: None, + entries_total: None, + }; + let (publish, receiver) = crossbeam_channel::unbounded::(); + ctx.install_search_index_rx(receiver, ctx.configure_generation()); + record_pause_for_root(project.path()); + + // Keeping the publication sender alive holds the trigram lane in its + // building state while the search reply is rendered. + let response = + with_first_search_index_load_wait_budget_for_test(Duration::ZERO, || { + handle_semantic_search( + &semantic_request("where remix panel mounted option switching handled", 5), + &ctx, + ) + }); + let text = crate::subc_format::format_response("search", &response, false); + assert!(text.lines().any(|line| { + line == "Semantic search unavailable: the embedding model is paused; using keyword search only." + }), "{text}"); + assert!( + text.lines().any(|line| line == "trigram: building"), + "{text}" + ); + drop(publish); + }); + } + #[test] fn blocked_local_query_times_out_falls_back_and_late_result_populates_cache() { let project = tempfile::tempdir().expect("create project dir"); From 2d946736bb4c8fcf89d30f03cd4df958ae3f3415 Mon Sep 17 00:00:00 2001 From: ualtinok <94532+ualtinok@users.noreply.github.com> Date: Sun, 18 Oct 2026 07:17:24 +0200 Subject: [PATCH 2/3] search-quality descriptor: engine_unwired slices declare kind harness Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> --- .../slice-descriptors/land-paused-notice-building.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/aft-search/slice-descriptors/land-paused-notice-building.json b/benchmarks/aft-search/slice-descriptors/land-paused-notice-building.json index e23dd86cf..98077fc79 100644 --- a/benchmarks/aft-search/slice-descriptors/land-paused-notice-building.json +++ b/benchmarks/aft-search/slice-descriptors/land-paused-notice-building.json @@ -1,7 +1,7 @@ { "slice_class": "engine_unwired", "targeted_mechanism": "none", - "kind": "readiness", + "kind": "harness", "fixtures": [ "crates/aft/tests/integration/tool_call_parity_test.rs" ], From 2bdb9cfccb1cb9a630b18f78dc82c0814d27938a Mon Sep 17 00:00:00 2001 From: ualtinok <94532+ualtinok@users.noreply.github.com> Date: Sun, 18 Oct 2026 07:17:58 +0200 Subject: [PATCH 3/3] release notes and search-quality descriptor for paused-notice-building Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> --- .../slice-descriptors/land-paused-notice-building.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/benchmarks/aft-search/slice-descriptors/land-paused-notice-building.json b/benchmarks/aft-search/slice-descriptors/land-paused-notice-building.json index 98077fc79..97fc0ff55 100644 --- a/benchmarks/aft-search/slice-descriptors/land-paused-notice-building.json +++ b/benchmarks/aft-search/slice-descriptors/land-paused-notice-building.json @@ -1,9 +1,12 @@ { - "slice_class": "engine_unwired", "targeted_mechanism": "none", "kind": "harness", + "slice_class": "engine_unwired", "fixtures": [ "crates/aft/tests/integration/tool_call_parity_test.rs" ], - "note": "The paused-lane notice replaces only the semantic readiness line when embedding is paused and the semantic lane is unavailable. Keyword-index building disclosures and ranked rows remain unchanged." + "fenced_files": [ + "crates/aft/src/commands/semantic_search/mod.rs" + ], + "note": "- Ranking and routing are unchanged; benchmark rows must remain byte-identical." }