fix(base): surface url resolve block list errors - #2130
fix(base): surface url resolve block list errors#2130zhouyue-bytedance wants to merge 2 commits into
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)
📝 WalkthroughWalkthroughBase and Wiki URL resolution now return errors from selected-block hint enrichment. Tests cover block-list authorization failures and unconfirmed block selection. ChangesBase resolution error handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
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/base/base_resolve.go`:
- Around line 210-212: Add regression coverage for the Wiki Base table URL path
that triggers a 99991672 base:block:read block-list error. Assert the response
is the typed problem/PermissionError and that stdout remains empty, alongside
the existing Base URL block-list test.
🪄 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 Plus
Run ID: 4d242929-1e7e-44df-b0af-a846064562cd
📒 Files selected for processing (2)
shortcuts/base/base_resolve.goshortcuts/base/base_resolve_test.go
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@58d488e379cdfb8449134eb8de4edc06a9d0b2f3🧩 Skill updatenpx skills add larksuite/cli#fix/base-url-resolve-propagate-block-error -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2130 +/- ##
==========================================
+ Coverage 75.39% 75.45% +0.05%
==========================================
Files 924 924
Lines 98005 98303 +298
==========================================
+ Hits 73895 74172 +277
- Misses 18478 18491 +13
- Partials 5632 5640 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
base +url-resolvenow returns the underlyingblocks/listAPI error when selected Base block enrichment fails, instead of emittingok=truewith only a neutral unknown-block hint. This makes missingbase:block:readscope and other block-list failures visible to users and CI.Changes
resolveSelectedBaseBlockerrors throughexecuteBaseURLResolvefor Base and Wiki Base URLs.Test Plan
go test ./shortcuts/basego test ./tests/cli_e2e/base -run 'TestBaseURLResolveSelectedBlockDryRun|TestBaseURLResolveWikiSelectedBlockDryRun'\n- [x] Manual local verification confirmsbase +url-resolve --as botsurfacesbase:block:readmissing scope for a bot without that scope, while--as userstill resolves the same table URL successfully.\n\n## Related Issues\n- NoneSummary by CodeRabbit