Skip to content

feat(drive): add drive permission public patch error guidance#863

Merged
caojie0621 merged 1 commit into
mainfrom
feat/permission
May 14, 2026
Merged

feat(drive): add drive permission public patch error guidance#863
caojie0621 merged 1 commit into
mainfrom
feat/permission

Conversation

@caojie0621
Copy link
Copy Markdown
Collaborator

@caojie0621 caojie0621 commented May 13, 2026

Summary

  • Add permission.public.patch error-code guidance to the lark-drive skill.
  • Document recovery actions for 91009, 91010, 91011, and 91012.
  • Clarify that 91011 / 91012 require document-level sensitivity exemption or downgrade, and that agents should provide the target document URL.

Test Plan

  • Not run; documentation-only change.

Summary by CodeRabbit

  • Documentation
    • Added step-by-step guidance for handling errors when updating public document permissions, including clear next actions for specific error codes (91009–91012).
    • Clarified behavior when only a document URL or only a token is provided, with guidance on returning the URL or recovering a clickable URL via context/metadata.
    • Expanded the permissions reference table with required scopes for permission read/write operations.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0ec0e151-ad27-49b2-ac01-b18d2bceea0a

📥 Commits

Reviewing files that changed from the base of the PR and between a8f21be and 6363d98.

📒 Files selected for processing (1)
  • skills/lark-drive/SKILL.md
✅ Files skipped from review due to trivial changes (1)
  • skills/lark-drive/SKILL.md

📝 Walkthrough

Walkthrough

Documentation update for Lark Drive permission operations: added error code guidance for permission.public.patch failures (91009–91012) with URL recovery rules, and expanded the permissions reference table to include scopes for permission.public.get and permission.public.patch.

Changes

Drive Permission Documentation Updates

Layer / File(s) Summary
Error code guidance for permission.public.patch
skills/lark-drive/SKILL.md
Added error code reference (91009–91012) with user-facing next steps for permission update failures, including rules for returning or recovering document URLs when only partial context (URL or token) is provided.
Permissions table with scope documentation
skills/lark-drive/SKILL.md
Updated the permissions reference table structure and added required scopes for permission.public.get (docs:permission.setting:read) and permission.public.patch (docs:permission.setting:write_only), preserving other existing scope mappings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

size/M

Suggested reviewers

  • fangshuyu-768

Poem

I nibble notes in moonlit rows,
Error codes in tidy rows I pose.
URLs returned, or found anew,
Permissions set — the doc hops through.
🐰📜✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and specifically describes the main change: adding error guidance documentation for the drive permission public patch feature.
Description check ✅ Passed The PR description covers the required sections: Summary (describes the changes), Test Plan (documents that it's documentation-only). It adequately explains what was added and why.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/permission

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the size/M Single-domain feat or fix with limited business impact label May 13, 2026
@caojie0621 caojie0621 changed the title docs: add drive permission public patch error guidance feat(drive): add drive permission public patch error guidance May 13, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
skills/lark-drive/SKILL.md (1)

214-214: ⚡ Quick win

Clarify the fallback when URL recovery fails.

The instruction specifies recovering the document URL from context/search/metadata when only a token is available. However, it doesn't specify what the agent should do if URL recovery fails (e.g., the token doesn't match any searchable document or metadata is unavailable).

Consider adding guidance such as: "如果无法恢复 URL,则提示用户当前仅有文档 token,建议用户提供完整的文档链接以便进行密级操作。"

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/lark-drive/SKILL.md` at line 214, 补充在处理场景“当用户最初提供的是文档 URL,遇到 `91011` 或
`91012` 时直接把该 URL 原样返回……如果上下文只有 token,需要先尽量通过已有上下文、搜索结果或元数据恢复目标文档 URL”的说明中,明确当
URL 恢复失败的回退行为:在无法通过上下文/搜索/元数据恢复 URL 时,应向用户说明当前仅能获得文档 token(展示 token
值),并提示用户提供完整的文档链接以便执行密级操作,同时可给出可选建议(比如重试搜索、提供更多上下文或元数据)以帮助恢复 URL。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/lark-drive/SKILL.md`:
- Around line 211-212: The two rows for error codes 91011 and 91012 currently
have identical descriptions; verify which is correct and then either (A) if they
truly represent the same user-facing case, keep one description and add a short
parenthetical note explaining why two separate codes exist (e.g., different
backend contexts) so readers aren’t confused, or (B) if they represent different
scenarios, update the descriptive text for the appropriate code (91011 or 91012)
to reflect the distinct condition/context while preserving the user guidance
about opening the document and providing the document URL; locate the table rows
for `91011` and `91012` in SKILL.md and edit the description cell accordingly.

---

Nitpick comments:
In `@skills/lark-drive/SKILL.md`:
- Line 214: 补充在处理场景“当用户最初提供的是文档 URL,遇到 `91011` 或 `91012` 时直接把该 URL 原样返回……如果上下文只有
token,需要先尽量通过已有上下文、搜索结果或元数据恢复目标文档 URL”的说明中,明确当 URL 恢复失败的回退行为:在无法通过上下文/搜索/元数据恢复
URL 时,应向用户说明当前仅能获得文档 token(展示 token
值),并提示用户提供完整的文档链接以便执行密级操作,同时可给出可选建议(比如重试搜索、提供更多上下文或元数据)以帮助恢复 URL。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2ea0a493-0aae-41c3-9b5c-160fb300629c

📥 Commits

Reviewing files that changed from the base of the PR and between b0c9a4d and a8f21be.

📒 Files selected for processing (1)
  • skills/lark-drive/SKILL.md

Comment thread skills/lark-drive/SKILL.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.90%. Comparing base (b0c9a4d) to head (6363d98).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #863   +/-   ##
=======================================
  Coverage   65.90%   65.90%           
=======================================
  Files         518      518           
  Lines       48830    48830           
=======================================
  Hits        32181    32181           
  Misses      13882    13882           
  Partials     2767     2767           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@6363d988a2a7043305b1d9c7d69c50d00c59bcba

🧩 Skill update

npx skills add larksuite/cli#feat/permission -y -g

@evandance evandance added the domain/ccm PR touches the ccm domain label May 14, 2026
@caojie0621 caojie0621 merged commit a93fb2d into main May 14, 2026
22 checks passed
@caojie0621 caojie0621 deleted the feat/permission branch May 14, 2026 13:57
@liangshuo-1 liangshuo-1 mentioned this pull request May 15, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/ccm PR touches the ccm domain size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants