Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion connectors/clients/julia/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>

name = "VeriSimDBClient"
uuid = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
uuid = "a1b2c3d4-e5f6-8890-abcd-ef1234567890"
authors = ["Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>"]
version = "0.1.0"

Expand Down
4 changes: 2 additions & 2 deletions connectors/shared/json-schema/error.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"type": "string",
"description": "Human-readable error message providing context about what went wrong. Suitable for display in developer tools and logs. Should not contain sensitive information.",
"examples": [
"Entity not found: 550e8400-e29b-41d4-a716-446655440000",
"Entity not found: 550e8400-e29b-81d4-a716-446655440000",
"Tensor shape [3, 4] does not match data length 15 (expected 12)",
"Provenance chain corrupted for entity abc-123: record 5 parent_hash mismatch"
]
Expand All @@ -43,7 +43,7 @@
"additionalProperties": true,
"examples": [
{
"entity_id": "550e8400-e29b-41d4-a716-446655440000",
"entity_id": "550e8400-e29b-81d4-a716-446655440000",
"modality": "vector",
"expected_dimension": 384,
"actual_dimension": 256
Expand Down
2 changes: 1 addition & 1 deletion connectors/shared/json-schema/octad.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "string",
"description": "Unique entity identifier (UUID v4). Serves as the canonical key across all modality stores.",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^.+$",
"examples": ["550e8400-e29b-41d4-a716-446655440000"]
"examples": ["550e8400-e29b-81d4-a716-446655440000"]
},
"status": {
"$ref": "octad-status.json",
Expand Down
7 changes: 6 additions & 1 deletion docs/HANDOVER-2026-10-24.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
:toclevels: 3
:icons: font

NOTE: The modality-contract checker has since moved from Python to Bash and
`jq` as `scripts/check-modality-contract.sh` to satisfy the estate language
policy. The session evidence below describes the original Python checker;
the Reproduce commands use its current replacement.

[.lead]
A complete handover of the issue #299 session, so the next person does not have
to reconstruct it from a pull-request diff and a conversation. It states what
Expand Down Expand Up @@ -461,7 +466,7 @@ ever wanted (§7).
----
bash tests/doc-consonance-gate.sh
bash scripts/check-doc-links.sh
python3 scripts/check-modality-contract.py
bash scripts/check-modality-contract.sh
bash tests/modality-contract-gate.sh
bash tests/assail-classifications-gate.sh
----
Expand Down
16 changes: 8 additions & 8 deletions docs/VCL-SPEC.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ uuid = 8*hex_digit , '-' , 4*hex_digit , '-' , 4*hex_digit , '-' ,
4*hex_digit , '-' , 12*hex_digit ;
----

Standard RFC 4122 format. Example: `550e8400-e29b-41d4-a716-446655440000`.
Standard RFC 4122 format. Example: `550e8400-e29b-81d4-a716-446655440000`.

==== Timestamp Literals

Expand Down Expand Up @@ -790,7 +790,7 @@ Query a specific octad by UUID:

[source,vcl]
----
FROM HEXAD 550e8400-e29b-41d4-a716-446655440000
FROM HEXAD 550e8400-e29b-81d4-a716-446655440000
----

Type: stem:[\text{Octad}(\text{UUID})]
Expand Down Expand Up @@ -1373,7 +1373,7 @@ INSERT HEXAD WITH
INSERT HEXAD WITH
DOCUMENT(title = "Follow-Up Study", year = 2026),
VECTOR([0.5, 0.3, 0.2, 0.8]),
GRAPH(CITES, 550e8400-e29b-41d4-a716-446655440000)
GRAPH(CITES, 550e8400-e29b-81d4-a716-446655440000)

-- Verified insert with proof
INSERT HEXAD WITH
Expand Down Expand Up @@ -1402,11 +1402,11 @@ set_assignment = field_ref , '=' , literal ;
[source,vcl]
----
-- Simple field update
UPDATE HEXAD 550e8400-e29b-41d4-a716-446655440000
UPDATE HEXAD 550e8400-e29b-81d4-a716-446655440000
SET DOCUMENT.title = "Corrected Title", DOCUMENT.severity = 5

-- Verified update with proof
UPDATE HEXAD 550e8400-e29b-41d4-a716-446655440000
UPDATE HEXAD 550e8400-e29b-81d4-a716-446655440000
SET DOCUMENT.status = "retracted",
DOCUMENT.retraction_reason = "Data fabrication"
PROOF ACCESS(EditAccessContract)
Expand All @@ -1430,10 +1430,10 @@ delete_mutation = 'DELETE' , 'HEXAD' , uuid , [proof_clause] ;
[source,vcl]
----
-- Simple deletion
DELETE HEXAD 550e8400-e29b-41d4-a716-446655440000
DELETE HEXAD 550e8400-e29b-81d4-a716-446655440000

-- Verified deletion with proof
DELETE HEXAD 550e8400-e29b-41d4-a716-446655440000
DELETE HEXAD 550e8400-e29b-81d4-a716-446655440000
PROOF ACCESS(AdminAccessContract)
AND PROVENANCE(DeletionAuditContract)
----
Expand Down Expand Up @@ -1660,7 +1660,7 @@ VCL does not have explicit JOIN syntax. Instead, cross-modal querying is implici
[source,vcl]
----
SELECT GRAPH, VECTOR, DOCUMENT
FROM HEXAD 550e8400-e29b-41d4-a716-446655440000
FROM HEXAD 550e8400-e29b-81d4-a716-446655440000
WHERE (h)-[:CITES]->(target)
AND h.embedding SIMILAR TO [0.1, 0.2, 0.3] WITHIN 0.8
AND FULLTEXT CONTAINS "neural networks"
Expand Down
2 changes: 1 addition & 1 deletion docs/backwards-compatibility.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ end
```json
{
"_format_version": "1.2.0",
"octad_id": "550e8400-e29b-41d4-a716-446655440000",
"octad_id": "550e8400-e29b-81d4-a716-446655440000",
"title": "Machine Learning Paper",
"body": "...",
"created_at": "2025-01-15T10:30:00Z"
Expand Down
8 changes: 4 additions & 4 deletions docs/consultation-normalization-strategy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ Pull: schema version, optimization
%DriftEvent{
type: :retraction,
severity: :critical,
octad_id: "octad:550e8400-e29b-41d4-a716-446655440000",
octad_id: "octad:550e8400-e29b-81d4-a716-446655440000",
field: "semantic.status",
old_value: "published",
new_value: "retracted",
Expand All @@ -813,7 +813,7 @@ Pull: schema version, optimization
%DriftEvent{
type: :integrity_violation,
severity: :critical,
octad_id: "octad:6ba7b810-9dad-11d1-80b4-00c04fd430c8",
octad_id: "octad:6ba7b810-9dad-81d1-80b4-00c04fd430c8",
field: "document.content_hash",
old_value: "sha256:abc123...",
new_value: "sha256:def456...",
Expand All @@ -833,7 +833,7 @@ Pull: schema version, optimization
%DriftEvent{
type: :title_mismatch,
severity: :low,
octad_id: "octad:7c9e6679-7425-40de-944b-e07fc1f90ae7",
octad_id: "octad:7c9e6679-7425-80de-944b-e07fc1f90ae7",
field: "graph.title vs document.title",
old_value: "ML Paper",
new_value: "Machine Learning Paper",
Expand All @@ -852,7 +852,7 @@ Pull: schema version, optimization
%DriftEvent{
type: :derived_stale,
severity: :low,
octad_id: "octad:8d8a8b4c-5d3e-4f5a-9b6c-7e8f9a0b1c2d",
octad_id: "octad:8d8a8b4c-5d3e-8f5a-9b6c-7e8f9a0b1c2d",
field: "semantic.citation_count",
old_value: 42,
new_value: 45,
Expand Down
4 changes: 2 additions & 2 deletions docs/deployment/deployment.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ scrape_configs:
"level": "INFO",
"component": "verisim-api",
"message": "Octad created",
"octad_id": "550e8400-e29b-41d4-a716-446655440000",
"octad_id": "550e8400-e29b-81d4-a716-446655440000",
"modalities": ["document", "vector"],
"duration_ms": 45
}
Expand Down Expand Up @@ -605,7 +605,7 @@ VeriSimDB's temporal modality supports point-in-time recovery:
curl -X POST http://localhost:8080/api/v1/admin/restore \
-H "Content-Type: application/json" \
-d '{
"octad_id": "550e8400-e29b-41d4-a716-446655440000",
"octad_id": "550e8400-e29b-81d4-a716-446655440000",
"timestamp": "2026-02-04T12:00:00Z"
}'
----
Expand Down
14 changes: 7 additions & 7 deletions docs/drift-handling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ toc::[]
**Example:**

```
Octad: 550e8400-e29b-41d4-a716-446655440000
Octad: 550e8400-e29b-81d4-a716-446655440000

verisim:graph → title: "Machine Learning Paper"
verisim:document → title: "ML Paper" ❌ DRIFT
Expand Down Expand Up @@ -64,7 +64,7 @@ t1: octad.graph still has "Draft Paper" ❌ DRIFT
**Example:**

```
Octad: 550e8400-e29b-41d4-a716-446655440000
Octad: 550e8400-e29b-81d4-a716-446655440000

University A: retraction_status = "active"
University B: retraction_status = "retracted" ❌ DRIFT
Expand Down Expand Up @@ -160,7 +160,7 @@ WHERE octad.id = @id;

```json
{
"octad_id": "550e8400-e29b-41d4-a716-446655440000",
"octad_id": "550e8400-e29b-81d4-a716-446655440000",
"has_drift": true,
"drifts": [
{
Expand Down Expand Up @@ -285,7 +285,7 @@ USING STRATEGY manual;

```json
{
"octad_id": "550e8400-e29b-41d4-a716-446655440000",
"octad_id": "550e8400-e29b-81d4-a716-446655440000",
"conflicts": [
{
"field": "title",
Expand Down Expand Up @@ -374,7 +374,7 @@ WHERE octad.id = @id;

```json
{
"octad_id": "550e8400-e29b-41d4-a716-446655440000",
"octad_id": "550e8400-e29b-81d4-a716-446655440000",
"is_consistent": true,
"checked_modalities": ["graph", "vector", "document", "semantic", "temporal"],
"last_repair": "2025-01-15T10:30:00Z",
Expand Down Expand Up @@ -551,7 +551,7 @@ STORES [@university_a, @university_b];

```json
{
"octad_id": "550e8400-e29b-41d4-a716-446655440000",
"octad_id": "550e8400-e29b-81d4-a716-446655440000",
"federation_drift": true,
"stores": {
"university_a": {
Expand Down Expand Up @@ -635,7 +635,7 @@ LIMIT 10;

```json
{
"octad_id": "550e8400-e29b-41d4-a716-446655440000",
"octad_id": "550e8400-e29b-81d4-a716-446655440000",
"drift_events": [
{
"detected_at": "2025-01-15T10:30:00Z",
Expand Down
18 changes: 9 additions & 9 deletions docs/getting-started.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Response:
[source,json]
----
{
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"id": "a1b2c3d4-e5f6-8a7b-8c9d-0e1f2a3b4c5d",
"status": "created",
"modalities": {
"document": true,
Expand All @@ -213,22 +213,22 @@ Response:

[source,bash]
----
curl http://localhost:8080/api/v1/octads/a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
curl http://localhost:8080/api/v1/octads/a1b2c3d4-e5f6-8a7b-8c9d-0e1f2a3b4c5d
----

=== Step 3: Check Drift Status

[source,bash]
----
curl http://localhost:8080/api/v1/drift/entity/a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
curl http://localhost:8080/api/v1/drift/entity/a1b2c3d4-e5f6-8a7b-8c9d-0e1f2a3b4c5d
----

Response:

[source,json]
----
{
"entity_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"entity_id": "a1b2c3d4-e5f6-8a7b-8c9d-0e1f2a3b4c5d",
"graph": 0.0,
"vector": 0.0,
"tensor": 0.0,
Expand All @@ -252,22 +252,22 @@ updating the document:
[source,bash]
----
# Update ONLY the vector embedding (not the document text)
curl -X PUT http://localhost:8080/api/v1/octads/a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d \
curl -X PUT http://localhost:8080/api/v1/octads/a1b2c3d4-e5f6-8a7b-8c9d-0e1f2a3b4c5d \
-H "Content-Type: application/json" \
-d '{
"embedding": [0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99]
}'

# Check drift again
curl http://localhost:8080/api/v1/drift/entity/a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
curl http://localhost:8080/api/v1/drift/entity/a1b2c3d4-e5f6-8a7b-8c9d-0e1f2a3b4c5d
----

Response:

[source,json]
----
{
"entity_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"entity_id": "a1b2c3d4-e5f6-8a7b-8c9d-0e1f2a3b4c5d",
"vector": 0.87,
"document": 0.0,
"overall": 0.43,
Expand All @@ -282,7 +282,7 @@ detected that the embedding no longer corresponds to the text.

[source,bash]
----
curl -X POST http://localhost:8080/api/v1/normalizer/trigger/a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
curl -X POST http://localhost:8080/api/v1/normalizer/trigger/a1b2c3d4-e5f6-8a7b-8c9d-0e1f2a3b4c5d
----

VeriSimDB identifies the document as the authoritative modality and
Expand All @@ -300,7 +300,7 @@ understands modalities and drift.
[source,sql]
----
-- Get all modalities for an entity
SELECT * FROM HEXAD 'a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d'
SELECT * FROM HEXAD 'a1b2c3d4-e5f6-8a7b-8c9d-0e1f2a3b4c5d'

-- Get specific modalities
SELECT GRAPH.*, DOCUMENT.*, VECTOR.* FROM HEXAD 'entity-id'
Expand Down
2 changes: 1 addition & 1 deletion docs/modality-profile.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ this document and the code/schema disagree, the code/schema win and this documen
has a bug.

// The two annotations below are read by
// scripts/check-modality-contract.py (via tests/modality-contract-gate.sh).
// scripts/check-modality-contract.sh (via tests/modality-contract-gate.sh).
// They are the machine-checkable half of this document: the doc cannot drift
// away from connectors/shared/json-schema/ and the Rust core without CI saying
// so. Keep the exact `// modality-contract:` prefix.
Expand Down
2 changes: 1 addition & 1 deletion docs/papers/verisimdb-federated-consistency.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ Multiple proofs can be composed in a single query:
[source,vcl]
----
SELECT *
FROM HEXAD 550e8400-e29b-41d4-a716-446655440000
FROM HEXAD 550e8400-e29b-81d4-a716-446655440000
PROOF INTEGRITY(DataIntegrityContract)
AND PROVENANCE(FullLineageContract)
----
Expand Down
Loading