Files
Dragan Spiridonov 4409699a2b feat(test-gen): enable paid escalation + wire D9 routing-feedback at kernel layer
Completes the cheap-first economics: local → repair → escalate the hard tail.

- coordinator: build a claudeRunner from the existing HybridRouter (tier →
  complexity hint) and run the free-tier path with escalate:true. Falls back to
  local-only automatically when no router is wired. patternsUsed now records the
  winning tier.
- plugin (kernel layer): onInitialize constructs a live RoutingFeedbackCollector
  (EMA calibration + auto-escalation, memory-only fallback) when the free tier is
  opted in, and injects it as the coordinator's routingFeedback sink — so each
  cheap-vs-escalated outcome drives the calibrator/escalation tracker/confidence
  (lifts the stuck-at-40% routing metric). Built only when opted in.
- tests: +2 (escalation via router, D9 sink invocation); 113 green; existing
  coordinator (47) and plugin (38) suites unchanged. Type-safe (MessageRole /
  TaskComplexity / RoutingConfig fields all confirmed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 12:43:22 +00:00
..