(MOT-4391) feat(reflex): local tool-router worker with shadow-mode calibration - #768
(MOT-4391) feat(reflex): local tool-router worker with shadow-mode calibration#768rohitg00 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 59 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (19)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
skill-check — worker0 verified, 58 skipped (no docs/).
Four for four. Nicely done. |
Refs MOT-4391
What
A new
reflexworker: a local tool router for the harness loop. A 14MB on-device model (cactus-needle, CPU-only, Apache-2.0 weights) indexes the live engine function catalog and proposes the next function call for a natural-language objective, with a calibrated confidence score per proposal. It proposes only. Every call still flows through the normal policy, approval, and dispatch path, so the worker adds no execution authority.Surface
reflex::route { objective, observation? }returns{ type, calls: [{function, payload}], confidence, reasoning, latency_ms }.typeiscall,respond,abstain, orrefuse; low confidence means escalate to a frontier model. Passing the previous result asobservationcontinues a chain.reflex::index::status/reflex::index::refresh. The index follows the engine via theengine::functions-availabletrigger (debounced, schema-fingerprinted, persisted across boots so warm re-init is instant).shadow.enabled: falseto disable): bindsharness::hook::pre-generateandpost-generatewithon_error: fail_open, observe-only. For every real generation it records its own proposal beside the frontier model's actual calls (unwrappingagent_trigger, feeding prior function results back asobservation) into a local jsonl that doubles as fine-tune data.reflex::shadow::reportaggregates turn-level agreement per confidence bucket plus how many frontier generations went to catalog discovery.Why
Measured on a live rig (207-function catalog) before this PR:
engine::functions::list/info. Example: for "List the queue topics", the frontier model needed three generations (list, info, call) to reachengine::queue::list_topics; the router proposed the identical call in one local pass at 0.65.state::delete {key, scope}proposed correctly at 0.80 over the bus.Onboarding checklist (docs/sops/new-worker.md)
iii.worker.yaml(python bundle, tags),pyproject.tomlmanifest,config.yaml(Path A operator defaults with env overrides),README.mdper worker-readme.md, non-emptytests/iii-permissions.yaml: shadow hook targets and the catalog-change handler denied (agents must not forge calibration rows);route/index::status/shadow::reportallowedskills/SKILL.md(when to use, boundaries, no schema dumps).github/release-workers.yamlentry;release_catalog.py validatepassesruff check,ruff format --check,pytest(13 tests),validate_worker.pyNotes for review
run()-style local execution in the vendor SDK is deliberately unused;complete()proposals only.nextper SOP section 9.Follow-up phases tracked as sub-issues of MOT-4391: confidence-gated decide path in the harness (MOT-4392),
ExposeMode::Retrieved(MOT-4393), per-rig LoRA from the shadow corpus (MOT-4394).