(MOT-3890) feat(harness): session-cached contracts, batched functions::info, hydrated tool schemas - #435
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 47 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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 Run ID: 📒 Files selected for processing (16)
✨ Finishing Touches🧪 Generate unit tests (beta)
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, 35 skipped (no docs/).
Four for four. Nicely done. |
9e97dae to
6008ef2
Compare
6008ef2 to
c06cb0f
Compare
c06cb0f to
c066407
Compare
…, hydrated tool schemas
Live transcripts showed 28% of all model function calls were
engine::functions::list / engine::functions::info round-trips, largely
driven by the prompt doctrine mandating a contract re-fetch before every
call.
- Prompt doctrine (provider-anthropic/openai/xai identity prompts + the
harness default/cli fallbacks): a contract fetched once stays valid
for the whole session; re-fetch only after an invalid_arguments-class
failure or a registry-change notice. Teaches the engine's function_ids
batch form of engine::functions::info. web/workflow injected guidance
aligned.
- Discovery post-filter understands the engine's batch envelope:
entries the turn's policy denies are masked to the same
{ function_id, error: "not available" } stub the engine uses for
unknown ids (masked, never dropped — denied stays indistinguishable
from nonexistent); single-id results blank to null as before.
- Registry snapshot hydration: discovery.rs fills each descriptor's
parameters via function_ids batches of 32 (per-id fallback for
engines predating batch support; failures keep the descriptor
schema-less), so natively exposed tools carry real schemas instead
of {"type":"object"}.
- Registry-change notice: the snapshot gains a fingerprint-gated
generation; a mismatch against the session's watermark appends a
one-line system-prompt notice and re-stamps. Watermark carries across
turns via the turn record. A 5-minute safety reload covers dropped
functions-available bindings.
Requires the engine's function_ids support for batch calls (falls back
gracefully on older engines for hydration; model-issued batch calls
surface the engine's error).
c066407 to
b79d24e
Compare
Summary
Live transcripts (208 sessions) showed 28% of all model function calls were
engine::functions::list/engine::functions::inforound-trips — driven by the prompt doctrine mandating a contract re-fetch before every call, single-id-onlyinfo, and a schema-less registry snapshot.Pairs with the engine-side batch support in iii-hq/iii#1938 (
engine::functions::info { function_ids: [...] }); the harness consumes it rather than shimming it.prompts/identity.txt+ the harnessdefault.txt/cli.txtfallbacks;kimi.txtwas removed upstream): a contract fetched once stays valid for the whole session; re-fetch only after aninvalid_arguments-class failure or a registry-change notice. Teaches the engine'sfunction_idsbatch form.web/workflowinjected guidance aligned. Because the batch is engine-native, the cli.txt teaching (iii trigger engine::functions::info --json '{"function_ids":[...]}') works for direct CLI callers too.{ function_id, error: "not available" }stub the engine uses for unknown ids (masked, never dropped — denied stays indistinguishable from nonexistent); single-id results blank to null as before.discovery.rsfills each descriptor'sparametersviafunction_idsbatches of 32 — with a per-id fallback for engines predating batch support — so native/code-mode tools carry real schemas instead of{"type":"object"}.functions-availablebindings.Remaining engine follow-ups (schema-aware
functions_hash,include_schemason list): Refs MOT-3891.Test plan
cargo test -p harness— all suites green (prompt pins rewritten; post-filter, discovery, and notice unit tests)cargo fmt --check/cargo clippy --all-targetscleaniii trigger engine::functions::info --json '{"function_ids":[...]}'returns 2 full contracts + anot_foundmarker in one call — no harness in the pathharness::sendturn made exactly ONE batched info call and reused contracts on later callsFixes MOT-3890