fix(feishu): emit non-empty value schema for bitable write tools (#94547)#94990
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 4, 2026, 8:02 PM ET / 00:02 UTC. Summary PR surface: Source +6, Tests +26. Total +32 across 2 files. Reproducibility: yes. source-level: current main and Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one Feishu-local non-empty value schema repair as the canonical fix, then close the linked issue and duplicate candidate PRs from that merged change. Do we have a high-confidence way to reproduce the issue? Yes, source-level: current main and Is this the best way to solve the issue? Yes. A Feishu-local explicit non-empty JSON-value schema is a narrow maintainable fix; a provider-wide sanitizer would be broader, and the remaining decision is which open candidate PR should be canonical. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bfffa950d71c. Label changesLabel justifications:
Evidence reviewedPR surface: Source +6, Tests +26. Total +32 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
…nclaw#94547) Type.Record(Type.String(), Type.Any()) serializes via TypeBox to an empty nested value schema (patternProperties: { "^.*$": {} }). AWS Bedrock's strict tool-schema validation rejects the empty sub-schema, breaking all agent turns for Bedrock-backed Anthropic users with Feishu bitable tools enabled. Replace the three affected free-form field maps (create_record, update_record, create_field) with an explicit non-empty FlexibleFieldValue value schema that still accepts any JSON value. Type.Unknown() is avoided because it also serializes to an empty schema. Adds regression coverage asserting the emitted value schema is non-empty.
fa7bf3f to
2f01557
Compare
|
Land-ready maintainer verification completed on exact head What changed:
Proof:
Known gap: no live credentialed Bedrock request was run. The failure and repair |
|
Merged via squash.
|
…nclaw#94547) (openclaw#94990) Type.Record(Type.String(), Type.Any()) serializes via TypeBox to an empty nested value schema (patternProperties: { "^.*$": {} }). AWS Bedrock's strict tool-schema validation rejects the empty sub-schema, breaking all agent turns for Bedrock-backed Anthropic users with Feishu bitable tools enabled. Replace the three affected free-form field maps (create_record, update_record, create_field) with an explicit non-empty FlexibleFieldValue value schema that still accepts any JSON value. Type.Unknown() is avoided because it also serializes to an empty schema. Adds regression coverage asserting the emitted value schema is non-empty. Co-authored-by: TwinsLee <[email protected]>
What Problem This Solves
Fixes #94547.
The Feishu bitable write tools used
Type.Record(Type.String(), Type.Any()).TypeBox 1.3.3 serializes that value schema as
{}, and Bedrock-backedvalidators can reject the resulting empty nested
patternPropertiesschema.Because providers receive the whole tool list, one rejected Feishu schema can
block otherwise unrelated agent turns.
Why This Change Was Made
The three affected parameters now share one explicit schema containing every
JSON value type:
{"type":["string","number","boolean","object","array","null"]}This keeps the existing free-form contract, including Feishu object arrays,
without adding a provider-wide compatibility rewrite.
Type.Unknown()is notused because TypeBox also serializes it as
{}.The regression test resolves the registered tools and checks the exact emitted
value schema for:
feishu_bitable_create_record.fieldsfeishu_bitable_update_record.fieldsfeishu_bitable_create_field.propertyUser Impact
Bedrock-backed users can expose the Feishu bitable write tools without the
empty nested schema causing the provider to reject the tool list.
Evidence
Exact PR head:
2f01557aa160deadeeda8154e35a84694269e182tbx_01kwqr1t24b8cv4mqkkejrkv3ppnpm test:serial extensions/feishu/src/bitable.test.ts: 5/5 passedpnpm check:changed: passedorigin/main: no findings, confidence 0.9628723694478No live Bedrock credentialed request was run. The failure path is supported by
the linked reporter evidence, direct TypeBox 1.3.3 source inspection, and the
Bedrock runtime forwarding tool parameters as
inputSchema.json.