Skip to content

fix(feishu): reject unsupported initial document content - #115697

Merged
steipete merged 1 commit into
mainfrom
codex/s11-feishu-doc-create-contract-48373
Jul 29, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/s11-feishu-doc-create-contract-48373

Conversation

@steipete

@steipete steipete commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #48373

What Problem This Solves

Fixes an issue where users or agents creating a Feishu document with an initial Markdown content field would receive a successful response even though Feishu created an empty document and silently discarded all content.

Why This Change Was Made

Feishu officially defines document creation as a title-and-folder-only operation: https://open.feishu.cn/document/server-docs/docs/docs/docx-v1/document/create?lang=zh-CN. The installed @larksuiteoapi/[email protected] exposes the same create payload, containing title and folder_token but no content. Rejecting every create request that includes content before constructing a Feishu client preserves that upstream contract, prevents accidental document creation and permission grants, and avoids introducing a misleading multi-request transaction or new permissions. A successful title-only create followed by an explicit write remains unchanged.

User Impact

Feishu users receive an actionable create-then-write error instead of a silently-created empty document. Both the bundled Feishu document skill and public channel documentation now explicitly describe the supported two-call Markdown workflow.

Evidence

  • Fail-first: both nonempty Markdown content and explicitly empty content reproduced the silent successful empty-document creation before the change.
  • Exact installed SDK and real localhost HTTP end-to-end proof: rejected content makes zero client/document/network/permission requests; valid title-only creation followed by writing Markdown makes exactly the four official document-create, blocks-convert, blocks-list, and descendant-insert requests.
  • Focused remote proof: 2 suites, 31 tests passed.
  • Full Feishu remote regression proof: 13 suites, 341 tests passed.
  • Full remote CI=1 pnpm check:changed passed, including formatting, extension and extension-test typechecks, changed-file lint, plugin boundaries, dead-code, SDK, database, and import-cycle guards.
  • The already-merged canonical documentation index independently passes node scripts/generate-docs-map.mjs --check; this pull request does not modify the generated index.
  • Fresh independent gpt-5.6-sol extra-high-effort autoreview: clean, no accepted or actionable findings.
  • No live Feishu tenant, real credential, external API mutation, new configuration, or resource side effect was required.

Thanks to @wzx011011 for the original report and unmerged predecessor #48377 and to @forrystudio for independently confirming the shipped reproduction and fail-fast resolution.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: feishu Channel integration: feishu size: M maintainer Maintainer-authored PR labels Jul 29, 2026

Copy link
Copy Markdown
Contributor

Maintainer verification at 2528df01dcb94200b56a96575570ad0ea882effd:

  • Independently reproduced both nonempty and explicitly empty initial content silently creating an empty document on the unchanged Feishu owner.
  • Verified first-party Feishu document-create documentation and @larksuiteoapi/[email protected]: creation accepts title and folder token, not content.
  • Proved the fix rejects both cases before constructing a client: zero Feishu SDK/HTTP calls, zero created documents, and zero permission grants.
  • Executed the actual installed Feishu SDK against a real localhost HTTP server. Supported title-only create followed by Markdown write issued exactly the four official create, convert, list, and descendant-insert requests and completed successfully.
  • Remote Blacksmith: all 13 affected Feishu suites and 341 tests passed; both changed suites and 31 tests passed.
  • Full remote CI=1 pnpm check:changed passed, including both extension TypeScript lanes, formatting, lint, SDK and plugin-boundary guards, dead-code, database, and import-cycle checks.
  • Fresh independent extra-high-effort review: clean; no actionable findings.
  • Public Feishu channel documentation and the bundled Feishu document skill both document the supported create-then-write contract.

This is an SDK-plus-local-HTTP end-to-end proof; it does not claim access to a real Feishu tenant or credentials. Thanks to @wzx011011 for the report and @forrystudio for confirming the fail-fast resolution.

