Compose coherent Overview snapshots and preserve access ordering

This commit is contained in:
Steffen committed 2026-10-14 12:06:52 +02:00
1 parent cab10c5306
commit cc7f87105d
16 files changed
+38314 -5

No files matched your search

File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+4
View File
@@ -39,3 +39,7 @@ Observation module owns its private EF context/entities and versioned schema SQL
### Stage 4 checkpoint — passed
SummaryPolicy, TrendPolicy, ClinicalPolicy and Guidance-owned versioned ReferenceCatalog extracted without changing formulas/rounding/thresholds/labels/explanations. Analytics captures one immutable series and releases the shared snapshot before calculation. All original numerical/trend tests retained, with shared namespaces and explicit catalog constructor injection; HTTP dependency failure expectations alone changed 502→503 under Q1. 207/207 tests passed, zero build warnings/errors. `src/TRENDS.md` preserves reproducible method details; `clinical-provenance.md` records unverified cautious inferences and narrative limits without altering outputs.
### Stage 5 checkpoint — passed
Overview composes typed Profile, Observation and Analytics queries; profile/latest/selected series share repeatable-read from authorization. Analytics releases capture before calculation. Deterministic interleaving commits Profile and Observation changes after Profile capture: in-flight overview stays old/coherent; next sees new values; selected query called once; transaction inactive before Analytics returns. All adopted Overview, patient and professional suites pass: 266/266 cases, zero warnings/errors. Ownership now checks route metadata before model validation to preserve denied empty-404 behaviour. Stage 4 commit `cab10c5`.
+8
View File
@@ -12,3 +12,11 @@ Authority: approval Q1. Unmodified originals remain under Reference/Architecture
| New concurrency checks | Hold row lock, prove both patches wait, release, verify both disjoint changes and unchanged owner/time/note; new architecture obligation |
Insight/context/trend/deletion-derived tests: service-stop helpers represent DB outage, expected 503 replaces 502; current data, no-write, no-false-insufficiency assertions unchanged. Pure calculation tests instantiate the identical mathematical implementation through its internal test-compatible entry and explicit Guidance reference catalog. No clinical assertion changed.
| Additional original scenario | B replacement / preserved obligations |
| --- | --- |
| HealthOverviewTests.Overview_service_credential_is_restricted_to_required_reads | Sole edge rejects service-only headers with 401, replacing 403 from obsolete Service role. No protected data returned |
| HealthOverviewTests.Unavailable_source_or_overview_is_a_failure_not_absent_insight | Each old service-stop example injects shared DB unavailability; 503 replaces 502. No false nullable-insight success |
| PatientAuthenticationTests.Direct_services_reject_client_tokens_missing_keys_and_forged_keys / Service_credentials_are_limited_to_their_documented_read_calls | Replaced together by Sole_public_edge_accepts_client_ticket_but_service_headers_grant_no_access: valid client ticket works at sole edge, forged service headers grant nothing, internal by-account route absent. Originals remain baseline evidence. Patient/professional denial matrices unchanged |
| PatientAuthenticationTests.Database_failure_rolls_back_profile_and_association_together | Same B-local trigger/no-row/retry assertions, search_path resolves owned Profile schema; unexpected write failure still 500 |
| Original view/overview wire DTOs | Same JSON fields. Shared context DTO nullable annotation needs test null-forgiving operator after established setup; assertions unchanged |