feat(wiki): improve wiki node creation and terminal errors - #2266
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe CLI now supports Wiki file shortcut creation, rejects invalid origin/file combinations, and classifies terminal ChangesWiki node handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
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: 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 466-471: Update the typed-error assertions in the test around
errs.ProblemOf to also require p.Category == errs.CategoryAPI, alongside the
existing code and subtype checks, so non-API problems with matching values fail
the test.
🪄 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: c8fe66c0-eb17-454b-b623-ede789a04823
📒 Files selected for processing (7)
shortcuts/wiki/wiki_node_create.goshortcuts/wiki/wiki_node_create_test.goshortcuts/wiki/wiki_node_get.goshortcuts/wiki/wiki_node_get_test.goskills/lark-wiki/SKILL.mdskills/lark-wiki/references/lark-wiki-node-create.mdskills/lark-wiki/references/lark-wiki-node-get.md
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@c70e3d75bc253e234a09e7f3fac2755f765c433e🧩 Skill updatenpx skills add larksuite/cli#feat/wiki-node-improvements -y -g |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2266 +/- ##
==========================================
+ Coverage 76.36% 76.40% +0.03%
==========================================
Files 1011 1013 +2
Lines 111269 111813 +544
==========================================
+ Hits 84970 85427 +457
- Misses 19815 19877 +62
- Partials 6484 6509 +25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
979d037 to
04d638f
Compare
04d638f to
6eda0cd
Compare
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 `@tests/cli_e2e/wiki/wiki_node_create_dryrun_test.go`:
- Around line 147-151: Extend the validation failure assertions in the wiki node
create dry-run test to verify the expected error.param value and assert that
result.Stdout is empty. Keep the existing exit code, error.type, error.subtype,
error.message, and error.hint assertions unchanged while enforcing the
stderr-only typed validation envelope.
🪄 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: 7e0fdb5a-1575-4381-944a-a9efb5a56914
📒 Files selected for processing (2)
tests/cli_e2e/wiki/wiki_node_create_dryrun_test.gotests/cli_e2e/wiki/wiki_node_create_file_shortcut_workflow_test.go
71d13e1 to
c665266
Compare
c665266 to
c70e3d7
Compare
fangshuyu-768
left a comment
There was a problem hiding this comment.
The requested dry-run and live E2E coverage is now present, the cleanup path correctly addresses shortcut nodes by wiki node token, targeted local verification passes, and all CI checks are green.
Summary
wiki +node-createto create file shortcuts while rejecting unsupported origin file nodes locallywiki +node-getbusiness errors131012,131013, and131014as terminal, non-retryable failures with actionable hintsTesting
go test ./shortcuts/wiki -count=1go test ./internal/qualitygate/skillscan -count=1git diff --checkSummary by CodeRabbit