fix(skills): align skill guidance with the typed error contract#1786
fix(skills): align skill guidance with the typed error contract#1786evandance wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (20)
✅ Files skipped from review due to trivial changes (13)
🚧 Files skipped from review as they are similar to previous changes (6)
📝 WalkthroughWalkthroughDocumentation across multiple skill references and one test coverage file is updated to align with revised CLI response envelopes and error-field naming, including ChangesCLI docs alignment with new response/error contract
Estimated code review effort: 3 (Moderate) | ~30 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
e20db5a to
d4472a1
Compare
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@c5e73f99eaab20721d0c3b30a11f98c32f05e8a2🧩 Skill updatenpx skills add larksuite/cli#fix/skills-typed-error-contract -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1786 +/- ##
=======================================
Coverage 74.42% 74.42%
=======================================
Files 860 860
Lines 89754 89754
=======================================
Hits 66797 66797
Misses 17779 17779
Partials 5178 5178 ☔ 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 `@skills/lark-slides/references/lark-slides-xml-presentation-slide-replace.md`:
- Around line 159-164: The response-field table is missing the documented
error.message field, so update the table in the slide-replace reference to
include a row for error.message alongside error.code, error.subtype, and
error.hint. Keep the wording consistent with the existing typed-envelope
contract and failure example so the schema docs stay aligned.
🪄 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: 0e0e70c4-7858-464a-b5c7-38c68dd4dcd2
📒 Files selected for processing (20)
skills/lark-apps/references/lark-apps-openapi-key.mdskills/lark-base/SKILL.mdskills/lark-base/references/lark-base-dashboard-block-get-data.mdskills/lark-base/references/lark-base-data-query.mdskills/lark-drive/references/lark-drive-member-add.mdskills/lark-drive/references/lark-drive-pull.mdskills/lark-drive/references/lark-drive-push.mdskills/lark-drive/references/lark-drive-status.mdskills/lark-minutes/SKILL.mdskills/lark-minutes/references/lark-minutes-todo.mdskills/lark-shared/SKILL.mdskills/lark-slides/references/examples.mdskills/lark-slides/references/lark-slides-screenshot.mdskills/lark-slides/references/lark-slides-xml-presentation-slide-create.mdskills/lark-slides/references/lark-slides-xml-presentation-slide-delete.mdskills/lark-slides/references/lark-slides-xml-presentation-slide-get.mdskills/lark-slides/references/lark-slides-xml-presentation-slide-replace.mdskills/lark-slides/references/lark-slides-xml-presentations-get.mdskills/lark-vc-agent/SKILL.mdtests/cli_e2e/drive/coverage.md
Skill references written before the typed-error refactor still taught retired envelope shapes. AI agents following them now read what the CLI actually emits:
- permission recovery reads error.missing_scopes instead of the upstream permission_violations detail
- confirmation gates use type=confirmation, subtype=confirmation_required, and flat risk/action fields
- drive duplicate-remote failures are typed validation envelopes (failed_precondition with params[]), not duplicate_remote_path with error.detail
- drive batch partial failures are ok:false results on stdout, not an error.type=partial_failure stderr envelope
- minutes edit-permission and word-replace misses branch on stable error.code/error.subtype, not message text
- slides replace failures are stderr typed envelopes only; no raw backend response is printed to stdout
- slides and Base command outputs show the ok/identity/data success envelope instead of the raw {code,msg} OpenAPI wrapper
d4472a1 to
c5e73f9
Compare
Summary
Align skill/reference guidance with the current typed error contract so agents do not follow retired raw OpenAPI or legacy envelope shapes. This is a docs-only fix across Lark skill docs and related drive coverage notes.
Changes
missing_scopes,type=confirmation,subtype=confirmation_required, flatrisk/action, and stdoutok:falsepartial results).{code,msg}/ backend-response examples in Base and Slides docs with the CLI success/error envelopes that agents actually see.error.code/error.subtypeinstead of human message text.Test Plan
lark-cli <domain> <command>flow works as expectedLARKSUITE_CLI_NO_UPDATE_NOTIFIER=1 LARKSUITE_CLI_NO_SKILLS_NOTIFIER=1 lark-cli drive +delete --file-token file_token_test --type file --as botexits 10 and emits a typed confirmation envelope withtype=confirmation,subtype=confirmation_required, flatrisk, andaction.git diff --check origin/main...HEADnode scripts/skill-format-check/index.jsbash scripts/check-skill-wire-vocab.shjsonfences in changed Markdown files parse as JSON.scripts/check-doc-tokens.shregex; no realistic token additions found.Related Issues
Summary by CodeRabbit
ok/identityfor success and consistentdata/errorstructures for failures.missing_scopes/scope error fields and improved recovery instructions.validationfor duplicaterel_pathconflicts), plus slide and minutes command examples.