PR-002: Persistence Adapters — in-memory, zero external dependencies

- Repository interfaces defined by domain (@landvex/domain)
- 6 in-memory adapters: Session, Mission, DecisionCase, Artifact, EventStore, UnitOfWork
- 9 tests verifying adapter contracts
- Domain unchanged — infrastructure depends on domain, never reverse
- ADR-006: In-Memory Adapters for Testing

Definition of Done met:
- All adapters compile against domain interfaces
- Unit tests pass (9/9)
- No PostgreSQL, S3, Express, AI in this PR
- Ready for PR-003: PostgreSQL adapters
This commit is contained in:
Bernt
2026-07-02 14:59:37 +00:00
parent fa0dbf5127
commit 02b51d7814
22 changed files with 963 additions and 17 deletions
+5
View File
@@ -13,6 +13,7 @@ export type FindingId = string & { readonly __brand: 'FindingId' };
export type ReviewId = string & { readonly __brand: 'ReviewId' };
export type ActionId = string & { readonly __brand: 'ActionId' };
export type OutcomeId = string & { readonly __brand: 'OutcomeId' };
export type DecisionCaseId = string & { readonly __brand: 'DecisionCaseId' };
/**
* ID factory functions
@@ -59,5 +60,9 @@ export const IdFactory = {
outcome: (sequence: number): OutcomeId => {
return `outcome_${sequence.toString().padStart(6, '0')}` as OutcomeId;
},
decisionCase: (sequence: number): DecisionCaseId => {
return `decision_${sequence.toString().padStart(6, '0')}` as DecisionCaseId;
}
};