feat(core): orchestrator hardening — per-provider timeout, retry, latencyMs, result cache#8
Closed
MyPrototypeWhat wants to merge 10 commits into
Closed
Conversation
…dline-bounded cache read; surface latencyMs in mcp meta
…exports list; commit wave plan
…tion, stable keys w/ undefined, parent-abort fast-fail, Request signal, race dedup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #7 (Wave 2 of the hardening plan; base auto-retargets to main when #7 merges).
failed: timeout after Nmsin meta while everyone else's results return. Tune viacreateRefkit({ resilience: { timeoutMs, retries } })or disable withresilience: false. Zero-network invariant preserved (manual signal composition, noAbortSignal.any; injected fetch only).latencyMs; the MCPexplainoutput surfaces it (andcached) instead of zod silently stripping them.KeyValueCachenow memoizes per-provider validated results (keyrefkit:v1:<provider>:<fnv1a(stableStringify(query))>, TTLcacheTtlMsdefault 5 min, deadline-bounded reads, any cache failure degrades to live search). Merge, rerank, and the license gate always run fresh — proven by a cached-proprietary-ref +gateForregression test.Test Plan
pnpm -r typecheck— 20/20 packages cleanpnpm test:run— 38 files, 282/282 (+23 over the Wave 1 baseline: resilience suite, timeout/retry/cache client tests, review-hardening locks)no-network.test.tsgreen (core still has zero fetch calls / endpoints)onProviderErroron timeout, no unhandled rejections on any race path, plain-Error abort doesn't burn a retry, cache hits flow through the gate