Skip to content

fix(feishu): emit non-empty value schema for bitable write tools (#94547)#94990

Merged
vincentkoc merged 1 commit into
openclaw:mainfrom
TwinsLee:fix/feishu-bitable-empty-schema
Jul 5, 2026
Merged

fix(feishu): emit non-empty value schema for bitable write tools (#94547)#94990
vincentkoc merged 1 commit into
openclaw:mainfrom
TwinsLee:fix/feishu-bitable-empty-schema

Conversation

@TwinsLee

@TwinsLee TwinsLee commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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-backed
validators can reject the resulting empty nested patternProperties schema.
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 not
used 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.fields
  • feishu_bitable_update_record.fields
  • feishu_bitable_create_field.property

User 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: 2f01557aa160deadeeda8154e35a84694269e182

  • Blacksmith Testbox tbx_01kwqr1t24b8cv4mqkkejrkv3p
  • pnpm test:serial extensions/feishu/src/bitable.test.ts: 5/5 passed
  • pnpm check:changed: passed
  • fresh autoreview against origin/main: no findings, confidence 0.96
  • hosted CI run 28723694478

No 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.

@openclaw-barnacle openclaw-barnacle Bot added channel: feishu Channel integration: feishu size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 19, 2026
@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 4, 2026, 8:02 PM ET / 00:02 UTC.

Summary
The PR replaces three Feishu bitable write-tool Type.Any() record value schemas with one explicit non-empty JSON-value schema and adds registered-tool regression coverage.

PR surface: Source +6, Tests +26. Total +32 across 2 files.

Reproducibility: yes. source-level: current main and v2026.6.11 still use Type.Any() for the three record value schemas, TypeBox emits empty nested schemas for Any/Unknown, and Bedrock forwards tool parameters as inputSchema.json. I did not run a live Bedrock request.

Review metrics: 1 noteworthy metric.

  • Provider-visible tool schemas: 3 changed, 0 added, 0 removed. These schemas are serialized into provider requests, so the exact shape matters for existing Feishu users before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #94547
Summary: The canonical issue reports the exact Feishu bitable empty patternProperties schema bug; this PR and one sibling are open candidate fixes, while older attempts are closed or partial overlaps.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Maintainer should choose exactly one open Feishu bitable schema fix as canonical before merge.

Risk before merge

  • [P1] The PR intentionally changes provider-visible schemas for three existing Feishu bitable write tools, so maintainers should accept one canonical JSON Schema shape before merge.
  • [P1] A competing open PR targets the same canonical bug with a different schema shape, so landing more than one candidate would create duplicate repair churn.
  • [P1] No live AWS Bedrock call was run; the fix is supported by reporter evidence, TypeBox/schema emission proof, and source inspection of Bedrock schema forwarding.

Maintainer options:

  1. Land this branch as the canonical schema repair (recommended)
    If maintainers accept the explicit type array schema, merge this PR and close the duplicate Feishu bitable schema candidates against the same issue.
  2. Choose the sibling schema shape instead
    If maintainers prefer the more verbose union shape in fix(feishu): replace empty bitable record value schema rejected by strict validators #94633, close this PR only after that sibling is accepted as the canonical fix.

Next step before merge

  • [P2] Manual review should choose the canonical Feishu schema fix; there is no concrete automated repair to make on this PR right now.

Security
Cleared: The diff changes Feishu TypeBox schemas and tests only, with no dependency, workflow, secret, permission, package, or code-execution surface changes.

Review details

Best 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 v2026.6.11 still use Type.Any() for the three record value schemas, TypeBox emits empty nested schemas for Any/Unknown, and Bedrock forwards tool parameters as inputSchema.json. I did not run a live Bedrock request.

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 changes

Label justifications:

  • P1: The linked bug can block all Bedrock-backed Anthropic agent turns when Feishu bitable write tools are enabled.
  • merge-risk: 🚨 compatibility: The patch changes existing Feishu tool parameter schemas that current users send to providers during tool-call request construction.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes terminal before/after TypeBox serialization and registered-tool regression test output for the changed schemas; live Bedrock proof is absent but not required to prove schema emission.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes terminal before/after TypeBox serialization and registered-tool regression test output for the changed schemas; live Bedrock proof is absent but not required to prove schema emission.
Evidence reviewed

PR surface:

Source +6, Tests +26. Total +32 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 9 3 +6
Tests 1 26 0 +26
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 35 3 +32

What I checked:

  • PR changes the affected schemas: At the PR head, BitableFieldValueSchema is used for feishu_bitable_create_record.fields, feishu_bitable_create_field.property, and feishu_bitable_update_record.fields, replacing the empty-emitting Type.Any() value schema. (extensions/feishu/src/bitable.ts:520, 2f01557aa160)
  • PR adds registered-tool schema coverage: The added test registers the Feishu bitable tools through the harness and asserts the three affected record value schemas are non-empty. (extensions/feishu/src/bitable.test.ts:176, 2f01557aa160)
  • Current main still has the reported schema: Current main still uses Type.Record(Type.String(), Type.Any()) for the same three Feishu bitable write parameters. (extensions/feishu/src/bitable.ts:525, bfffa950d71c)
  • Bedrock receives the schema directly: The Amazon Bedrock provider maps each tool's parameters directly into toolSpec.inputSchema.json, so Feishu's emitted schema is provider-visible. (extensions/amazon-bedrock/stream.runtime.ts:935, bfffa950d71c)
  • No Bedrock-specific normalizer exists: Shared provider tool-schema compatibility families are deepseek, gemini, and openai; there is no Anthropic/Bedrock family that would repair this Feishu schema later. (src/plugin-sdk/provider-tools.ts:541, bfffa950d71c)
  • TypeBox contract proof: The pinned current-main TypeBox package is 1.3.3, and inspecting/running the npm tarball showed Type.Record(Type.String(), Type.Any()) and Type.Unknown() both emit patternProperties with {}, while the proposed unsafe schema emits a non-empty value schema. (extensions/feishu/package.json:12, bfffa950d71c)

Likely related people:

  • doodlewind: GitHub commit metadata shows this author introduced the community Feishu plugin implementation, including extensions/feishu/src/bitable.ts, where the affected tool schemas live. (role: introduced plugin behavior; confidence: medium; commits: 2267d58afcc7; files: extensions/feishu/src/bitable.ts, extensions/feishu/package.json, extensions/feishu/openclaw.plugin.json)
  • gaowanqi08141999: This author added Feishu bitable create-app and create-field tooling, including adjacent schema surface for the affected create-field tool. (role: feature contributor; confidence: medium; commits: 86517b8e30b9; files: extensions/feishu/src/bitable.ts)
  • steipete: Recent history shows Feishu bitable account/tool routing work and the schema dependency migration to typebox, which is directly related to the emitted schema behavior. (role: recent area contributor; confidence: medium; commits: 125dc322f5c5, b2472d65607a, 614e87cce1d4; files: extensions/feishu/src/bitable.ts, extensions/feishu/package.json)
  • RomneyDa: The current main commit touching this file refactored Feishu tool result handling without changing the schema issue, so this is useful routing context for the current surface. (role: recent adjacent contributor; confidence: low; commits: bfffa950d71c; files: extensions/feishu/src/bitable.ts)
  • m1heng: The Feishu plugin metadata describes the plugin as community maintained by this handle, which is useful routing context for Feishu-specific behavior. (role: declared plugin contact; confidence: medium; files: extensions/feishu/openclaw.plugin.json, extensions/feishu/package.json)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-06-22T00:57:59.243Z sha fa7bf3f :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 19, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. label Jun 19, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jun 19, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jun 19, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jun 20, 2026
@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Jun 20, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 20, 2026
…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.
@vincentkoc
vincentkoc force-pushed the fix/feishu-bitable-empty-schema branch from fa7bf3f to 2f01557 Compare July 4, 2026 23:56
@openclaw-barnacle openclaw-barnacle Bot added size: XS and removed size: S triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member

Land-ready maintainer verification completed on exact head
2f01557aa160deadeeda8154e35a84694269e182.

What changed:

  • rebased onto current main
  • preserved TwinsLee as commit author
  • narrowed the regression test from 46 to 26 added lines
  • asserted the exact six JSON value types for all three affected Feishu tools
  • updated the PR body for current [email protected]

Proof:

  • pnpm test:serial extensions/feishu/src/bitable.test.ts: 5/5 passed
  • pnpm check:changed: passed
  • Blacksmith Testbox: tbx_01kwqr1t24b8cv4mqkkejrkv3p
  • hosted CI: 28723694478 passed
  • fresh autoreview against origin/main: no findings, confidence 0.96
  • scripts/pr prepare-run 94990: passed with hosted_exact_head

Known gap: no live credentialed Bedrock request was run. The failure and repair
are covered by reporter evidence, direct TypeBox source inspection, runtime
schema-forwarding inspection, exact emitted-schema tests, and the full changed
gate.

@vincentkoc
vincentkoc merged commit 568237b into openclaw:main Jul 5, 2026
104 of 108 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 5, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: @openclaw/feishu bitable write tools emit invalid JSON Schema (empty patternProperties sub-schema) — breaks Anthropic via AWS Bedrock

2 participants