import sys import os import json # Add root to path sys.path.append(os.getcwd()) from core.engine import RealizationEngine def verify(): path = 'data/comprehensive_realization_dataset.json' if not os.path.exists(path): print(f"āŒ Error: {path} not found.") return with open(path, 'r') as f: data = json.load(f) print(f"šŸ” Verifying dataset: {path}") # 1. Check counts realizations = data['realizations'] count = len(realizations) if count == 20: print(f"āœ… Count matches: {count}/20") else: print(f"āš ļø Count mismatch: {count}/20") # 2. Check fields required_fields = ['id', 'content', 'features', 'q_score', 'layer', 'reasoning_chain'] missing_fields = [] for r in realizations: for field in required_fields: if field not in r: missing_fields.append((r['id'], field)) if not missing_fields: print("āœ… All realizations have required fields.") else: print(f"āŒ Missing fields: {missing_fields[:5]}") # 3. Check topology (Parent-Child) synthesis_r = next((r for r in realizations if "intelligent systems" in r['content'].lower()), None) if synthesis_r: parents = synthesis_r['parents'] print(f"āœ… Synthesis realization {synthesis_r['id']} has {len(parents)} parents.") if len(parents) >= 3: print("āœ… Cross-domain convergence verified.") else: print("āš ļø Synthesis has fewer than 3 parents.") else: print("āš ļø Synthesis realization not found.") # 4. Check layer distribution dist = data['stats']['layer_distribution'] print(f"šŸ“Š Layer distribution: {dist}") if dist['0'] > 0 and dist['N'] > 0: print("āœ… Dataset covers full spectrum (Layer 0 to N).") else: print("āš ļø Dataset missing layers.") print("\nāœ… Verification complete!") if __name__ == "__main__": verify()