Skip to content

fix(feishu): support drive folder pagination#101572

Merged
steipete merged 1 commit into
mainfrom
codex/fix-feishu-drive-pagination-clean
Jul 7, 2026
Merged

fix(feishu): support drive folder pagination#101572
steipete merged 1 commit into
mainfrom
codex/fix-feishu-drive-pagination-clean

Conversation

@steipete

@steipete steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Feishu Drive folder listings return next_page_token, but the feishu_drive tool could not accept that cursor, leaving every page after the first unreachable.

This is the clean current-main replacement for #101249 and #101567. The original contributor branch was 159 main commits and 903 files behind; the first replacement then inherited merge-base noise when the verified GitHub commit path appended its rebased tree. This branch contains exactly the four intended Feishu files in one co-authored commit.

Why This Change Was Made

  • Add bounded page_size and page_token inputs to the existing list action.
  • Normalize folder and cursor tokens and validate page_size at runtime, not only in the model schema.
  • Scope cursors to a concrete shared folder; Feishu bot credentials have no browsable root, so pagination is not forwarded for omitted, blank, or "0" folder tokens.
  • Document one-page continuation in the bundled Feishu Drive skill.

The change stays plugin-local and preserves the existing response shape. It does not broaden into automatic recursive pagination or the separate info lookup behavior tracked by #93928.

User Impact

Agents can retrieve subsequent pages of a shared Feishu Drive folder by passing the returned next_page_token as page_token with the same folder_token. Invalid page sizes fail before an API request.

Evidence

  • Upstream @larksuiteoapi/node-sdk source confirms drive.file.list accepts folder_token, page_size, and page_token, and returns next_page_token / has_more.
  • Contributor gateway proof on fix(feishu): folder listings can continue after first page #101249 exercised /tools/invoke through the bundled tool and captured the expected SDK-boundary continuation request.
  • Identical four-file tree proof on sanitized AWS: cbx_5bcffb4b507b, run run_5b84b967a00e; 20/20 Feishu Drive tests passed.
  • oxfmt on all touched files; git diff --check; skill YAML frontmatter parse.
  • Fresh GPT-5.5 autoreview of this exact four-file bundle: clean, confidence 0.86.
  • Source-blind behavior validation: continuation and blank-cursor clauses passed from the public Gateway capture; invalid-size and root live clauses were blocked by unavailable credentials/harness and are covered by remote automated proof.
  • Exact commit-head sanitized AWS and hosted CI/Testbox evidence will be posted before merge.

Closes the list continuation portion of #93928. Supersedes #101249 and #101567.

@openclaw-barnacle openclaw-barnacle Bot added channel: feishu Channel integration: feishu size: S maintainer Maintainer-authored PR labels Jul 7, 2026
@steipete

steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head 4a032a7ecd939b2b995d2aef4b3c6cf226769f1d:

  • Best-fix review: plugin-local manual folder continuation; no automatic drain, recursive traversal, new config, or unsupported bot-root pagination. The separate info lookup remains tracked by Feishu drive info falsely reports File not found for files past page 1 (list pagination already fixed in #101572) #93928.
  • Dependency contract: upstream @larksuiteoapi/node-sdk drive.file.list accepts folder_token, page_size, and page_token, and returns next_page_token / has_more.
  • Sanitized AWS Crabbox: provider aws, lease cbx_0acbc10b76cf, run run_e2a2594a08e5, public network, no Tailscale, no instance role, no hydration.
  • Exact remote command: pnpm test extensions/feishu/src/drive.test.ts through the trusted untrusted-PR bootstrap; 20/20 tests passed.
  • Hosted exact-head CI/Testbox: workflow run 28859882033 succeeded; native OPENCLAW_TESTBOX=1 scripts/pr prepare-run 101572 passed and verified the remote head.
  • Static proof: oxfmt on all touched files, git diff --check, and successful Feishu skill YAML frontmatter parse.
  • Fresh GPT-5.5 autoreview: no accepted/actionable findings; patch correct, confidence 0.86.
  • Source-blind behavior validation: shared-folder continuation and blank-cursor clauses passed from the public Gateway capture on fix(feishu): folder listings can continue after first page #101249. Invalid-size and root-suppression live clauses were blocked because live Feishu credentials and the contributor's capture harness are unavailable; exact-head automated proof covers those branches.

No known code or CI blockers remain. Contributor credit is preserved in the co-authored commit and PR body.

@steipete
steipete merged commit 69b9932 into main Jul 7, 2026
116 of 120 checks passed
@steipete
steipete deleted the codex/fix-feishu-drive-pagination-clean branch July 7, 2026 10:48
@steipete

steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant