Wiki source code of Versioning Architecture Mermaid
Last modified by Robert Schaub on 2025/12/23 18:01
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{mermaid}} | ||
| 2 | graph LR | ||
| 3 | V1[Version 1] -->|Edit| V2[Version 2] | ||
| 4 | V2 -->|Edit| V3[Version 3] | ||
| 5 | V3 -->|Edit| VN[Version N] | ||
| 6 | V2 --> EDIT1[Edit Record] | ||
| 7 | V3 --> EDIT2[Edit Record] | ||
| 8 | VN --> EDITN[Edit Record] | ||
| 9 | EDIT1 -->|Stores| BEFORE[Before State] | ||
| 10 | EDIT1 -->|Stores| AFTER[After State] | ||
| 11 | EDIT1 -->|Stores| WHO[Who + Why] | ||
| 12 | REVERT[Revert to V2] -.->|Creates| VN1[New Version = V2] | ||
| 13 | style VN fill:#99ff99 | ||
| 14 | style REVERT fill:#ffff99 | ||
| 15 | {{/mermaid}} | ||
| 16 | |||
| 17 | == Explanation == | ||
| 18 | **Linear Versioning Only**: | ||
| 19 | * Each edit creates a new version (V1 → V2 → V3 → ... → VN) | ||
| 20 | * No branching, no parallel versions | ||
| 21 | * Simple sequential numbering | ||
| 22 | **Edit Records**: | ||
| 23 | * Every version change stored in EDIT table | ||
| 24 | * Contains: before_state (JSON), after_state (JSON), user_id, reason, timestamp | ||
| 25 | * Full audit trail preserved forever | ||
| 26 | **Revert Mechanism**: | ||
| 27 | * "Revert to V2" doesn't delete V3-VN | ||
| 28 | * Instead, creates new version VN+1 with V2's content | ||
| 29 | * History never deleted, only moved forward | ||
| 30 | **What Gets Versioned**: | ||
| 31 | * Claims: assertion text, domain, status, scores | ||
| 32 | * Evidence: excerpt, relevance, support type | ||
| 33 | * Scenarios: description, assumptions, confidence | ||
| 34 | **Not Versioned** (current state only): | ||
| 35 | * Source track records (continuously updated) | ||
| 36 | * Quality metrics (time-series data) | ||
| 37 | * User reputation (accumulated score) | ||
| 38 | **Access**: | ||
| 39 | * Current version: Default view | ||
| 40 | * Version history: Click "History" tab | ||
| 41 | * Diff between versions: Compare any two versions | ||
| 42 | * Revert: Select version → "Revert to this version" → Creates new version | ||
| 43 | **Storage**: | ||
| 44 | * Current state: In entity table (CLAIM, EVIDENCE, SCENARIO) | ||
| 45 | * Historical states: In EDIT table (before_state, after_state JSON) | ||
| 46 | * Hot storage: Last 3 months of edits | ||
| 47 | * Cold storage: Older edits archived to S3 |