fix(event): migrate shortcut errors to typed envelopes#1289
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 (10)
📝 WalkthroughWalkthroughThis PR standardizes error handling in the ChangesEvent error handling standardization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@2cf4055a7df1fe4ea4846c4ff419feb4da77b39c🧩 Skill updatenpx skills add larksuite/cli#feat/errs-migrate-event -y -g |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1289 +/- ##
=======================================
Coverage 70.33% 70.33%
=======================================
Files 672 673 +1
Lines 65322 65335 +13
=======================================
+ Hits 45941 45952 +11
- Misses 15728 15731 +3
+ Partials 3653 3652 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Migrate the event shortcut domain to typed
errs.*envelopes for validation, local file I/O, lock contention, registry, route parsing, and WebSocket transport failures. This keeps event command errors structured, actionable, and machine-readable for CLI consumers.Changes
output.Err*/ finalfmt.Errorfpaths inshortcuts/event.param,subtype, and wrapped causes for--route,--filter,--output-dir, subscriber locks, directory creation, and WebSocket failures.shortcuts/event/to the typed error lint and errscontract migrated-path guards.event +subscribe.Test Plan
make unit-testlark-cli event +subscribe --dry-runflow works as expected:go test ./tests/cli_e2e/eventgo vet ./...go run -C lint . ..go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6 run --new-from-rev=origin/mainRelated Issues
Summary by CodeRabbit
Tests
Chores