feat: adopt host-owned reliability/perf (engine #15) + bump core - #2
Conversation
…odule Bump core to unhardcoded-engine main (4409f6f), which retired the engine's reliability/latency/throughput fold — these are host-owned now, read by the algebra only off the candidate. Adapt the host to own them end-to-end: - _fold_route_outcome: fold reliability + latency + a call count for EVERY route (peer for marketplace, provider for partner/gateway), not just marketplace, and fold mocked calls too so a mocked call is measured like a live one. - route_reliability: add a per-route observation counter (count/snapshot_counts) — the engine no longer tracks observation counts. - /x/market perf: rebuild success_rate/latency/calls from the host folds instead of the engine EMA (which no longer carries them; it keeps price + credits). - tests: rewrite the cases that asserted the old engine fold to the host-owned model (min_tok_s now filters on candidate-stamped tok_s; concurrency counts host observations; route-reliability folds via _fold_route_outcome). Note: throughput (tok_s) is not yet host-measured/stamped on marketplace offers, so min_tok_s policies match only candidates with an explicit tok_s. A route_throughput fold mirroring route_latency is the natural follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthrough
ChangesRoute Measurement Unification
Sequence Diagram(s)sequenceDiagram
participant Caller
participant _resolve_call_async
participant _fold_route_outcome
participant route_reliability
participant route_latency
Caller->>_resolve_call_async: request (mock/override/hook)
rect rgba(100, 149, 237, 0.5)
Note over _resolve_call_async: All paths now assign to result
_resolve_call_async->>_resolve_call_async: result = mock/override/hook response
end
_resolve_call_async->>_fold_route_outcome: (request, result)
_fold_route_outcome->>route_reliability: observe(provider|family|peer_or_provider, ok)
_fold_route_outcome->>route_latency: observe(provider|family|peer_or_provider, latency_ms)
_fold_route_outcome-->>_resolve_call_async: done
_resolve_call_async-->>Caller: result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
…-host-owned feat: adopt host-owned reliability/perf (engine #15) + bump core
Bumps the
coresubmodule to unhardcoded-engine main (4409f6f, includes the docs rename #17 and the functional #15 "retire the engine's reliability fold") and adapts the host to own reliability/latency/throughput end-to-end.Why
Engine #15 made reliability/latency/throughput host-owned: the algebra reads
success_rate/latency_ms/tok_sonly off the candidate, and the engine no longer folds an EMA, seeds them from metrics, or surfaces them inprovider_status. Bumping the submodule without this adaptation broke 3 host tests (empty candidate sets, no live perf, 0 recorded calls).Changes (host)
_fold_route_outcome: fold reliability + latency + a call count for every route (peer id for marketplace, provider id for partner/gateway), not just marketplace. Mocked calls fold too, so a mocked call is measured like a live one.route_reliability: add a per-route observation counter (count/snapshot_counts)./x/marketperf: rebuildsuccess_rate/latency_ms/callsfrom the host folds (engine EMA no longer carries them — it keeps price + credits).min_tok_snow filters on candidate-stampedtok_s; the concurrency invariant counts host observations; route-reliability folds via_fold_route_outcome.Result
Full suite: 277 passed (previously 275 + 2 pre-existing reliability failures — those are now green too).
Follow-up (noted, not in this PR)
Throughput (
tok_s) is not yet host-measured/stamped on marketplace offers, somin_tok_spolicies currently match only candidates with an explicittok_s. Aroute_throughputfold mirroringroute_latencyis the natural next step.🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Refactor
Chores