key-data / models /tests /deep_dive_genesis.py
tostido's picture
Update tests to target gen42 and remove gen52
4bfd01e
"""Deep dive into genesis lineage and provenance chain."""
import sys
sys.path.insert(0, 'F:/End-Game/glassboxgames/children')
sys.path.insert(0, 'F:/End-Game/key')
print("=" * 70)
print("🔐 GENESIS LINEAGE - Tracing the Champion's Origins")
print("=" * 70)
# Check CASCADE genesis
print("\n=== CASCADE Genesis Root ===")
try:
from cascade import genesis
root = genesis.get_genesis_root()
print(f"Genesis root: {root}")
# Get full genesis info
if hasattr(genesis, 'get_genesis_info'):
info = genesis.get_genesis_info()
print(f"Genesis info: {info}")
except Exception as e:
print(f"Error: {e}")
# Check SwarmLattice
print("\n=== SwarmLattice ===")
try:
from swarm_lattice import SwarmLattice
lattice = SwarmLattice(link_to_genesis=True)
print(f"Lattice genesis root: {lattice.genesis_root}")
print(f"Lattice merkle root: {lattice.merkle_root}")
stats = lattice.get_stats()
print(f"Stats: {stats}")
except Exception as e:
print(f"Error: {e}")
# Check champion's view of genesis
print("\n=== Champion's Genesis View ===")
try:
import champion_gen42 as champ
# Get genesis root from champion
print(f"Champion quine hash: {champ.get_quine_hash()}")
# Check if champion can verify lineage
if hasattr(champ, 'verify_lineage_to_genesis'):
valid = champ.verify_lineage_to_genesis()
print(f"Lineage to genesis valid: {valid}")
# Check genesis from cascade module
if hasattr(champ, 'genesis'):
print(f"Champion's genesis module: {champ.genesis}")
if hasattr(champ.genesis, 'get_genesis_root'):
print(f"Genesis root: {champ.genesis.get_genesis_root()}")
except Exception as e:
print(f"Error: {e}")
import traceback
traceback.print_exc()
# Explore the provenance chain structure
print("\n=== CASCADE ProvenanceChain ===")
try:
from cascade.core.provenance import ProvenanceChain, ProvenanceRecord
# Create a test chain
chain = ProvenanceChain()
print(f"Chain type: {type(chain)}")
print(f"Chain methods: {[m for m in dir(chain) if not m.startswith('_')]}")
# Check if we can trace back
if hasattr(chain, 'verify'):
print(f"Has verify: True")
if hasattr(chain, 'get_lineage'):
print(f"Has get_lineage: True")
except Exception as e:
print(f"Error: {e}")
# Check CASCADE store stats
print("\n=== CASCADE Store Stats ===")
try:
from cascade import store
stats = store.stats()
print(f"Store stats:")
for k, v in stats.items():
print(f" {k}: {v}")
except Exception as e:
print(f"Error: {e}")