fix(strategies): placeholder synthesis text is indistinguishable from a genuine no-results run in logs and UI
Summary
When citation content comes back empty, source_based_strategy substitutes a placeholder using the exact string emitted for a genuine no-results run, so a degraded synthesis and a real empty result look identical in logs and UI - while the code's own comments insist the cases stay distinguishable.
| Field | Value |
|---|---|
| Severity | suggested |
| Origin | Review of #6741 (post-merge extraction) |
| Review section | Prose review tail (APPROVED - OPTIONAL CHANGES) |
| Classification | PR-introduced |
| Verified at | main@43061a14ebff |
| Dedup | distinct · 5 hits reviewed |
Trigger
A run whose citation handler returns empty/whitespace content (e.g. think-only model replies, where get_llm_response_text returns "") with sources present.
Impact
Operators reading logs/UI cannot tell "the LLM produced nothing usable but N documents were kept" from "the search genuinely found nothing" - the two demand opposite investigations. The adjacent citation-failure branch already carries a distinct message; the placeholder branch does not.
Pinned evidence
43061a14ebff:src/local_deep_research/advanced_search_system/strategies/source_based_strategy.py:L557-L567- the empty-content fallback default: "No relevant results found in final synthesis."43061a14ebff:src/local_deep_research/advanced_search_system/strategies/source_based_strategy.py:L571-L575- the genuine no-results branch emits the identical string
Fix direction
Give the placeholder substitution its own message (naming that sources/documents were kept), or emit a distinguishing progress/log event at substitution time - mirroring the distinct citation-failure message in the same block.
Targeted tests
The two gaps named in the review: (1) a source-based valid-content pin - {"content": "Synthesized"} yields current_knowledge == "Synthesized"; (2) the neither-key case; plus a pin that the placeholder and no-results messages differ.
Provenance
Extracted from review of PR #6741 (post-merge extraction). Related: #6540.
Source: LearningCircuit/local-deep-research