Problem
There is an unresolved architectural decision about whether error numbers should belong to the realm or to the application level.
Locations
src/main/java/io/err0/client/core/RealmPolicy.java:73
// TODO: do error numbers belong to the realm or to the app
src/main/java/io/err0/client/core/ProjectPolicy.java:173
// TODO: do error numbers belong to realm or app
Context
This affects:
- API design and platform behavior
- How error codes are organized and managed
- Potential namespace collision handling
- Multi-project/multi-realm scenarios
Current Behavior
The code has TODOs but appears to work. Need to clarify the intended design.
Questions for Architecture Decision
- Use Case: Can multiple apps share the same realm?
- Scope: Should error numbers be globally unique across all realms, or unique per realm?
- Isolation: Can different realms have overlapping error number ranges?
- Migration: If we change this, what's the migration path?
- API Impact: How does this affect the public API?
Recommended Approach
- Document the current behavior
- Define the intended behavior with examples
- Update
RealmPolicy.java and ProjectPolicy.java accordingly
- Add tests validating the behavior
- Update API documentation
Acceptance Criteria
Problem
There is an unresolved architectural decision about whether error numbers should belong to the realm or to the application level.
Locations
src/main/java/io/err0/client/core/RealmPolicy.java:73// TODO: do error numbers belong to the realm or to the appsrc/main/java/io/err0/client/core/ProjectPolicy.java:173// TODO: do error numbers belong to realm or appContext
This affects:
Current Behavior
The code has TODOs but appears to work. Need to clarify the intended design.
Questions for Architecture Decision
Recommended Approach
RealmPolicy.javaandProjectPolicy.javaaccordinglyAcceptance Criteria
docs/architecture/error-number-ownership.md