-
Notifications
You must be signed in to change notification settings - Fork 25
Error codes on reportable capability errors #1715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
ec93c6d to
f2f0b46
Compare
f2f0b46 to
46bd1a7
Compare
84b07f3 to
d98d621
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates capability error handling from a legacy system using RemoteReportableError and ReportableUserError to a new structured error system with explicit error codes, visibility levels (public/private), and origin types (system/user). The change improves error categorization and enables better error reporting across distributed nodes.
Key changes:
- Introduces a new
caperrorspackage with structured error types including error codes, visibility, and origin - Updates error serialization/deserialization to support the new format while maintaining backwards compatibility
- Replaces legacy error wrapper types with the new capability error system
- Updates all generated capability server interfaces to return
caperrors.Errorinstead of genericerror
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/capabilities/errors/error.go | Defines core error types with visibility, origin, and error code fields |
| pkg/capabilities/errors/error_codes.go | Defines gRPC-based error codes and conversion utilities |
| pkg/capabilities/errors/error_serialization.go | Implements error serialization for cross-node communication |
| pkg/capabilities/errors/error_serialization_test.go | Tests serialization, deserialization, and backwards compatibility |
| pkg/loop/internal/core/services/capability/capabilities.go | Updates error handling to use new capability error system |
| pkg/loop/internal/core/services/capability/capabilities_test.go | Updates tests to validate new error types and properties |
| pkg/capabilities/remote_reportable_error.go | Removes legacy error type |
| pkg/capabilities/reportable_user_error.go | Removes legacy error type |
| pkg/capabilities/remote_unreportable_error.go | Removes legacy error type |
| Various server_gen.go files | Updates generated interfaces to return caperrors.Error |
Comments suppressed due to low confidence (1)
pkg/capabilities/errors/error_serialization_test.go:1
- Corrected spelling of 'compatability' to 'compatibility'.
package errors_test
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR migrates capability error handling from a legacy system using RemoteReportableError and ReportableUserError to a new structured error system with explicit error codes, visibility levels (public/private), and origin types (system/user). The change improves error categorization and enables better error reporting across distributed nodes.
Key changes:
Introduces a new caperrors package with structured error types including error codes, visibility, and origin
Updates error serialization/deserialization to support the new format while maintaining backwards compatibility
Replaces legacy error wrapper types with the new capability error system
Updates all generated executable capability server interfaces to return caperrors.Error instead of generic error