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:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user