fix(wiki): clarify resource permission recovery - #2281
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughWiki node get and list commands now classify API error ChangesWiki permission error handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@shortcuts/wiki/wiki_list_copy_test.go`:
- Around line 284-306: The tests must verify the complete typed-error contract,
including metadata and cause preservation. In
shortcuts/wiki/wiki_list_copy_test.go:284-306, create the input permission error
with a sentinel cause, then assert errors.Is(got, cause) and validate the
expected Category, Subtype, and Code alongside the existing retry and hint
checks. In shortcuts/wiki/wiki_node_get_test.go:490-529, add an assertion that
the mounted command’s returned error preserves the underlying API error cause;
no other changes are required there.
In `@skills/lark-wiki/references/lark-wiki-node-list.md`:
- Line 90: Update the permission_denied guidance in the node-list documentation
to use the generic recovery action from wikiPermissionDeniedHint, without
branching on or relying on the upstream error message. Tell users to ask the
resource owner or Wiki administrator to grant read access, or use an accessible
resource, while preserving the terminal no-retry and no-identity-switch
behavior.
🪄 Autofix
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 Plus
Run ID: eeb330fa-7458-4d1a-aec3-3fa04690f47c
📒 Files selected for processing (7)
shortcuts/wiki/wiki_helpers.goshortcuts/wiki/wiki_list_copy_test.goshortcuts/wiki/wiki_node_get.goshortcuts/wiki/wiki_node_get_test.goshortcuts/wiki/wiki_node_list.goskills/lark-wiki/references/lark-wiki-node-get.mdskills/lark-wiki/references/lark-wiki-node-list.md
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@f3b696762ee6b8c725260429b16158709a00193e🧩 Skill updatenpx skills add larksuite/cli#fix/wiki-permission-error-handling -y -g |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2281 +/- ##
==========================================
+ Coverage 76.44% 76.46% +0.01%
==========================================
Files 1013 1013
Lines 111972 112037 +65
==========================================
+ Hits 85601 85666 +65
+ Misses 19860 19859 -1
- Partials 6511 6512 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@shortcuts/wiki/wiki_node_get_test.go`:
- Around line 534-537: Strengthen the 131006 regression fixture by replacing the
permission message and cause with neutral strings, ensuring classification
relies on structured metadata rather than message matching. Update the hint
assertion near the existing check to require the complete shared hint or
explicitly assert that the exact legacy app-scope authorization recommendation
is absent, without rejecting the intentional generic “app scope” wording.
🪄 Autofix
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 Plus
Run ID: ddeb7c18-fea3-4f8a-8f56-63364354fb6e
📒 Files selected for processing (3)
shortcuts/wiki/wiki_list_copy_test.goshortcuts/wiki/wiki_node_get_test.goskills/lark-wiki/references/lark-wiki-node-list.md
🚧 Files skipped from review as they are similar to previous changes (2)
- skills/lark-wiki/references/lark-wiki-node-list.md
- shortcuts/wiki/wiki_list_copy_test.go
24659b5 to
f3b6967
Compare
fangshuyu-768
left a comment
There was a problem hiding this comment.
Reviewed the Wiki 131006 permission recovery changes. The typed error contract, resource-access guidance, tests, and documentation are consistent with the API semantics. No actionable findings.
Summary
Clarify recovery guidance for Wiki
131006failures so agents treat them as resource-access errors instead of app-scope authorization failures. The change keeps the existing non-retryable classification and avoids branching on normalized upstream message text.Changes
wiki +node-getandwiki +node-list.131006behavior in the command references and add regression coverage.Test Plan
go test ./shortcuts/wiki/...node scripts/skill-format-check/index.jsgit diff --checkRelated Issues
Summary by CodeRabbit
Bug Fixes
Documentation