{"artifactType":"aksh-uk-eu-database-adapter-contract","syntheticOnly":true,"realPatientData":false,"productionDatabaseConfigured":false,"activeAdapter":"json_file_repository","adapterResolutionModule":"lib/storage/get-review-case-repository-adapter.ts","defaultSourceOfTruth":"json_file_repository","migrationStatus":"contract_defined_json_active_database_planned","adapters":[{"id":"json_file_repository","label":"JSON file repository","status":"active","enabled":true,"sourceOfTruth":true,"storageBoundary":"data/*.json scoped stores","contractRole":"Default proof adapter for synthetic review cases, roadmap state, feedback, sign-off, and readiness evidence.","supports":["read_all_review_cases","read_review_case_by_id","create_review_case","update_review_case","reset_seed_cases","scope_key_isolation","user_id_ownership_checks","frozen_artifact_persistence"],"mustPreserve":["Deterministic seed/reset behavior for clean demos.","ReviewCase shape and frozen artifact payloads.","Audit events, field changes, reviewer decisions, and validation history.","User-scoped proof stores without deleting scoped session files automatically."],"notYet":["Not a production clinical database.","Not suitable for real patient data.","No production backup, restore, retention, or audit-integrity guarantees."]},{"id":"planned_database_repository","label":"Planned database repository","status":"planned","enabled":false,"sourceOfTruth":false,"storageBoundary":"Future database adapter behind the same repository function contracts.","contractRole":"Future production-readiness adapter; not configured in the synthetic proof build.","supports":["repository_contract_parity","transactional_case_updates","audit_integrity_checks","environment_separated_datasets","backup_restore_policy","retention_policy"],"mustPreserve":["Current repository function names and return shapes.","Synthetic seed/reset capability in demo environments.","Explicit separation between synthetic proof data and any future controlled datasets.","Human reviewer decision and frozen evidence artifact semantics."],"notYet":["No database URL is required for this build.","No production schema migration has been run.","No real patient dataset is allowed.","No production access-control model is signed off."]}],"repositoryInterface":[{"operation":"readReviewCases","contract":"Returns all cases for a scope, reseeding missing synthetic fixtures when needed."},{"operation":"readReviewCaseById","contract":"Returns one case or null and enforces optional user ownership checks."},{"operation":"writeReviewCases","contract":"Persists a complete scoped case collection without changing ReviewCase shape."},{"operation":"updateReviewCase","contract":"Persists one updated case and preserves ownership validation."},{"operation":"createReviewCase","contract":"Creates a scoped synthetic case and assigns an explicit user owner."},{"operation":"resetReviewCases","contract":"Restores seeded synthetic cases for the chosen scope."}],"requiredParityChecks":[{"id":"scoped_round_trip","behavior":"A repository adapter must write and read cases by scope without leaking cases into other scopes."},{"id":"seed_rehydration","behavior":"A repository adapter must restore missing synthetic seed cases when reading an incomplete proof store."},{"id":"create_assigns_owner_and_prepends","behavior":"A repository adapter must assign an explicit owner on create and place the created case first."},{"id":"read_enforces_optional_ownership","behavior":"A repository adapter must return owned cases and reject reads when a different user is supplied."},{"id":"update_persists_review_state","behavior":"A repository adapter must persist status, reviewer decision metadata, and frozen evidence artifacts."},{"id":"update_blocks_wrong_owner","behavior":"A repository adapter must reject updates when the supplied user does not own the case."},{"id":"reset_restores_seed_cases","behavior":"A repository adapter must reset the selected proof scope back to deterministic synthetic seed cases."}],"acceptanceCriteria":["`json_file_repository` remains the default adapter until a database adapter passes parity tests.","A future database adapter must satisfy the same repository operations before UI routes switch to it.","No live patient data, NHS integration, or production clinical claim is unlocked by this contract.","Demo seed/reset behavior must remain available after any storage migration."],"generatedBy":"public","generatedAt":"2026-07-12T15:44:52.333Z"}