Repository navigation
Conversation
Propagate memory_search deadline signals into wiki corpus supplements and disable full-vault fallback on that path so digest underfill cannot exceed the 15s tool budget. Keep exhaustive fallback for direct wiki_search.
|
Codex review: found issues before merge. Reviewed August 1, 2026, 1:54 AM ET / 05:54 UTC. ClawSweeper reviewWhat this changesThe branch forwards the memory-search deadline into the wiki corpus supplement, disables its exhaustive fallback, and changes wiki page reads to bounded abort-aware workers. Merge readinessThis PR addresses a real timeout path and has useful real-behavior proof, but its branch is now conflict-stale and cannot safely merge as-is. Current main added sandboxed wiki-page visibility filtering on the same query path, and the hard deadline resolves before abort so this branch cannot return partial recall after that deadline without an explicitly approved earlier cutoff. Priority: P1 Review scores
Verification
How this fits togetherMemory Search combines built-in memory/session results with optional results from the compiled wiki vault. The wiki supplement reads digest-selected or exhaustive vault pages and sends those results back to the agent tool before its fixed deadline. flowchart LR
A[Agent memory search] --> B[Memory core deadline]
B --> C[Wiki corpus supplement]
C --> D[Digest-selected wiki pages]
D --> E{More results needed?}
E -->|Direct wiki search| F[Exhaustive vault reader]
E -->|Memory supplement| G[Bounded recall result]
F --> H[Memory-search response]
G --> H
Decision needed
Why: The branch’s digest-only behavior is a user-visible recall/completeness policy change, while the current hard-deadline contract prevents partial results from winning without a separately chosen earlier cutoff. Before merge
Findings
Agent review detailsSecurityNeeds attention: The stale branch must retain current sandboxed wiki-page visibility checks before it can safely merge. PR surfaceSource +76, Tests +144. Total +220 across 8 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: Rebase onto current main, retain the centralized wiki visibility filter across digest and fallback reads, and implement an owner-approved soft cutoff that returns filtered partial results before the fixed hard timeout while separately preserving direct exhaustive wiki search. Do we have a high-confidence way to reproduce the issue? Yes for the reported timeout: the linked report, the original branch proof, and current source establish that an underfilled digest can reach exhaustive wiki reads beneath the fixed memory-search deadline. The post-rebase partial-result behavior still needs a focused current-head regression. Is this the best way to solve the issue? No: this is a plausible mitigation, but not the best verified repair because it unconditionally removes supplement fallback recall and omits current visibility behavior. A rebase with the owner-approved cutoff policy is safer and preserves the canonical query boundary. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fcb73388379a. LabelsLabel justifications:
EvidenceSecurity concerns:
Acceptance criteria:
What 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 (7 earlier review cycles)
|
Co-authored-by: Cursor <[email protected]>
|
@clawsweeper re-review Addressed P1: replaced sequential shared wiki page reads with bounded (16) abort-before-claim workers so direct exhaustive search keeps throughput while deadlines stop claiming new paths. Added regression test for peak concurrency + early stop after abort. Strengthened proof with multi-page vault timing + mid-abort early-stop evidence. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
4d07981 to
e27c828
Compare
|
@clawsweeper re-review Addressed the remaining lint findings in
Validation:
Commit: 3ad7086 |
|
@clawsweeper re-review Addressed the exact-head
Validation: Commit: 9b8f571 |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
Fresh reproduction on OpenClaw 2026.7.1 after a successful forced full reindex: 2,714/2,714 files indexed, dirty=false, embedding probe healthy, and the 1,536-dimensional vector store fully available. |
|
Two current-main invariants need attention before rebase:
Please cover visibility preservation, partial-result behavior, and direct exhaustive search separately. |
|
A residual boundary worth covering in this PR or a narrow follow-up: thread the same AbortSignal through vault activation and source-generation validation ( Downstream tests also distinguish validation cancellation from genuine validation failure: cancellation rethrows immediately; non-abort failure preserves the current fallback/error contract. The duplicate downstream tracker #118903 has been closed in favor of #104719 / this PR. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
What Problem This Solves
memory_searchwithcorpus="wiki"orcorpus="all"can miss the 15s tool deadline when digest-selected candidates underfillmaxResults. The wiki supplement then falls through to a full-vault Markdown scan (25–27s on large vaults), so recall times out and host work may continue after the tool already failed. Fixes #104719.Root Cause / Fix
searchWikiCorpus()treated missing or underfilled digest hits as a signal to enumerate/parse the entire vault, and the memory tool deadline signal never reached the supplement path.deadlineSignalthroughMemoryCorpusSupplement.search→ wiki supplement →searchMemoryWiki/searchWikiCorpus.exhaustiveFallback: falseso digest underfill does not trigger full-vault scanning. Directwiki_searchkeeps exhaustive fallback.Evidence
Production function proof (
node --import tsx)Multi-page vault exercise of the real
searchMemoryWiki/readQueryableWikiPagespath (see Real behavior proof for captured output). Covers:exhaustiveFallback: falseskips vault scan without digest[]abort_stopped_early)Regression tests
"skips full-vault fallback when exhaustiveFallback is false (#104719)""returns early when the deadline signal is already aborted (#104719)""reads wiki pages with bounded concurrency and stops claiming after abort (#104719)"— asserts peak concurrency in (1, 16] and fewer reads than file count after abort"forwards deadline signal and disables exhaustive fallback for supplement search (#104719)"Test runner
Real behavior proof
Behavior addressed: memory-wiki supplement skips full-vault fallback after digest underfill, honors the memory_search deadline AbortSignal, and shared wiki page reads use bounded abort-aware concurrency instead of serial I/O.
Environment tested: Windows Node 22+, local checkout of
fix/issue-104719-wiki-deadline,node --import tsx, vitest vianode scripts/run-vitest.mjs.Steps run after the patch: Created a temporary 40-page wiki vault; ran production
searchMemoryWiki/readQueryableWikiPageswith default search,exhaustiveFallback: false, pre-abort, and mid-batch abort; ran targeted vitest regressions including the bounded-concurrency abort test.Evidence after fix:
{ "direct_hit_path": "sources/page-01.md", "direct_hits": 10, "direct_ms": 210, "file_count": 40, "abort_pages": 23, "abort_stopped_early": true, "supplement_no_digest": [], "preabort": [], "ok": true }Observed result: Default search still finds wiki pages; supplement-without-digest returns no vault scan; pre-abort returns empty; mid-batch abort stops claiming new paths (
abort_stopped_early: true) while peak concurrency stays bounded (≤16). Targeted vitest regressions pass.Not tested: Live gateway
memory_searchagainst a real ~77MB / 1200+ page compiled-wiki vault end-to-end (no such vault in this environment); Discord/Telegram delivery.Change Type / Scope / Security Impact