fix: support bot identity for drive search#1670
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 (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthrough
ChangesBot identity support for drive +search
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1670 +/- ##
==========================================
+ Coverage 74.71% 74.73% +0.02%
==========================================
Files 810 811 +1
Lines 81881 81965 +84
==========================================
+ Hits 61178 61258 +80
- Misses 16135 16138 +3
- Partials 4568 4569 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@f47339f44e3a5b6a0cc41e005b030ec8150fefda🧩 Skill updatenpx skills add larksuite/cli#feat/drive-search-app-identity -y -g |
08af4ba to
acff247
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/drive/drive_search_dryrun_test.go`:
- Around line 173-195: The dry-run test for drive search is still only
validating a request shape that matches the user path, so it does not prove the
bot identity path is used. Update the test around clie2e.RunCmd for drive
+search to assert a bot-specific observable signal from the recorded output,
such as the emitted identity/as field in the dry-run payload if available, so
the case actually verifies DefaultAs: "bot" and the --as bot behavior.
🪄 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: 0e067c58-56bd-4415-8b71-6dd68086faee
📒 Files selected for processing (4)
shortcuts/drive/drive_search.goshortcuts/drive/shortcuts_test.goskills/lark-drive/references/lark-drive-search.mdtests/cli_e2e/drive/drive_search_dryrun_test.go
acff247 to
f47339f
Compare
Summary
Enable
drive +searchto run with bot identity so app-only configurations can use Search v2 doc/wiki search without being blocked by identity pruning. The current-user convenience filters remain documented as requiring a user open_id.Changes
drive +search.drive +search --as bot.Test Plan
go test ./shortcuts/drivego test ./tests/cli_e2e/drive -run TestDriveSearchDryRunlark-cli drive +search --as bot --dry-runflow works as expectedRelated Issues
Summary by CodeRabbit
drive +searchdocumentation to clarify identity boundary behavior and how to use explicit identity options when searching.