Skip to content

fix(feishu): allow number/boolean/array types in bitable fields parameter#96758

Closed
infomachalonfitness wants to merge 1 commit into
openclaw:mainfrom
infomachalonfitness:fix/bitable-fields-union-type
Closed

fix(feishu): allow number/boolean/array types in bitable fields parameter#96758
infomachalonfitness wants to merge 1 commit into
openclaw:mainfrom
infomachalonfitness:fix/bitable-fields-union-type

Conversation

@infomachalonfitness

Copy link
Copy Markdown

Problem

The fields parameter in CreateRecordSchema and UpdateRecordSchema uses Type.Any() which serializes to an empty JSON Schema {}. This makes the LLM default to passing all values as strings, even for numeric fields where number type is expected.

For example, the LLM passes {"Price": "99"} instead of {"Price": 99}, causing type mismatches in the Bitable API.

Fix

Change Type.Any() to Type.Union([Type.String(), Type.Number(), Type.Boolean(), Type.Array(Type.Any()), Type.Record(Type.String(), Type.Any())]) so the JSON Schema explicitly advertises "type": ["string", "number", "boolean", "array", "object"].

Changes

  • CreateRecordSchema.fields (line 533): Type.Any() → explicit union type
  • UpdateRecordSchema.fields (line 575): same change

Both property in CreateFieldSchema keeps Type.Any() as-is, since field creation properties have field-type-specific structures that are too varied to constrain.

…eter

The fields parameter in CreateRecordSchema and UpdateRecordSchema
uses Type.Any() which serializes to an empty JSON Schema {}.
This makes the LLM default to passing all values as strings,
even for numeric fields where number type is expected.

Change Type.Any() to Type.Union([...]) so the JSON Schema
explicitly advertises type: [string,number,boolean,array,object],
allowing the LLM to correctly pass number/boolean/array values.
@openclaw-barnacle openclaw-barnacle Bot added channel: feishu Channel integration: feishu size: XS triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jun 25, 2026
@clawsweeper

clawsweeper Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Close as superseded: the Feishu bitable Bedrock schema bug is real and still present on main, but this PR is a narrower duplicate of #94990, which is open, mergeable, proof-positive, and covers all three affected schemas with regression coverage.

Root-cause cluster
Relationship: superseded
Canonical: #94990
Summary: This PR is a narrower duplicate candidate for the Feishu bitable empty-schema problem; the canonical open PR covers all three affected schemas with proof and tests.

Members:

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

Canonical path: Land exactly one canonical Feishu-local non-empty JSON-value schema repair, preferably #94990, then close duplicate sibling PRs and the linked issue from that merge.

So I’m closing this here and keeping the remaining discussion on #94990.

Review details

Best possible solution:

Land exactly one canonical Feishu-local non-empty JSON-value schema repair, preferably #94990, then close duplicate sibling PRs and the linked issue from that merge.

Do we have a high-confidence way to reproduce the issue?

Yes, source-level: current main and v2026.6.10 still emit the three Feishu bitable Type.Any() record schemas, TypeBox 1.1.39 makes those values empty, and Bedrock forwards tool parameters directly as inputSchema.json. I did not run a live Bedrock-backed Anthropic request in this read-only review.

Is this the best way to solve the issue?

No. This PR is a plausible partial repair, but it is not the best landing path because it covers only two affected top-level maps and keeps nested empty Type.Any() branches, while #94990 covers all three with proof and tests.

Security review:

Security review cleared: Cleared: the diff changes only Feishu TypeBox schema declarations and does not touch dependencies, workflows, secrets, permissions, package metadata, or code-execution paths.

AGENTS.md: found and applied where relevant.

What I checked:

  • Repository policy read: Root AGENTS.md and scoped extensions/AGENTS.md were read fully; their plugin-boundary, dependency-contract, proof, compatibility-risk, and best-fix guidance apply to this bundled Feishu plugin schema change. (AGENTS.md:1, 69af58ba2613)
  • Current main still has the underlying bug: Current main still defines CreateRecordSchema.fields, CreateFieldSchema.property, and UpdateRecordSchema.fields with Type.Record(Type.String(), Type.Any()), so the central Feishu/Bedrock bug is not already fixed on main. (extensions/feishu/src/bitable.ts:533, 69af58ba2613)
  • Latest release still has the same schema shape: Tag v2026.6.10 contains the same three Type.Any() record value schemas, so the bug is not shipped fixed in the latest release. (extensions/feishu/src/bitable.ts:533, aa69b12d0086)
  • This PR is narrower than the reported bug surface: The PR head changes only create-record and update-record fields, leaves CreateFieldSchema.property as Type.Any(), and adds nested Type.Any() under array and record branches. (extensions/feishu/src/bitable.ts:537, 75c863ed054e)
  • Canonical sibling covers all three schemas: The open sibling PR adds one non-empty FlexibleFieldValue and uses it for create-record fields, update-record fields, and create-field property. (extensions/feishu/src/bitable.ts:528, fa7bf3faac8c)
  • Canonical sibling includes regression coverage: The open sibling PR adds registered-tool tests that check all three Feishu bitable write-tool value schemas are non-empty. (extensions/feishu/src/bitable.test.ts:176, fa7bf3faac8c)

Likely related people:

  • gaowanqi08141999: Added Feishu bitable create-app and create-field tooling, including the affected create_field.property schema surface. (role: feature contributor; confidence: high; commits: 86517b8e30b9; files: extensions/feishu/src/bitable.ts)
  • Yifeng Wang: Introduced the community Feishu plugin bitable implementation and package/manifest wiring that this schema repair touches. (role: introduced plugin behavior; confidence: medium; commits: 2267d58afcc7; files: extensions/feishu/src/bitable.ts, extensions/feishu/openclaw.plugin.json, extensions/feishu/package.json)
  • steipete: Refactored Feishu account-aware tool routing in the same bitable registration path and appears frequently in the file history. (role: recent area contributor; confidence: medium; commits: 125dc322f5c5; files: extensions/feishu/src/bitable.ts)
  • echoVic: Recently repaired Feishu bitable account routing in the same tool registration path. (role: adjacent area contributor; confidence: medium; commits: d08dafb08fee; 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)

Codex review notes: model internal, reasoning high; reviewed against 69af58ba2613.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jun 25, 2026
@steipete steipete closed this Jul 9, 2026
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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants