Changes for page Data Model
Last modified by Robert Schaub on 2025/12/24 20:34
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,6 +1,6 @@ 1 1 = Data Model = 2 2 3 -This page describes the current data model for FactHarbor v0.9.1.3 +This page describes the current data model for FactHarbor. 4 4 5 5 == Versioning Strategy == 6 6 ... ... @@ -42,141 +42,93 @@ 42 42 * **ParentVersionID**: Link to previous version (null for first version) 43 43 * **CreatedAt**: Timestamp (ISO 8601, UTC) 44 44 * **AuthorType**: Human | AI | ExternalNode 45 -* **CreatedBy**: Foreign key to User or TechnicalUser 46 46 * **JustificationText**: Brief explanation of changes 47 -* **PublicationMode**: Mode1 (draft) | Mode2 (AI-published) | Mode3 (human-reviewed) 48 -* **ReviewStatus**: Workflow state (draft|in_review|approved|rejected) 49 -* **NodeOrigin**: Node ID where version was created (for federation) 50 50 * **SignatureHash**: Cryptographic signature (Release 1.0) 51 51 52 52 ---- 53 53 54 -== Core EntityDefinitions ==50 +== Core Data Model Refinements == 55 55 56 -=== User Entities === 57 - 58 -**USER** (base user table): 59 -* ``UserID`` (PK) 60 -* ``UserType`` (Reader|Contributor|Reviewer|Auditor|Expert|Moderator|Maintainer) 61 -* ``DisplayName`` 62 -* ``Email`` (for Contributors and above) 63 -* ``RegisteredAt`` 64 -* ``LastActive`` 65 -* ``Status`` (active|suspended|banned) 66 - 67 -**TECHNICAL_USER** (system processes): 68 -* ``SystemID`` (PK) 69 -* ``SystemName`` 70 -* ``Purpose`` (AKEL|FederationSync|BackupService|Monitor|Audit) 71 -* ``CreatedBy`` (FK to Maintainer who created this system user) 72 -* ``CreatedAt`` 73 -* ``Status`` (active|paused|deprecated) 74 -* ``ApiKey`` (encrypted) 75 -* ``Permissions`` (JSON - authorized operations) 76 - 77 -**Examples of Technical Users**: 78 -* AKEL instances (AI processing) 79 -* Federation sync bots 80 -* Scheduled audit tasks 81 -* Backup services 82 -* Monitoring systems 83 -* External API integrations 84 - 85 ----- 86 - 87 -=== Content Entities === 88 - 89 89 The system relies on the following versioned core entities: 90 90 91 -**CLAIM_CLUSTER**: 92 -* ``ClusterID`` (PK) 93 -* ``EmbeddingVectorRef`` 94 -* ``Theme`` 95 -* Groups related claims into topical clusters 96 -* One Cluster has many Claims 97 -* A Claim belongs to exactly one primary cluster 54 +* **CLAIM_CLUSTER** 55 +** ``ClusterID`` (PK), ``EmbeddingVectorRef``, ``Theme`` 56 +** Groups related claims into topical clusters. 57 +** One Cluster has many Claims. 58 +** A Claim belongs to exactly one primary cluster. 98 98 99 -**CLAIM / CLAIM_VERSION**: 100 -* ``CLAIM`` is the long-lived anchor for a real-world claim 101 -* ``CLAIM_VERSION`` is an immutable snapshot that includes: 102 - * ``VersionID`` (PK) 103 - * ``ClaimID`` (FK to CLAIM) 104 - * ``ParentVersionID`` (FK to prior version, nullable) 105 - * ``Text`` 106 - * ``Domain`` 107 - * ``ClaimType`` (literal|metaphorical|rhetorical|supernatural) 108 - * ``Evaluability`` (empirical|subjective|non-falsifiable) 109 - * ``RiskTier`` (A|B|C) - replaced SafetyCategory for consistency 110 - * ``PublicationMode`` (Mode1|Mode2|Mode3) 111 - * ``ReviewStatus`` (draft|in_review|approved|rejected) 112 - * ``CreatedAt``, ``AuthorType``, ``CreatedBy``, ``JustificationText`` 113 - * ``NodeOrigin``, ``SignatureHash`` 114 - * ``Status`` (active|superseded|merged) 60 +* **CLAIM / CLAIM_VERSION** 61 +** ``CLAIM`` is the long‑lived anchor for a real‑world claim. 62 +** ``CLAIM_VERSION`` is an immutable snapshot that includes: 63 +*** ``ClaimID`` (FK to CLAIM) 64 +*** ``VersionID`` (PK) 65 +*** ``ParentVersionID`` (FK to prior version, nullable) 66 +*** ``Text`` 67 +*** ``Domain`` 68 +*** ``ClaimType`` (literal, metaphorical, rhetorical, supernatural...) 69 +*** ``Evaluability`` (empirical, subjective, non-falsifiable) 70 +*** ``SafetyCategory`` (low, medium, high) 71 +*** ``CreatedAt``, ``AuthorType``, ``JustificationText`` 72 +*** ``Status`` (active, superseded, merged) 115 115 116 -**SCENARIO / SCENARIO_VERSION**: 117 -* ``SCENARIO`` is the anchor for a scenario across time 118 -* ``SCENARIO_VERSION`` is an immutable snapshot: 119 - * ``VersionID`` (PK) 120 - * ``ScenarioID`` (FK to SCENARIO) 121 - * ``ParentVersionID`` 122 - * ``ClaimID`` (FK to CLAIM) 123 - * ``Definitions`` (JSON) 124 - * ``Boundaries`` (JSON) 125 - * ``Assumptions`` (JSON) 126 - * ``Context`` (text) 127 - * ``EvaluationMethod`` (text) 128 - * ``PublicationMode`` (Mode1|Mode2|Mode3) 129 - * ``ReviewStatus`` (draft|in_review|approved|rejected) 130 - * ``CreatedAt``, ``AuthorType``, ``CreatedBy``, ``JustificationText`` 131 - * ``NodeOrigin``, ``SignatureHash`` 132 - * ``Status`` (active|superseded|deprecated) 74 +* **SCENARIO / SCENARIO_VERSION** 75 +** ``SCENARIO`` is the anchor for a scenario across time. 76 +** ``SCENARIO_VERSION`` is an immutable snapshot: 77 +*** ``ScenarioID`` (FK to SCENARIO) 78 +*** ``VersionID`` (PK) 79 +*** ``ParentVersionID`` 80 +*** ``ClaimID`` (FK to CLAIM) 81 +*** ``Definitions`` 82 +*** ``Boundaries`` 83 +*** ``Assumptions`` 84 +*** ``Context`` 85 +*** ``EvaluationMethod`` 86 +*** ``SafetyClass`` 87 +*** ``CreatedAt``, ``AuthorType``, ``JustificationText`` 88 +*** ``Status`` (active, superseded, deprecated) 133 133 134 -**Note**: SafetyClass removed from Scenario - risk tier is at claim level 90 +* **EVIDENCE / EVIDENCE_VERSION** 91 +** ``EVIDENCE`` is the anchor. 92 +** ``EVIDENCE_VERSION`` is the versioned snapshot: 93 +*** ``EvidenceID`` (FK to EVIDENCE) 94 +*** ``VersionID`` (PK) 95 +*** ``ParentVersionID`` 96 +*** ``Type`` (paper, dataset, report, transcript, expert...) 97 +*** ``Category`` (empirical, historical, rhetorical, dataset, meta-analysis...) 98 +*** ``Reliability`` (low/med/high) 99 +*** ``Provenance`` (URL, DOI, source metadata) 100 +*** ``ExtractionMethod`` (manual, OCR, API, AKEL) 101 +*** ``CreatedAt``, ``AuthorType``, ``JustificationText`` 102 +*** ``Status`` (verified, updated, disputed, retracted, superseded) 135 135 136 -**EVIDENCE / EVIDENCE_VERSION**: 137 -* ``EVIDENCE`` is the anchor 138 -* ``EVIDENCE_VERSION`` is the versioned snapshot: 139 - * ``VersionID`` (PK) 140 - * ``EvidenceID`` (FK to EVIDENCE) 141 - * ``ParentVersionID`` 142 - * ``Type`` (paper|dataset|report|transcript|expert|media) 143 - * ``Category`` (empirical|historical|rhetorical|dataset|meta-analysis) 144 - * ``Reliability`` (low|medium|high) 145 - * ``Provenance`` (URL, DOI, source metadata) 146 - * ``ExtractionMethod`` (manual|OCR|API|AKEL) 147 - * ``ContentHash`` (SHA256 of evidence content) 148 - * ``PublicationMode`` (Mode1|Mode2|Mode3) 149 - * ``ReviewStatus`` (draft|verified|disputed|retracted) 150 - * ``CreatedAt``, ``AuthorType``, ``CreatedBy``, ``JustificationText`` 151 - * ``NodeOrigin``, ``SignatureHash`` 152 - * ``Status`` (active|superseded) 104 +* **VERDICT / VERDICT_VERSION** 105 +** ``VERDICT`` is the anchor. 106 +** ``VERDICT_VERSION`` is the snapshot: 107 +*** ``VerdictID`` (FK to VERDICT) 108 +*** ``VersionID`` (PK) 109 +*** ``ParentVersionID`` 110 +*** ``ClaimID`` (FK to CLAIM) 111 +*** ``ScenarioID`` (FK to SCENARIO) 112 +*** ``EvidenceVersionSet`` (list of evidence version IDs used) 113 +*** ``LikelihoodRange`` (0–1, with uncertainty bounds) 114 +*** ``ExplanationChain`` 115 +*** ``UncertaintyFactors`` 116 +*** ``CreatedAt``, ``AuthorType``, ``JustificationText`` 117 +*** ``Status`` (current, outdated, superseded, retracted) 153 153 154 -**VERDICT / VERDICT_VERSION**: 155 -* ``VERDICT`` is the anchor 156 -* ``VERDICT_VERSION`` is the snapshot: 157 - * ``VersionID`` (PK) 158 - * ``VerdictID`` (FK to VERDICT) 159 - * ``ParentVersionID`` 160 - * ``ClaimID`` (FK to CLAIM) 161 - * ``ScenarioVersionID`` (FK to specific SCENARIO_VERSION) 162 - * ``EvidenceVersionSet`` (JSON array of Evidence VersionIDs used) 163 - * ``LikelihoodRange`` (0–1, with uncertainty bounds) 164 - * ``ExplanationChain`` (JSON) 165 - * ``UncertaintyFactors`` (JSON) 166 - * ``PublicationMode`` (Mode1|Mode2|Mode3) 167 - * ``ReviewStatus`` (draft|in_review|approved|retracted) 168 - * ``CreatedAt``, ``AuthorType``, ``CreatedBy``, ``JustificationText`` 169 - * ``NodeOrigin``, ``SignatureHash`` 170 - * ``Status`` (current|outdated|superseded|retracted) 171 - 172 172 ---- 173 173 174 174 == Many-to-Many Linking Tables == 175 175 176 -**ScenarioEvidenceLink**: 177 -* Links scenario versions to evidence versions with relevance scoring 178 -* ``ScenarioID``, ``ScenarioVersionID`` 179 -* ``EvidenceID``, ``EvidenceVersionID`` 123 +=== ScenarioEvidenceLink === 124 + 125 +Links scenario versions to evidence versions with relevance scoring. 126 + 127 +**Fields**: 128 +* ``ScenarioID`` 129 +* ``ScenarioVersionID`` 130 +* ``EvidenceID`` 131 +* ``EvidenceVersionID`` 180 180 * ``RelevanceScore`` (0–1) - How relevant this evidence is to this scenario 181 181 * ``LinkJustification`` - Brief explanation of relevance 182 182 ... ... @@ -186,34 +186,22 @@ 186 186 * Relevance scoring helps prioritize evidence 187 187 * Version-specific linking preserves historical accuracy 188 188 189 -**ClaimCluster**: 190 -* Semantic clustering of similar claims 141 +=== ClaimCluster === 142 + 143 +Semantic clustering of similar claims. 144 + 145 +**Fields**: 191 191 * ``ClusterID`` (PK) 192 192 * ``EmbeddingVector`` - Vector representation for semantic search 193 193 * ``MemberList`` - List of ClaimIDs in this cluster 194 194 * ``Theme`` - Human-readable theme description 195 195 196 ----- 151 +**Purpose**: 152 +* Groups semantically similar claims 153 +* Enables efficient search and discovery 154 +* Supports cross-node claim alignment 155 +* Reduces duplication 197 197 198 -== Key Changes in v0.9.1 == 199 - 200 -**Updated Field Names**: 201 -* `SafetyCategory` → `RiskTier` (consistency with risk tier system A/B/C) 202 -* `SafetyClass` removed from Scenario (redundant with claim-level RiskTier) 203 - 204 -**Added Fields to All Version Entities**: 205 -* `PublicationMode` - Track Mode 1/2/3 status 206 -* `ReviewStatus` - Track workflow state 207 -* `NodeOrigin` - Federation provenance 208 -* `CreatedBy` - FK to User/TechnicalUser (clarified) 209 - 210 -**New Entity**: 211 -* `TECHNICAL_USER` - Separate system processes from human users 212 - 213 -**Clarifications**: 214 -* `ScenarioVersionID` in Verdict (not just ScenarioID) - links to specific version 215 -* `ContentHash` in Evidence - SHA256 for integrity checking 216 - 217 217 ---- 218 218 219 219 == Data Model Behavior == ... ... @@ -221,6 +221,7 @@ 221 221 === Late-Arriving Evidence === 222 222 223 223 When new evidence versions appear: 164 + 224 224 1. Existing verdicts marked as **outdated** 225 225 2. Scenario relevance must be re-evaluated 226 226 3. Re-evaluation engine triggers verdict recomputation ... ... @@ -227,43 +227,97 @@ 227 227 4. New verdict versions created 228 228 5. Users notified of updates 229 229 171 +**Process**: 172 +* New EvidenceVersion imported 173 +* System scans related ScenarioEvidenceLinks 174 +* Checks if evidence affects existing verdicts 175 +* Queues affected verdicts for re-evaluation 176 +* AKEL or reviewer creates new VerdictVersion 177 +* Old verdicts remain accessible (historical record) 178 + 230 230 === Scenario Evolution === 231 231 232 232 When a scenario's assumptions or definitions change: 233 -* Creates new scenario version (not in-place update) 182 + 183 +**Creates new scenario version** (not in-place update): 184 +* New ScenarioVersion with updated fields 185 +* ParentVersionID points to previous version 234 234 * All dependent verdicts must be recalculated 235 235 * Previous scenario versions remain accessible 236 -* Version lineage preserved 237 237 189 +**Triggers**: 190 +* Refined definitions 191 +* Changed assumptions 192 +* Expanded or narrowed boundaries 193 +* Updated evaluation methods 194 +* Safety classification changes 195 + 196 +**Impact**: 197 +* Verdicts based on old scenario version remain valid (historical) 198 +* New verdicts required for new scenario version 199 +* Users can compare old vs new scenarios 200 +* Evidence links may need re-assessment 201 + 238 238 === Federated Nodes === 239 239 240 240 Each node may share partial data: 241 -* Claims and scenarios shared if relevant 242 -* Evidence metadata shared, not always full files 243 -* Version synchronization via NodeOrigin tracking 244 -* Branching allowed for divergent interpretations 245 245 246 - ----206 +**Claims and scenarios**: Shared if relevant to node's domain 247 247 248 - == VisualDiagrams==208 +**Evidence metadata**: Shared, but not always full evidence files 249 249 250 - Thefollowing diagrams providevisualrepresentationsof thedatamodel structure andrelationships.210 +**Verdict lineage**: Shared only if not locally overridden 251 251 252 -=== Core Data Model ERD === 212 +**Version synchronization**: 213 +* Remote versions imported with provenance metadata 214 +* Conflicts detected via ParentVersionID comparison 215 +* Branching allowed for divergent interpretations 216 +* Local node retains authority over local versions 253 253 254 -{{include reference="Test.FactHarborV09.Specification.Diagrams.Core Data Model ERD.WebHome"/}} 218 +**Trust and acceptance**: 219 +* Trusted nodes: auto-import versions 220 +* Neutral nodes: import but flag for review 221 +* Untrusted nodes: manual import only 255 255 256 - === User Roles Structure ===223 +---- 257 257 258 - {{includereference="Test.FactHarborV09.Specification.Diagrams.UserRolesERD.WebHome"/}}225 +== Entity-Relationship Overview == 259 259 260 - ===ContentWorkflow ===227 +**Core relationships**: 261 261 262 -{{include reference="Test.FactHarborV09.Specification.Diagrams.Content Workflow ERD.WebHome"/}} 229 +``` 230 +CLAIM_CLUSTER (1) ──< (N) CLAIM 231 +CLAIM (1) ──< (N) CLAIM_VERSION 232 +CLAIM (1) ──< (N) SCENARIO 233 +SCENARIO (1) ──< (N) SCENARIO_VERSION 234 +SCENARIO_VERSION (N) ──< (N) EVIDENCE_VERSION [via ScenarioEvidenceLink] 235 +SCENARIO_VERSION (1) ──< (N) VERDICT_VERSION 236 +VERDICT_VERSION references specific EvidenceVersionSet 237 +``` 263 263 239 +**Version chains**: 240 + 241 +Each entity has a version DAG: 242 +``` 243 +Version 1 (ParentVersionID=null) 244 + ↓ 245 +Version 2 (ParentVersionID=1) 246 + ↓ 247 +Version 3 (ParentVersionID=2) 248 +``` 249 + 250 +In federated environments, branching may occur: 251 +``` 252 +Version 1 253 + ↓ 254 +Version 2 255 + / ↓ ↓ 256 +V3a V3b (parallel branches from different nodes) 257 +``` 258 + 264 264 ---- 265 265 266 - ==Related Pages ==261 +## Related Pages == 267 267 268 268 * [[Federation & Decentralization>>FactHarbor.Specification.Federation & Decentralization.WebHome]] 269 269 * [[AKEL (AI Knowledge Extraction Layer)>>FactHarbor.Specification.AI Knowledge Extraction Layer (AKEL).WebHome]]