fix(feishu): replace empty Type.Any() with non-empty FlexibleValue in bitable schemas#94884
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: this PR targets a real Feishu/Bedrock schema bug, but #94990 is the stronger open landing path for the same three schemas because it includes registered-tool regression coverage and proof-positive review state. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Live PR search found open duplicate fixes #94990 and #94633 plus closed duplicate attempts for the same linked Feishu schema issue. So I’m closing this here and keeping the remaining discussion on #94990 and #94633. Review detailsBest possible solution: Land one canonical Feishu-local schema repair with registered-tool regression coverage, then close duplicate sibling branches and let the linked issue close from the merged fix. 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? No. This branch is a plausible mitigation, but #94990 is the better landing path because it covers the same issue with registered-tool regression tests and proof-sufficient review state. Security review: Security review cleared: Security review cleared: the diff changes only Feishu TypeBox schemas and does not alter secrets, permissions, dependency sources, workflows, package metadata, or code execution paths. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against c4d1f37d3326. |
Real behavior proofBefore:
|
Real behavior proofBefore:
|
… bitable schemas
- Type.Any() and Type.Unknown() serialize to {} in TypeBox 1.1.x, producing
empty patternProperties sub-schemas that AWS Bedrock rejects
- Replace with Type.Unsafe<unknown>({description: ...}) that generates a
non-empty JSON Schema while still accepting any JSON-compatible value
- Applied to create_record fields, update_record fields, and create_field
property schemas
Fixes openclaw#94547
ea39109 to
5f8a2f0
Compare
|
Closing as superseded by #94990 which covers the same three Feishu bitable schema fixes with registered-tool regression tests and proof-sufficient review state. |
Summary
The
@openclaw/feishubitable write tools (create_record,update_record,create_field) emit invalid JSON Schema with emptypatternPropertiessub-schemas. TypeBox 1.1.x serializesType.Any()andType.Unknown()to{}, which AWS Bedrock rejects as invalid.The fix replaces
Type.Any()with a non-emptyFlexibleValueschema usingType.Unsafe<unknown>({description: ...})that generates a valid JSON Schema while still accepting any JSON-compatible value.Fixes #94547
Real behavior proof
Behavior addressed: Feishu bitable tool parameter schemas contain empty patternProperties value schemas that break Anthropic via AWS Bedrock.
Real setup tested:
node scripts/run-vitest.mjs extensions/feishu/src/bitable.test.tsAfter-fix evidence:
What was not tested: Live AWS Bedrock request with the fixed schemas.
Tests and validation
Risk checklist
Did user-visible behavior change? (
No)Did config, environment, or migration behavior change? (
No)Did security, auth, secrets, network, or tool execution behavior change? (
No)What is the highest-risk area?
Type.Unsafebypasses TypeBox type checking. If the FlexibleValue schema needs adjustment, it must be done manually.How is that risk mitigated?
Type.Any()(also unchecked); FlexibleValue simply adds a description to make the JSON Schema non-empty.Current review state
What is the next action?