Wiki source code of Audit Trail (v2.6.33 + Target)
Version 2.1 by Robert Schaub on 2026/01/21 08:08
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:** | ||
| 32 | * Job creation and completion timestamps | ||
| 33 | * Job execution events (start, progress, errors) | ||
| 34 | * No entity-level versioning | ||
| 35 | * No user attribution (no user system) | ||
| 36 | |||
| 37 | = Target Architecture (Future) = | ||
| 38 | |||
| 39 | {{mermaid}} | ||
| 40 | |||
| 41 | erDiagram | ||
| 42 | USERS ||--o{ EDITS : makes | ||
| 43 | CLAIMS ||--o{ EDITS : tracks | ||
| 44 | EVIDENCE ||--o{ EDITS : tracks | ||
| 45 | SOURCES ||--o{ EDITS : tracks | ||
| 46 | KEY_FACTORS ||--o{ EDITS : tracks | ||
| 47 | |||
| 48 | USERS { | ||
| |
2.1 | 49 | uuid id_PK |
| |
1.1 | 50 | text name |
| 51 | text email | ||
| 52 | } | ||
| 53 | |||
| 54 | CLAIMS { | ||
| |
2.1 | 55 | uuid id_PK |
| |
1.1 | 56 | text text |
| 57 | } | ||
| 58 | |||
| 59 | EVIDENCE { | ||
| |
2.1 | 60 | uuid id_PK |
| 61 | uuid claim_id_FK | ||
| |
1.1 | 62 | } |
| 63 | |||
| 64 | SOURCES { | ||
| |
2.1 | 65 | uuid id_PK |
| |
1.1 | 66 | text name |
| 67 | } | ||
| 68 | |||
| 69 | KEY_FACTORS { | ||
| |
2.1 | 70 | uuid id_PK |
| 71 | uuid claim_id_FK | ||
| |
1.1 | 72 | text question |
| 73 | } | ||
| 74 | |||
| 75 | EDITS { | ||
| |
2.1 | 76 | uuid id_PK |
| |
1.1 | 77 | text entity_type |
| 78 | uuid entity_id | ||
| |
2.1 | 79 | uuid user_id_FK |
| |
1.1 | 80 | text change_type |
| 81 | boolean is_automated | ||
| 82 | jsonb changes | ||
| 83 | text reason | ||
| 84 | timestamp created_at | ||
| 85 | } | ||
| 86 | |||
| 87 | {{/mermaid}} | ||
| 88 | |||
| 89 | **Target features:** | ||
| 90 | * Full entity versioning (Claims, Evidence, Sources, KeyFactors) | ||
| 91 | * User attribution for all changes | ||
| 92 | * AKEL vs human edit distinction | ||
| 93 | * Hot/cold storage tiering (PostgreSQL + S3) | ||
| 94 | |||
| 95 | See [[Data Model>>FactHarbor.Specification.Data Model.WebHome]] for complete target architecture. |