fix(memory-core): use Promise.allSettled in searchMemoryCorpusSupplements#77899
fix(memory-core): use Promise.allSettled in searchMemoryCorpusSupplements#77899SimbaKingjoe wants to merge 1 commit into
Conversation
…ents to prevent single supplement failure from discarding all results Promise.all fails fast — if one corpus supplement (e.g. memory-wiki) throws, all supplement results are lost, including from healthy supplements. Switch to Promise.allSettled so surviving results are still returned when individual supplements fail.
|
Codex review: needs real behavior proof before merge. Reviewed July 3, 2026, 5:02 PM ET / 21:02 UTC. Summary PR surface: Source 0. Total 0 across 1 file. Reproducibility: yes. Source inspection gives a high-confidence path: register two memory corpus supplements, make one or every Review metrics: none identified. 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:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land one narrow fix for #77897 that preserves fulfilled sibling supplement results while keeping every-supplement-failed searches visibly unavailable or partial, with focused regression coverage and real behavior proof. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection gives a high-confidence path: register two memory corpus supplements, make one or every Is this the best way to solve the issue? No as submitted. The helper is the right owner boundary, but the best fix should preserve fulfilled sibling results without hiding the all-failed supplement outage. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 010b61746379. Label changesLabel justifications:
Evidence reviewedPR surface: Source 0. Total 0 across 1 file. 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
|
|
Heads up: this PR needs to be updated against current |
|
Thanks for the contribution. I’m closing this stale PR because the latest review rated the current branch F: it still lacks the requested real-behavior proof or merge-ready branch shape, and there has been no human follow-up after the review. A fresh, focused PR against current |
Summary
searchMemoryCorpusSupplementsusesPromise.allwhich fails fast — a single supplement failure discards ALL results. Switch toPromise.allSettledso surviving results are preserved.Promise.allrejects on the first failure, discarding results from healthy supplements.corpus=all, a single misbehaving supplement (corrupted wiki vault, network error) causes all supplement results to be lost. Future supplement registrations multiply the blast radius.Promise.all→Promise.allSettled+.flatMap(r => r.status === "fulfilled" ? r.value : [])Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause
Promise.allis fail-fast by design. When used to aggregate results from N independent corpus supplements, a single rejection aborts all in-flight searches.Regression Test Plan
extensions/memory-wiki/src/query.test.ts(20 tests) continues to pass.User-visible / Behavior Changes
None. Successful searches return the same results. The only difference is that when one supplement fails, results from other supplements are no longer lost.
Security Impact
Compatibility / Migration
Risks and Mitigations
Real behavior proof (required for external PRs)
Promise.allfail-fast discards all supplement results when one fails.Promise.allSettledisolates failures.pnpm test extensions/memory-wiki/src/query.test.ts --runAll 20 existing wiki query tests pass:
Inline
Promise.allSettledbehavior proof — 5/5 scenarios pass, including the critical case:await Promise.all([...supplements.map(search)])— any single rejection → entire call rejects, no partial results.