Skip to main content

Digital Twin Synchronicity Guard — deterministic sync verification between physical and virtual systems with TIBET provenance

Project description

tibet-twin — Digital Twin Synchronicity Guard

No action without proven synchronization.

Every deviation is an alert. Every decision is a TIBET token.

tibet-twin ensures physical and virtual systems are synchronized before allowing any action. When a digital twin's view of reality diverges from actual sensor data, tibet-twin blocks the action and creates a TIBET audit trail.

The Deadly Scenario

Factories and ports build digital twins — virtual 3D copies of physical machines. But there's always latency between the physical sensor and the virtual model.

[Physical Crane]                    [Digital Twin]
  sensor: FAULT t=14:32:01.003       status: OK t=14:32:00.500
        |                                  |
        └──── tibet-twin compares ─────────┘
              Δt = 503ms, status ≠ sync
              → BLOCK action
              → TIBET token: audit trail

If the digital twin authorizes a "move left" command while the physical crane has a fault... people die.

Install

pip install tibet-twin

Quick Start

from tibet_twin import SyncGuard, PhysicalState, TwinState

guard = SyncGuard(max_drift_ms=200)  # Port crane: max 200ms drift

# Physical crane reports: FAULT
guard.update_physical("crane-01", PhysicalState(
    device_id="crane-01",
    timestamp="2026-02-27T14:32:01.003+00:00",
    values={"position_x": 12.5, "load_kg": 2500.0},
    status="fault",
))

# Digital twin still thinks: OK
guard.update_twin("crane-01", TwinState(
    device_id="crane-01",
    timestamp="2026-02-27T14:32:00.500+00:00",
    values={"position_x": 12.5, "load_kg": 2500.0},
    status="operational",
))

decision = guard.check("crane-01", intent="move_left")
print(decision.blocked)  # True
print(decision.reason)   # "BLOCKED: status mismatch: physical=fault, twin=operational"

Demo

tibet-twin demo        # Interactive crane safety demo
tibet-twin info        # The deadly scenario explained
tibet-twin profiles    # Industry profiles with sync thresholds

Why TIBET Is Unique Here

Other synchronization systems check: "Is the data there?"

tibet-twin checks:

  1. Is it the right data? (value comparison)
  2. From the right device? (JIS identity)
  3. At the right time? (temporal drift)
  4. Does the intent match the state? (TIBET provenance)

All four must pass. One failure = BLOCK.

Industry Profiles

Profile Sector Max Drift Safety Critical Example Assets
port Maritime 200ms Yes Container cranes, AGVs
manufacturing Factory 100ms Yes CNC, robot arms (KUKA/ABB)
energy Power Grid 500ms Yes Wind turbines, substations
steel Heavy Industry 300ms Yes Blast furnaces, hot strip mills
semiconductor Chip Fab 50ms Yes ASML EUV, etch tools
building Smart Building 5000ms No HVAC, fire detection
tibet-twin profiles --json

TIBET Provenance

Every sync decision creates a TIBET token:

Layer Content
ERIN Decision (allowed/blocked, drift, value deltas)
ERAAN Device JIS identity, parent tokens
EROMHEEN Guard node, timestamp, environment
ERACHTER Intent (what action was attempted), safety flag

The token chain is an immutable safety audit trail. When an inspector asks "was the twin in sync when the crane moved?" — the TIBET chain proves it.

Python API

from tibet_twin import SyncGuard, PhysicalState, TwinState

guard = SyncGuard(
    max_drift_ms=200,
    value_tolerances={
        "crane-01": {"position_x": 0.5, "load_kg": 100.0},
    },
)

# Update states continuously
guard.update_physical("crane-01", PhysicalState(...))
guard.update_twin("crane-01", TwinState(...))

# Check before every action
decision = guard.check("crane-01", intent="move_left")
if decision.blocked:
    handle_block(decision)
else:
    execute_action()

# Audit trail
for token in guard.export_audit():
    print(token["erin"]["details"]["reason"])

# Status
print(guard.status())
# {'checks': 150, 'allowed': 142, 'blocked': 8, 'block_rate': 5.3}

Part of the TIBET ecosystem

Package Purpose
tibet-core Protocol core
tibet-y2k38 Y2K38 Time Bridge
tibet-pol Process Integrity Checker
tibet-pqc Post-Quantum Crypto Router
tibet-overlay Identity Overlay
tibet-twin Digital Twin Guard

License

MIT — Humotica AI Lab 2025-2026

Authors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tibet_twin-0.1.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tibet_twin-0.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file tibet_twin-0.1.0.tar.gz.

File metadata

  • Download URL: tibet_twin-0.1.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tibet_twin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f270a8a4da6bb575e062c55ca692b556c3dc5d7cf00fdc62fd3b4fdd17f5a56c
MD5 8af1890c0689753ddf2294acd3948e4f
BLAKE2b-256 a39ad5580f2ba1d84f805b7ba33239ea7697edce4308356fe5500482e1b2d0f2

See more details on using hashes here.

File details

Details for the file tibet_twin-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tibet_twin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tibet_twin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5739abd779748a86399f34822c0659247e523fa5524b882dc03b7ead8e8e133d
MD5 d4e14c5a9837405d2658dd611d740cf5
BLAKE2b-256 99588f81f989498b38f3758631629982026d64c16e25e47f78e70e0e7aec5745

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page