Wiki source code of Audit Trail (v2.6.33 + Target)
Last modified by Robert Schaub on 2026/02/08 08:31
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 1 | {{warning}} |
| 2 | **Implementation Status (v2.6.33)** - Full audit trail with EDIT table is **not yet implemented**. Current implementation uses ##JobEvents## table for job execution logs and JSON blob storage (no versioned entities). | ||
| 3 | {{/warning}} | ||
| 4 | |||
| 5 | = Current Implementation = | ||
| 6 | |||
| 7 | {{mermaid}} | ||
| 8 | |||
| 9 | erDiagram | ||
| 10 | JOBS ||--o{ JOB_EVENTS : logs | ||
| 11 | |||
| 12 | JOBS { | ||
| |
2.1 | 13 | int JobId_PK |
| |
1.1 | 14 | string Status |
| 15 | datetime CreatedAt | ||
| 16 | datetime UpdatedAt | ||
| 17 | json ResultJson | ||
| 18 | text ReportMarkdown | ||
| 19 | } | ||
| 20 | |||
| 21 | JOB_EVENTS { | ||
| |
2.1 | 22 | int Id_PK |
| 23 | int JobId_FK | ||
| |
1.1 | 24 | datetime TsUtc |
| 25 | string Level | ||
| 26 | string Message | ||
| 27 | } | ||
| 28 | |||
| 29 | {{/mermaid}} | ||
| 30 | |||
| 31 | **Current audit capabilities:** | ||
| |
2.2 | 32 | |
| |
1.1 | 33 | * Job creation and completion timestamps |
| 34 | * Job execution events (start, progress, errors) | ||
| 35 | * No entity-level versioning | ||
| 36 | * No user attribution (no user system) | ||
| 37 | |||
| 38 | = Target Architecture (Future) = | ||
| 39 | |||
| 40 | {{mermaid}} | ||
| 41 | |||
| 42 | erDiagram | ||
| 43 | USERS ||--o{ EDITS : makes | ||
| 44 | CLAIMS ||--o{ EDITS : tracks | ||
| 45 | EVIDENCE ||--o{ EDITS : tracks | ||
| 46 | SOURCES ||--o{ EDITS : tracks | ||
| 47 | KEY_FACTORS ||--o{ EDITS : tracks | ||
| 48 | |||
| 49 | USERS { | ||
| |
2.1 | 50 | uuid id_PK |
| |
1.1 | 51 | text name |
| 52 | text email | ||
| 53 | } | ||
| 54 | |||
| 55 | CLAIMS { | ||
| |
2.1 | 56 | uuid id_PK |
| |
1.1 | 57 | text text |
| 58 | } | ||
| 59 | |||
| 60 | EVIDENCE { | ||
| |
2.1 | 61 | uuid id_PK |
| 62 | uuid claim_id_FK | ||
| |
1.1 | 63 | } |
| 64 | |||
| 65 | SOURCES { | ||
| |
2.1 | 66 | uuid id_PK |
| |
1.1 | 67 | text name |
| 68 | } | ||
| 69 | |||
| 70 | KEY_FACTORS { | ||
| |
2.1 | 71 | uuid id_PK |
| 72 | uuid claim_id_FK | ||
| |
1.1 | 73 | text question |
| 74 | } | ||
| 75 | |||
| 76 | EDITS { | ||
| |
2.1 | 77 | uuid id_PK |
| |
1.1 | 78 | text entity_type |
| 79 | uuid entity_id | ||
| |
2.1 | 80 | uuid user_id_FK |
| |
1.1 | 81 | text change_type |
| 82 | boolean is_automated | ||
| 83 | jsonb changes | ||
| 84 | text reason | ||
| 85 | timestamp created_at | ||
| 86 | } | ||
| 87 | |||
| 88 | {{/mermaid}} | ||
| 89 | |||
| 90 | **Target features:** | ||
| |
2.2 | 91 | |
| |
1.1 | 92 | * Full entity versioning (Claims, Evidence, Sources, KeyFactors) |
| 93 | * User attribution for all changes | ||
| 94 | * AKEL vs human edit distinction | ||
| 95 | * Hot/cold storage tiering (PostgreSQL + S3) | ||
| 96 | |||
| |
2.2 | 97 | See [[Data Model>>Archive.FactHarbor 2026\.02\.08.Specification.Data Model.WebHome]] for complete target architecture. |