- Shipped
- October 18, 2026 at 11:09 PM UTC
- Author
- Kamo
- Commit
- d461c33
PhiAccessRecorder stamped occurredAt by rebuilding each event from a field list written before the clinical columns existed, and no caller sets occurredAt, so every clinical phi_access_log row reached the table with purpose_of_use, access_basis, patient_compartment_id, fhir_resource_type and break_glass_grant_id NULL: no 164.528 accounting could be built from them. The stamp is now a full copy (PhiAccessEvent.toBuilder), pinned by reflection in PhiAccessEventCopyTest. ClinicalBaseEntity.updated_at was NOT NULL, insertable = false and still updatable, with nothing setting it: an entity just persisted held null, so any further change in the same persistence context flushed UPDATE ... updated_at = NULL (500), and later updates wrote the old value back (the column never moved). It is now stamped in @PrePersist/@PreUpdate and insertable, for all 68 clinical entities. InsertOnlyColumnTrapTest forbids the insertable=false-but-updatable shape on every entity in the library; the 6.2.13 execution proof is securityservice ClinicalUpdatedAtFlushTest.
