Repository navigation
fix(memory): preserve QMD search results in noisy output - #115023
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 3:16 AM ET / 07:16 UTC. ClawSweeper reviewWhat this changesThis PR changes QMD memory-search output parsing so bracketed diagnostics and no-results warnings do not hide a later valid JSON result array, with regression coverage for noisy stdout. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 3 items remain Keep this PR open for human review. The narrow parser change appears to address the linked QMD result-loss path without introducing a concrete correctness finding, but its claimed Testbox runs are not inspectable real-behavior proof, and the Priority: P2 Review scores
Verification
How this fits togetherThe memory host invokes QMD as a subprocess and converts its stdout and stderr into normalized search hits. This parser sits between the QMD command output and memory retrieval, so it must separate diagnostics from the JSON array consumed by the search result pipeline. flowchart LR
A[Memory search request] --> B[QMD subprocess]
B --> C[Stdout and stderr]
C --> D[QMD output parser]
D --> E[Validated result array]
E --> F[Memory search hits]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +24, Tests +38. Total +62 across 2 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the parser repair narrow, retain the regression cases, and attach a redacted real QMD command or memory-search transcript that visibly shows noisy output followed by the preserved hit before maintainer merge review. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current-main checks stdout for a no-results marker before attempting its JSON payload, and its fallback starts at the first bracketed sequence, which directly explains the linked noisy-output cases. I did not execute the QMD subprocess in this read-only review. Is this the best way to solve the issue? Yes, the proposed ordering is the narrow maintainable fix: parse a valid standalone result array before treating output as an empty search, while retaining explicit no-results handling when no payload exists. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9d5ecc73da57. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
Closes #114314
What Problem This Solves
Fixes an issue where users searching QMD-backed memory lose real search hits when the QMD subprocess prints bracketed log prefixes, inline log arrays, or a no-results warning alongside a valid JSON result.
Why This Change Was Made
Parse valid result JSON before treating log output as an empty search. Recognize only standalone result arrays and scan QMD stdout once, so bracketed log metadata cannot shadow real hits and malformed output cannot cause quadratic rescanning. Preserve existing genuine no-results behavior, including harmless diagnostic logs. The fix is confined to the existing memory-host parser and its regression tests; it adds no configuration, fallback, storage files, migrations, schema changes, or plugin API.
User Impact
QMD-backed memory search returns the actual indexed memory hits despite subprocess diagnostic noise, while genuine empty queries still return an empty result promptly and safely.
Evidence