feat(authorization): expand lark-shared auth guidance and tighten logout JSON contract#1598
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR updates the shared Lark skill guidance for auth tasks and ChangesLark shared skill guidance
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
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-shared/SKILL.md`:
- Line 146: The documentation in the SKILL guide overstates that lark-cli update
always syncs AI Skills. Update the wording near the update guidance to
distinguish the two install paths: when using the binary/self-update flow it
updates both CLI and AI Skills, but when installed via npm it only updates the
CLI and requires a separate skills sync step. Keep the reference to lark-cli
update and clarify the npm/manual sync behavior so the note is accurate.
🪄 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: 6992a806-7dca-4c0f-80b2-d52ab608e89a
📒 Files selected for processing (2)
cmd/auth/logout_test.goskills/lark-shared/SKILL.md
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@e9ef096cd711b03e1634e8051642279882ee47be🧩 Skill updatenpx skills add larksuite/cli#auto-research-sync/01KVWPVKPPB9A5CE0W0C28VNSX/mr-573-395863ea -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1598 +/- ##
==========================================
- Coverage 74.75% 74.64% -0.11%
==========================================
Files 800 806 +6
Lines 80459 81386 +927
==========================================
+ Hits 60147 60752 +605
- Misses 15857 16101 +244
- Partials 4455 4533 +78 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5b5d16e to
5e0d683
Compare
…n logout JSON - skills/lark-shared/SKILL.md: broaden skill description to cover auth login/status/logout, --domain business-domain scopes, missing scopes and authorization revocation; add an auth task quick-reference table mapping user intents to lark-cli commands; document LARKSUITE_CLI_NO_UPDATE_NOTIFIER / LARKSUITE_CLI_NO_SKILLS_NOTIFIER env vars for stable JSON; soften _notice.update handling so it no longer interrupts the current task. - cmd/auth/logout_test.go: in TestAuthLogoutRun_JSONMode_Success_WritesStdoutOnly, additionally assert that the success JSON payload has no 'message' field, matching the contract that logout success only carries loggedOut=true.
5e0d683 to
e9ef096
Compare
Summary
Expand the lark-shared skill so it owns the full lark-cli authorization surface (login, status, logout, business-domain scopes, missing scopes, authorization revocation,
_noticehandling), and tighten the auth logout JSON-mode test so success responses are asserted to carry onlyloggedOut=truewith no straymessagefield.Changes
skills/lark-shared/SKILL.mddescriptionso authorization-related intents (auth login/status/logout, user vs bot identity,--domainbusiness-domain permissions includingall/docs/drive, missing scopes, authorization revocation,_noticeJSON) route to this skill instead ofupdate-config/ Claude settings.lark-clicommands and the JSON fields that should be cited in answers.LARKSUITE_CLI_NO_UPDATE_NOTIFIER=1andLARKSUITE_CLI_NO_SKILLS_NOTIFIER=1env vars for producing stable JSON when scripts or machines read the output._notice.updatehandling: it must no longer interrupt the current task or be copied verbatim as the primary answer; surface thelark-cli updatehint only after the user's request is complete and only when still relevant.cmd/auth/logout_test.goTestAuthLogoutRun_JSONMode_Success_WritesStdoutOnly, additionally assert that the success stdout payload does not contain amessagefield, locking in the contract that logout success carries onlyloggedOut=true(alongside the existingreason-absence check).Test Plan
git diff --checkon the synced worktree (passed; no whitespace errors or conflict markers).TestAuthLogoutRun_JSONMode_Success_WritesStdoutOnlyis exercised by the existing Go test suite forcmd/authwhenevergo test ./cmd/auth/...is run in CI; it only tightens an existing success-path assertion and does not introduce new fixtures or dependencies.Related Issues
Auto research task: 01KVWPVKPPB9A5CE0W0C28VNSX
Summary by CodeRabbit
_noticeJSON.lark-cli authcommands and which JSON fields to cite forauth status --json --verify.