@steipete
steipete force-pushed the codex/s11-feishu-doc-create-contract-48373 branch 2 times, most recently from d659524 to 4045fa5 Compare July 29, 2026 07:05
@steipete
steipete force-pushed the codex/s11-feishu-doc-create-contract-48373 branch from 4045fa5 to d3cbbd8 Compare July 29, 2026 07:50

Copy link
Copy Markdown
Contributor

Final maintainer verification on rebased five-file head d3cbbd8:

  • Official Feishu document-create API and @larksuiteoapi/[email protected] independently confirm create accepts only title and folder token; content must be written through the document block API.
  • Reproduced both nonempty Markdown and explicitly empty content silently creating blank documents on unchanged production.
  • The fix rejects both forms before Feishu client construction: no HTTP request, document, block conversion, permission grant, or other remote side effect.
  • The actual installed Feishu SDK executed against a real local HTTP server proves the supported title-only create followed by Markdown write makes exactly the four official create, convert, blocks-list, and descendant-insert requests.
  • Fresh Blacksmith Testbox: all 14 relevant Feishu suites and 347 tests pass, including document-account, Markdown, wiki, drive, streaming, dispatcher, inbound monitor, bot, and same-chat sequential-queue regressions.
  • Fresh Blacksmith Testbox: the canonical docs-map check and complete CI=1 pnpm check:changed both pass with authoritative exitCode=0, including both extension typechecks, formatting, lint, plugin boundaries, dead-code, database, and import-cycle guards.
  • Fresh independent gpt-5.6-sol xhigh branch review: clean, no actionable findings.
  • Verified merged canonical docs-map repair is inherited from main; this pull request touches exactly five Feishu-owned source, test, public-documentation, and skill files, with zero generated-doc-index changes.
  • Hosted security-fast, Workflow Sanity, build-artifacts, check-docs, check-lint, production and test typechecks have all passed on this exact head.

Proof is an installed-upstream-SDK plus real-local-HTTP end-to-end test, not a claim of real-tenant or live Feishu credentials. Thanks again to @wzx011011 and @forrystudio.

@steipete
steipete merged commit 9402598 into main Jul 29, 2026
113 of 116 checks passed
@steipete
steipete deleted the codex/s11-feishu-doc-create-contract-48373 branch July 29, 2026 08:53
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 29, 2026
…ft-ingestion

* origin/main:
  fix(feishu): reject unsupported initial document content (#115697)
  feat(media): probe duration and dimensions for playback metadata (#115728)
  fix(sandbox): scope runtimes by workspace (#115766)
  fix(ui): guide users through missing or broken AI setup (#115716)
  fix(sessions): return direct-agent replies to their active session (#115756)
  fix(zalo): stop provider startup after gateway shutdown (#115763)
  fix(agents): bound completed background process retention (#115760)
  fix(plugins): bound hook execution and retire stale registrations (#115695)
  fix(ui): collapse custodian startup error gap (#115720)
  fix(gateway): reload edited hook transforms (#107875)
  refactor: centralize channel streaming config hints (#115739)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
…ft-ingestion

* origin/main:
  fix(feishu): reject unsupported initial document content (openclaw#115697)
  feat(media): probe duration and dimensions for playback metadata (openclaw#115728)
  fix(sandbox): scope runtimes by workspace (openclaw#115766)
  fix(ui): guide users through missing or broken AI setup (openclaw#115716)
  fix(sessions): return direct-agent replies to their active session (openclaw#115756)
  fix(zalo): stop provider startup after gateway shutdown (openclaw#115763)
  fix(agents): bound completed background process retention (openclaw#115760)
  fix(plugins): bound hook execution and retire stale registrations (openclaw#115695)
  fix(ui): collapse custodian startup error gap (openclaw#115720)
  fix(gateway): reload edited hook transforms (openclaw#107875)
  refactor: centralize channel streaming config hints (openclaw#115739)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu docs Improvements or additions to documentation maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feishu_doc create action silently ignores content parameter — creates empty document

2 participants