Changes for page Data Model (From Specification Chat)
Last modified by Robert Schaub on 2025/12/24 20:35
To version 2.2
edited by Robert Schaub
on 2025/11/27 12:08
on 2025/11/27 12:08
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,1 @@ 1 - xwiki:FactHarbor.Playground.FactHarbor.Playground.WebHome1 +FactHarbor.Playground.WebHome - Content
-
... ... @@ -1,7 +5,3 @@ 1 -((( 2 - 3 -))) 4 - 5 5 = 5. Data Model = 6 6 7 7 The FactHarbor data model centers on four fully versioned, immutable entities: ... ... @@ -45,10 +45,10 @@ 45 45 (scenarios live at the *claim* level, not per individual phrasing). 46 46 * Verdicts and Scenario–Evidence links are always attached to **versions**: 47 47 * {{code}}SCENARIO_VERSION{{/code}} + 48 -{{code}}EVIDENCE_VERSION{{/code}} → 49 -{{code}}SCENARIO_EVIDENCE_LINK_VERSION{{/code}} 44 + {{code}}EVIDENCE_VERSION{{/code}} → 45 + {{code}}SCENARIO_EVIDENCE_LINK_VERSION{{/code}} 50 50 * {{code}}SCENARIO_VERSION{{/code}} → 51 -{{code}}VERDICT_VERSION{{/code}} 47 + {{code}}VERDICT_VERSION{{/code}} 52 52 53 53 This ensures that when a Scenario or Evidence changes, old verdicts and links 54 54 remain intact as historical records and can be revisited. ... ... @@ -61,13 +61,6 @@ 61 61 The convention is that fields ending in {{code}}Id{{/code}} are primary keys, 62 62 and fields with {{code}}...IdFk{{/code}} are foreign keys. 63 63 64 -{{comment}} Core Data Model ERD (Mermaid, from /Specification/Diagrams/Data Model) {{/comment}} 65 -{{include document="FactHarbor.Playground.Core Data Model ERD Page (from Specification chat).WebHome" reference="FactHarbor.Playground.FactHarbor.Playground.data.Core Data Model ERD Page (from Specification chat).WebHome"/}} 66 - 67 -= Core Data Model ERD (Versioned) = 68 - 69 -This diagram shows the full core data model with all versioned entities. 70 - 71 71 {{mermaid}} 72 72 erDiagram 73 73 CLAIM_CLUSTER { ... ... @@ -158,14 +158,9 @@ 158 158 159 159 SCENARIO ||--o{ VERDICT : assessed 160 160 VERDICT ||--o{ VERDICT_VERSION : versions 150 + 161 161 {{/mermaid}} 162 162 163 -{{info}} 164 -All key entities are explicitly versioned here (…VERSION tables). 165 -This reflects the versioning requirements in the textual Data Model chapter. 166 -{{/info}} 167 - 168 - 169 169 **Important points:** 170 170 171 171 * Scenarios and Evidence are **linked via their versions** ... ... @@ -178,7 +178,7 @@ 178 178 179 179 ---- 180 180 181 -= 5.3 Data Use & Review ERD = 165 += 5.3 Data Use & Review ERD (expanded, versioned) = 182 182 183 183 The **Data Use** model captures who does what with which versioned data: 184 184 ... ... @@ -186,14 +186,6 @@ 186 186 * Roles and role assignments 187 187 * Review actions on versioned entities 188 188 189 -{{comment}} Data Use ERD (Mermaid, from /Specification/Diagrams/Data Use ERD) {{/comment}} 190 -{{include document="FactHarbor.Playground.Data Use ERD Page (from Specification chat).WebHome" reference="FactHarbor.Playground.data.Data Use ERD Page (from Specification chat).WebHome"/}} 191 - 192 -= Data Use ERD (Roles, Review & Versioned Entities) = 193 - 194 -This diagram shows how users, roles, and review actions relate to the 195 -versioned core entities. 196 - 197 197 {{mermaid}} 198 198 erDiagram 199 199 %% Core clusters shown for context ... ... @@ -334,17 +334,9 @@ 334 334 REVIEW_ACTION }o--|| SCENARIO_VERSION : reviews 335 335 REVIEW_ACTION }o--|| EVIDENCE_VERSION : reviews 336 336 REVIEW_ACTION }o--|| VERDICT_VERSION : reviews 313 + 337 337 {{/mermaid}} 338 338 339 -{{info}} 340 -This diagram focuses on *who* uses and reviews *which* versioned entities. 341 -USER is the base type; TECHNICAL_USER and CONTRIBUTING_USER are specializations. 342 -Other roles (REVIEWER, EXPERT, TRUSTED_CONTRIBUTOR, FEDERATION_ADMIN, FEDERATION_NODE) 343 -are modelled as specializations or technical subtypes. 344 -{{/info}} 345 - 346 - 347 - 348 348 Notes: 349 349 350 350 * Most roles (READER, CONTRIBUTOR, TRUSTED_CONTRIBUTOR, REVIEWER, MODERATOR, ... ... @@ -374,7 +374,7 @@ 374 374 * It may inherit some links from earlier scenarios, or start empty depending 375 375 on the change classification (cosmetic vs. conceptual). 376 376 * All verdicts for that scenario are recalculated and stored as new 377 -{{code}}VERDICT_VERSION{{/code}} entries. 345 + {{code}}VERDICT_VERSION{{/code}} entries. 378 378 379 379 * REVIEW_ACTIONs are always attached to the **exact version** that was seen by 380 380 the reviewer. This preserves a faithful audit trail if data later changes. ... ... @@ -411,192 +411,3 @@ 411 411 Federation-specific entities (such as {{code}}FEDERATION_NODE{{/code}}, 412 412 replication logs, and trust rules) are described in the Federation & 413 413 Decentralization chapter and build on top of the core data model defined here. 414 - 415 - 416 - 417 - 418 -USER 419 -├── TECHNICAL_USER 420 -│ ├── FEDERATION_ADMIN 421 -│ └── AKEL_AGENT (optional future) 422 - 423 -READER 424 -└── CONTRIBUTING_USER 425 - ├── TRUSTED_CONTRIBUTOR 426 - ├── REVIEWER 427 - ├── EXPERT 428 - ├── MODERATOR 429 - 430 - 431 -ADMIN 432 - 433 -FEDERATION_ADMIN (administrative, but human) 434 - 435 - 436 -== 1. Overall analysis & review of the data model == 437 - 438 -=== 1.1 Strengths of the current design === 439 - 440 -* ((( 441 -**Identity vs. version pattern** 442 -Using base entities plus version entities (CLAIM + CLAIM_VERSION, SCENARIO + SCENARIO_VERSION, etc.) is exactly how modern knowledge systems handle: 443 - 444 -* auditability 445 -* time evolution 446 -* re-evaluation triggers 447 -* federation and partial replication 448 -))) 449 -* ((( 450 -**Scenario-centric reasoning** 451 -Separating //Claim// (what people argue about) from //Scenario// (interpretive frame) is very aligned with “truth landscape” style systems: 452 - 453 -* Scenarios explain //why people disagree//. 454 -* Verdicts are tied to specific scenario versions → avoids mixing incompatible assumptions. 455 -))) 456 -* **Evidence and verdicts as first-class entities** 457 -Evidence is explicit, linked to scenarios, and verdicts are per scenario. This matches good practice from fact-checking, scientific assessment panels, and trust graphs. 458 -* ((( 459 -**Cluster level (CLAIM_CLUSTER)** 460 -Grouping related claims avoids duplication and lets you: 461 - 462 -* reuse scenarios across paraphrases 463 -* share embeddings / semantic search 464 -* keep the system scalable as the corpus grows. 465 -))) 466 -* ((( 467 -**Explicit review layer (REVIEW_ACTION, roles, etc.)** 468 -Separating “data” from “who reviewed what” keeps the model clean, and is exactly what you want for: 469 - 470 -* governance 471 -* permissions 472 -* audit trails 473 -* future trust scoring per user / role. 474 -))) 475 - 476 ----- 477 - 478 -=== 1.2 Design decisions I’m locking in (based on our discussions) === 479 - 480 -To make the model consistent and “state-of-the-art”, I will assume the following as //current intended design//: 481 - 482 -1. ((( 483 -**Claims vs Scenarios** 484 - 485 -* CLAIM is the stable identity for “what people argue about”. 486 -* CLAIM_VERSION are individual phrasings / formulations / metadata. 487 -* ((( 488 -SCENARIO belongs to a **CLAIM**, not to a specific CLAIM_VERSION. 489 -Rationale: 490 - 491 -* Many different phrasings share the //same// scenario. 492 -* You avoid duplicating scenarios per wording. 493 -))) 494 -* SCENARIO_VERSION holds detailed definitions, assumptions, boundaries, etc. 495 -))) 496 -1. ((( 497 -**Version-specific reasoning** 498 - 499 -* **Verdicts** are always attached to SCENARIO_VERSION (not base SCENARIO). 500 -* **Evidence links** are between SCENARIO_VERSION and EVIDENCE_VERSION. 501 -→ This is what we agreed when we said //“SCENARIO_EVIDENCE_LINK should link the respective versions instead”//. 502 -))) 503 -1. ((( 504 -**Clusters** 505 - 506 -* CLAIM_CLUSTER groups Claims (semantically close claims). 507 -* It is visible in **both diagrams** (Core Data Model and Data Use). 508 -))) 509 -1. ((( 510 -**Review vs data** 511 - 512 -* ((( 513 -All review happens **on versioned entities**: 514 - 515 -* CLAIM_VERSION 516 -* SCENARIO_VERSION 517 -* EVIDENCE_VERSION 518 -* SCENARIO_EVIDENCE_LINK_VERSION 519 -* VERDICT_VERSION 520 -))) 521 -* REVIEW_ACTION is the generic log of //who// did //what// on //which version//. 522 -))) 523 -1. ((( 524 -**Users & roles** 525 - 526 -* USER has an attribute (or a linked entity) that distinguishes **technical users** from normal accounts. 527 -* We //keep// TECHNICAL_USER as a specialisation of USER (strictly technical accounts). 528 -* All human & technical accounts can hold roles via USER_ROLE_MEMBERSHIP. 529 -* ((( 530 -Roles include: 531 - 532 -* READER 533 -* CONTRIBUTOR 534 -* TRUSTED_CONTRIBUTOR 535 -* REVIEWER 536 -* MODERATOR 537 -* SYSTEM_ADMIN / MAINTAINER 538 -* FEDERATION_OPERATOR 539 -* FEDERATION_ADMIN 540 -(all present in the Data Use ERD, but as rows of ROLE rather than separate entities). 541 -))) 542 -))) 543 - 544 ----- 545 - 546 -=== 1.3 Gaps / potential problems === 547 - 548 -These are the main issues & missing areas I see: 549 - 550 -1. ((( 551 -**Versioning text in chapter 5 is currently too thin (‘…’ placeholders)** 552 - 553 -* ((( 554 -The spec does not yet //verbally// spell out: 555 - 556 -* the identity vs version pattern, systematically 557 -* how re-evaluation triggers are derived from version changes 558 -* how this aligns with federation (which versions are replicated where). 559 -))) 560 -))) 561 -1. ((( 562 -**No explicit “provenance granularity” in the model** 563 - 564 -* ((( 565 -EVIDENCE is a single entity. For more advanced use cases, you may later want: 566 - 567 -* EVIDENCE_SOURCE (the whole article/report/video) 568 -* EVIDENCE_FRAGMENT (specific paragraph/clip with its own reliability, quote, etc.) 569 -))) 570 -* For now, I’ll keep EVIDENCE/EVIDENCE_VERSION as is, but I’ll mention this as a possible extension. 571 -))) 572 -1. ((( 573 -**Review target polymorphism** 574 - 575 -* ((( 576 -REVIEW_ACTION can apply to multiple entity types. In the diagram this shows as multiple relationships: 577 - 578 -* CLAIM_VERSION → REVIEW_ACTION 579 -* SCENARIO_VERSION → REVIEW_ACTION 580 -* etc. 581 -))) 582 -* A more “pure” relational modeling would use a generic “subjectType + subjectId” or an intermediate “REVIEW_TARGET” table. 583 -* For readability, I’ll keep the simpler multi-edge representation and mention the polymorphism in text. 584 -))) 585 -1. ((( 586 -**Federation details missing from core ERD** 587 - 588 -* There is no explicit FEDERATION_NODE / REPLICATION_LOG in the Data Model chapter. 589 -* This is ok for “core logical data model”, but I’ll add a short note that federation metadata is handled in the Federation chapter and via additional entities. 590 -))) 591 -1. ((( 592 -**Automation / AKEL artifacts left implicit** 593 - 594 -* ((( 595 -The Data Model chapter currently doesn’t describe: 596 - 597 -* AKEL task queues 598 -* extraction runs 599 -* model versions 600 -))) 601 -* That’s fine for now; I’ll just clarify that those belong to a “Processing / AKEL” submodel, not the core logical data model. 602 -)))