fix(memory): honor qmd search timeout and bound one-shot CLI cleanup#95347
fix(memory): honor qmd search timeout and bound one-shot CLI cleanup#95347jason-allen-oneal wants to merge 2 commits into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 10, 2026, 2:27 PM ET / 18:27 UTC. Summary PR surface: Source +303, Tests +385. Total +688 across 8 files. Reproducibility: yes. Current main visibly applies a 15-second whole-tool deadline while QMD commands use a separately configured timeout, and the PR supplies a real delayed-QMD run that succeeds after 28.878 seconds; I did not execute the branch because this review is read-only. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Consolidate onto one current-main branch that keeps the memory-host manager contract unchanged, pauses or hands off the default deadline only for active QMD command execution, restores bounded deadlines for setup and builtin fallback, and proves direct, grouped, mcporter, cancellation, one-shot cleanup, and fresh-fallback behavior. Do we have a high-confidence way to reproduce the issue? Yes. Current main visibly applies a 15-second whole-tool deadline while QMD commands use a separately configured timeout, and the PR supplies a real delayed-QMD run that succeeds after 28.878 seconds; I did not execute the branch because this review is read-only. Is this the best way to solve the issue? No. The patch plausibly fixes the bug, but the narrower command-boundary design better preserves owner boundaries and the existing manager contract; that design must be repaired or ported because its current PR is conflicting. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b56bad33f2fb. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +303, Tests +385. Total +688 across 8 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
a9c8889 to
32e6ce4
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
32e6ce4 to
eda7a9c
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
eda7a9c to
ec5916a
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
33900c4 to
c5acea8
Compare
331c835 to
79407b6
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
7ab22da to
f3e9918
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
eff5b5d to
b7c49b8
Compare
What problem this solves
memory_searchhistorically imposed a fixed 15 second outer deadline. QMD searches can legitimately require a longer whole-operation budget whenmemory.qmd.limits.timeoutMsis raised, so the wrapper could terminate the tool before the configured QMD operation completed.Fixes #91947.
Summary
AbortSignal.User impact
Raised QMD timeout configurations can complete beyond the old 15 second wrapper limit. Builtin memory and short QMD configurations retain the existing fast-failure behavior.
If QMD falls back to builtin search during the same call, the builtin fallback receives its own bounded 15 second deadline rather than inheriting the longer QMD budget.
No storage migration or data-model change is required.
Real behavior proof
A live QMD-backed harness run used the repository development entrypoint, a temporary QMD workspace, and the real
@tobilu/qmdCLI. Search-like commands were delayed by 16 seconds, beyond the former fixed outer deadline.The proof was captured on proven ancestor
9104253dabcb2d4f4b101f51e672edb81a8e2b15. The clean current-main rebuild preserves the same timeout implementation and tests while incorporating current memory-search behavior.Review findings addressed
qmdSearchModeOverrideinto timeout resolution.Validation
Current head:
16e2484891d06543da79f2a13a9b99e33c7be836The clean current-main repair runner completed successfully before pushing the rebuilt branch:
pnpm tsgo:extensions:testpassedgit diff --checkpassedThe current head adds only contract documentation clarifying the optional whole-search and bounded-cleanup hooks. Fresh full GitHub Actions are running on this exact head.
Scope and risk
The optional
MemorySearchManager.getSearchTimeoutMsand boundedclose(timeoutMs)hooks extend the memory-host contract. Maintainers should explicitly accept that interface direction and the availability tradeoff of allowing intentionally configured QMD searches to run longer than 15 seconds.QMD subprocess cancellation remains shared behavior from #93394 and is not reimplemented here.
Tests
AI-assisted: yes.