29 lines
784 B
Markdown
29 lines
784 B
Markdown
# ADR-002: Resolution Scoring and Determinism
|
|
|
|
## Status
|
|
|
|
Accepted.
|
|
|
|
## Context
|
|
|
|
Resolution must return a stable, ordered list of routing directives for the same inputs and store state.
|
|
|
|
## Decision
|
|
|
|
### Determinism
|
|
|
|
- Same normalized request + same directory state implies same ordered list of RouteDirectives.
|
|
- Tie-break when scores are equal: (1) explicit priority higher first, (2) lexical by endpoint id then participant id.
|
|
|
|
### Scoring
|
|
|
|
- Factors: endpoint priority, endpoint status (active preferred over draining over inactive). No randomness; same inputs imply same scores and order.
|
|
|
|
### Cache Key
|
|
|
|
- Derived from canonical request (sorted identifiers, serialized serviceContext and constraints, tenant).
|
|
|
|
## Consequences
|
|
|
|
- Caching and retries are reproducible and safe.
|