Repository navigation
fix(openhuman): advertise plain object tool schemas for strict providers - #131
Conversation
Strict OpenAI-compatible providers reject top-level combinators such as oneOf, anyOf and not, so the Read tool's cross-field rules now live in field descriptions and are enforced at runtime by validate. Tests assert that every tool schema is a plain object with no forbidden keywords. Auto-committed-on: macbook
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper reviewTiny Sweeper reviewed this change across 5 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below. State: Ready for maintainer review Review snapshot
Completeness: Complete What changedThe change removes the top-level `oneOf` combinator from the `hivemind_read` tool schema and moves the exactly-one-destination rule into per-field descriptions, with the runtime `validate` path continuing to enforce it. A new regression test asserts every tool schema is a plain object with no top-level combinators or `enum`/`const`/`not`, and the existing exactly-one-destination test was updated to check required is empty and that destination field descriptions carry guidance text. 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["...validator_require_exactly_one_destination<br/>changed"]:::changed
n1["...serves_direct_replies_as_its_bound_caller<br/>changed"]:::changed
n2["as_str"]:::impacted
n3["clone"]:::impacted
n4["tool"]:::impacted
n5["wave_parking"]:::impacted
n0 -->|calls| n2
n0 -->|tests| n2
n1 -->|calls| n3
n1 -->|tests| n3
n1 -->|calls| n4
n5 -->|calls| n2
n5 -->|tests| n2
n5 -->|calls| n3
n5 -->|tests| 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, but could not review everything, so this is not an approval: crates/tinyhivemind-openhuman/src/tools/types.rs.
$0.0042 · 200,057 in / 45,379 out · 19,648 cached (10%) · ladder/vectors-oai3, deepseek-v4.1-flash, glm-5.3-flash · 177 embedded
critique: $0.0016 · 73,445 in / 24,321 out · 19,456 cached (26%) · deepseek-v4.1-flash
security: $0.0014 · 69,440 in / 8,062 out · 0 cached (0%) · deepseek-v4.1-flash
tests: $0.0003 · 31,739 in / 4,171 out · 128 cached (0%) · glm-5.3-flash
description: $0.0005 · 22,335 in / 5,701 out · 64 cached (0%) · deepseek-v4.1-flash, glm-5.3-flash
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0015 · 205,549 in / 9,276 out · 15,488 cached (8%) · ladder/vectors-oai3, deepseek-v4.1-flash · 177 embedded
critique: $0.0005 · 71,575 in / 2,128 out · 4,224 cached (6%) · deepseek-v4.1-flash
security: $0.0003 · 62,096 in / 1,172 out · 5,504 cached (9%) · deepseek-v4.1-flash
tests: $0.0003 · 38,004 in / 2,032 out · 1,920 cached (5%) · deepseek-v4.1-flash
description: $0.0003 · 31,155 in / 3,272 out · 3,840 cached (12%) · deepseek-v4.1-flash
Problem
hivemind_readadvertised a JSON schema with a top-leveloneOf(withnot/anyOfinside). OpenAI-strict providers reject this. Surplus Intelligence returned:That killed a tinyrsi hive lead's turn, and with it the whole epoch.
Fix
Kind::schema()now always emits a plain{type: object, properties, required, additionalProperties: false}schema.hive_id/agent_id/thread/afterfield descriptions.Kind::validateis unchanged: exactly one of hive_id/agent_id, and thread only with hive_id.Tests
tools::direct_test::every_tool_schema_is_plain_object_for_strict_providerswalks everyKind(managed set included) and asserts that no schema has a top-level oneOf/anyOf/allOf/enum/const/not. It fails on the old code and passes with the fix.read_schema_and_validator_require_exactly_one_destinationupdated: it now checks for an emptyrequiredlist and for the field descriptions instead of the oldoneOflength. The validator assertions are unchanged.cargo fmt --check,cargo clippy --workspace --all-targets -D warningsandcargo test --workspaceall pass locally.Summary by CodeRabbit
aftercursor.