Initial commit: AS4/411 directory and discovery service for Sankofa Marketplace
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
28
docs/adr/002-resolution-scoring-determinism.md
Normal file
28
docs/adr/002-resolution-scoring-determinism.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# 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.
|
||||
Reference in New Issue
Block a user