Repository navigation
fix(definition): accept the legacy 'wildcard = {}' tool scope table - #441
Conversation
Existing OpenHuman agent TOML spells an unrestricted scope as [tools] wildcard = {}.
The untagged wire enum rejected it; parse the scope with an explicit visitor.
Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50. Or wait 24 minutes for your next included review. View limit details
Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 254c7aa8d0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .ok_or_else(|| A::Error::custom("empty tool scope table"))?; | ||
| let scope = match key.as_str() { | ||
| "wildcard" => { | ||
| map.next_value::<IgnoredAny>()?; |
There was a problem hiding this comment.
Reject arbitrary wildcard payloads
When an authored TOML/JSON scope uses the wildcard key with anything other than the legacy empty table (for example, wildcard = false or {"wildcard":["read"]}), IgnoredAny discards that payload and returns ToolScope::Wildcard. The previous enum deserializer rejected these malformed shapes, while Wildcard grants every parent tool and passes the loader's semantic diagnostics, so a typo or attempted restriction now fails open; deserialize and validate an empty map specifically instead of ignoring every value.
Useful? React with 👍 / 👎.
Tiny Sweeper reviewTiny Sweeper completed its review; deterministic results follow. State: Ready for maintainer review Review snapshot
Completeness: Complete What changed`ToolScope` loses its derived untagged `Wire`/`Tagged` enum and gains a hand-written `Deserialize` visitor in `crates/tinyagents-definition/src/execution_spec.rs` that accepts the `"wildcard"` string, a sequence of tool names (bare list), a map with a single `named` key, and the legacy map form `wildcard = {}`. Unknown variants, an empty table, and a table with more than one key are rejected with errors. A supporting test was added to `crates/tinyagents-definition/src/execution_spec_tests.rs`. Features
TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Before mergeNone. How this fits togetherflowchart LR
n0["ModelSpec<br/>changed"]:::changed
n1["pin"]:::impacted
n2["...reaches_the_resolver_without_an_exact_pin"]:::impacted
n3["Hint"]:::impacted
n4["deserialize"]:::impacted
n1 -->|uses| n3
n2 -->|uses| n0
n2 -->|calls| n3
n2 -->|tests| n3
n4 -->|calls| n3
n4 -->|uses| n3
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0043 · 193,580 in / 60,165 out · 17,024 cached (9%) · ladder/vectors-oai3, deepseek-v4.1-flash · 180 embedded
critique: $0.0001 · 58,587 in / 706 out · 6,144 cached (10%) · deepseek-v4.1-flash
security: $0.0009 · 57,450 in / 12,410 out · 3,456 cached (6%) · deepseek-v4.1-flash
tests: $0.0018 · 48,546 in / 25,021 out · 2,816 cached (6%) · deepseek-v4.1-flash
description: $0.0014 · 26,070 in / 19,990 out · 4,608 cached (18%) · deepseek-v4.1-flash
Existing OpenHuman agent TOML spells an unrestricted scope as
[tools] wildcard = {}. After #438 the untagged wire enum rejected it, so such a definition was silently skipped by the loader. ToolScope now parses with an explicit visitor accepting"wildcard",wildcard = {},{ named = [..] }and a bare list. Regression test: every_tool_scope_spelling_in_existing_toml_still_parses. Host follow-up: openhuman#7773.