ENTITY Documentation Portal
Code tutorial 5 - tested

Initialize BTDU and verify the ADAM dependency boundary

Btdu cli initialization and fail-closed adam source verification. Verified against ENTITY main commit 5be325437a63c2efaee0dc3caaae9ab0cd0773d9 using disposable tutorial state.

Download/view the exact source - Open the recorded transcript - Execution record

Watch the tutorial

This video is a transcript replay generated from the exact recorded execution for tutorial 5. The published source and transcript remain authoritative for reproduction.

Run it

python examples/btdu_bootstrap.py
# then run tools/entity_btdu_cli.py init/status using the generated ent2 ID and verified ADAM source root

Exact source used

from pathlib import Path
import importlib.util
import shutil

ROOT = Path(__file__).resolve().parent
STATE = ROOT / ".tutorial-btdu" / "entity"
if STATE.exists():
    shutil.rmtree(STATE)

def load_source(relative_path: str, module_name: str):
    spec = importlib.util.spec_from_file_location(module_name, ROOT / relative_path)
    module = importlib.util.module_from_spec(spec)
    assert spec.loader is not None
    spec.loader.exec_module(module)
    return module

identity_mod = load_source(
    "src/01_Core_Runtime/identity/canonical_identity.py", "entity_identity"
)
vault = identity_mod.EntityIdentityVault(STATE)
manifest = vault.create(
    display_name="BTDU Tutorial Owner",
    entity_type="organization",
    aliases=["btdu-tutorial-owner"],
    metadata={"purpose": "disposable BTDU tutorial"},
)
assert identity_mod.EntityIdentityVault.verify_manifest(manifest)
print(manifest["entity_id"])

Recorded run

ENTITY source commit: 5be325437a63c2efaee0dc3caaae9ab0cd0773d9
Recorded on: 2026-09-30 (America/Vancouver)
Command sequence:
  python examples/btdu_bootstrap.py
  python tools/entity_btdu_cli.py --entity-state .tutorial-btdu/entity --btdu-state .tutorial-btdu/btdu --adam-root PATH_TO_VERIFIED_ADAM_V1_ROOT --owner-entity-id GENERATED_ENT2_ID --git-bin git init
  python tools/entity_btdu_cli.py --entity-state .tutorial-btdu/entity --btdu-state .tutorial-btdu/btdu --adam-root PATH_TO_VERIFIED_ADAM_V1_ROOT --owner-entity-id GENERATED_ENT2_ID --git-bin git status

Recorded status summary:
BTDU_STATUS=PASS
BTDU_VERSION=3.4.2
ATOMIC_RUNTIME=PASS
AUTHORITY_ROOT=ENTITY
EXECUTOR_STATE_ENGINE=ADAM
SOVEREIGN_ENTITY_ID=ent2-xbxnzay6mliebrj3yh7zpn7hjiogu3mj6d7r5wuvcylhgvlhwg7a
OBJECTS=0
PROBLEMS=

Dependency negative control:
  --adam-root src/11_ADAM/full_runtime
Result:
  FileNotFoundError: Full ADAM v1.0 source is required. Set ENTITY_ADAM_V1_ROOT to the verified ADAM_v1_0_COMPLETE_SOFTWARE_REFERENCE_RC2 source root.

After using a verified source root containing adam_v1/runtime.py, init and status both passed.
Claim boundary: tutorial PASS does not satisfy the ADAM software reference's unresolved external certification gates.
Verified ADAM prerequisite: --adam-root must point to the verified ADAM v1.0 source root containing adam_v1/runtime.py. ENTITY's src/11_ADAM/full_runtime is an integration layer and correctly fails the dependency guard when used as the source root.

Qualification boundary

The recorded ADAM runtime identifies itself as ADAM v1.0 Complete Software Reference / External Certification Required. This tutorial does not convert unresolved external gates into completed certification.