Repository navigation
Test that a promoted tool's schema gets the provider preparation - #606
Conversation
A tool found through tool_search is promoted with the deferred catalogue's schema, and the catalogue applies RunPolicy::tool_schemas like the direct set does. Nothing pinned that, so a promoted tool could regress to reaching the wire raw. This adds a test. Part of tinyhumansai#322 (item f). Deferred tools come only from the registry, so a toolset's per-step PreparedToolSet transform has no promoted tools to apply to.
|
Warning Review limit reached
This review includes 1 billable file and costs up to $0.25. Or wait 9 minutes for your next included review. View limit details
|
Tiny Sweeper reviewReviewed head: Verdict: Ready for maintainer review · Priority: none Diagnostics and supporting detailsFull summaryPull request purpose (title): Test that a promoted tool's schema gets the provider preparation. Tiny Sweeper completed its review; deterministic results follow. Review snapshot
Completeness: Complete What changedOne file changes: `crates/tinyagents-harness/src/agent_loop/tool_rules_tests.rs`, +67/-0. It adds a `PropTool` helper implementing one optional string property so the strict sanitizer has something to rewrite, plus a `#[tokio::test]` that enables strict `SchemaPreparation`, registers one direct and one deferred tool, drives a `tool_search` call through a ScriptedModel, and compares the promoted tool's parameters to the direct tool's prepared parameters. No production source, public API, or existing caller is touched. This round reviews head 30f6090, one push past the previously reviewed head c5648d2; the delta between them could not be established. Review evidence notes the code index is behind this pull request (indexed at `7a41be9a4fb1`), so retrieved context may be out of date. FeaturesNone identified with supported citations. TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Before mergeNone. Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
# Conflicts: # crates/tinyagents-harness/src/agent_loop/tool_rules_tests.rs
Summary
A tool found through
tool_searchis promoted with the deferred catalogue's schema, and the catalogue appliesRunPolicy::tool_schemaslike the direct set does. Nothing pinned that, so this adds a test that a promoted tool reaches the wire with the same preparation as a direct one.Deferred tools come only from the registry, so a toolset's per-step
PreparedToolSettransform has no promoted tools to apply to.Part of #322 (item f). Part of #322 (item (f))
API Or Behavior Changes
None (test only).
Tests
Run on our Linux CI runner (2026-11-11) on c5648d2, parent main 813a2e1:
cargo fmt --all -- --checkcargo clippy -p tinyagents-harness --all-targets -- -D warnings(0 items)cargo test -p tinyagents-harness --lib: 3309 passed, 0 failed{"properties":…,"type":"object"}), while the direct one is prepared (additionalProperties: false,required: ["q"]).--all-featuresbuilds and the full workspacecargo testwere not run here; this is a test-only change.Documentation
Not needed.