Files
VoxelForge/Standalone/Research/WorldAssemblerM3/Linux132/PrepareOwnerNativeFI.py
T
Fr0zkaandClaude Opus 5.5 0065ee68e6 tools: per-strate density dispatch report in the fast tier (L132)
--density-dispatch-report prints each strate's bound path and tile shares. Owner world: SW native heightfield;
FI, TN, VS on compiled-analytic legacy fallback (FI lacks an imported FloatingIslandPlan; TN/VS have legacy recipes).
A native FI candidate broke the composed owner walk/shell gates, so the owner stays on its path. Output unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
2026-10-31 02:40:58 +01:00

45 lines
2.0 KiB
Python

#!/usr/bin/env python3
"""Create the isolated L132 owner snapshot with a native plan for existing FI strate 1."""
from __future__ import annotations
import json
from pathlib import Path
ROOT = Path(__file__).resolve().parents[4]
SOURCE = ROOT / "Standalone/data/owner_world.json"
MANIFEST = ROOT / "Saved/Linux/l132/fixtures/owner-native-fi.world-assembly.json"
LAYOUT = ROOT / "Saved/Linux/l132/fixtures/owner-native-fi.resolved-layout.json"
OUTPUT = ROOT / "Saved/Linux/l132/fixtures/owner_world_native_fi.json"
def main() -> int:
owner = json.loads(SOURCE.read_text(encoding="utf-8"))
manifest_text = MANIFEST.read_text(encoding="utf-8").strip()
layout_text = LAYOUT.read_text(encoding="utf-8").strip()
manifest = json.loads(manifest_text)
layout = json.loads(layout_text)
islands = manifest.get("floating_islands", [])
native = [row for row in islands if row.get("strate_index") == 1]
resolved = [row for row in layout.get("strates", [])
if row.get("strate_index") == 1]
if len(native) != 1 or len(resolved) != 1:
raise SystemExit("native FI snapshot must contain exactly one strate-1 island plan/layout")
if (resolved[0].get("generator_kind") != "FloatingIslands"
or resolved[0].get("recipe_id") != "FloatingIslands.ClusterField"
or resolved[0].get("recipe_version") != 8):
raise SystemExit("resolved strate 1 is not FloatingIslands.ClusterField v8")
owner["world_assembly"] = manifest
owner["core_world_assembly_json"] = manifest_text
owner["resolved_layout_json"] = layout_text
OUTPUT.parent.mkdir(parents=True, exist_ok=True)
OUTPUT.write_text(json.dumps(owner, separators=(",", ":")) + "\n", encoding="utf-8")
print(f"[L132NativeFISnapshot] path={OUTPUT.relative_to(ROOT)} "
f"islands={len(native[0].get('manifest', {}).get('plan', {}).get('islands', []))} "
"strate=1 recipe=FloatingIslands.ClusterField/v8 status=PASS")
return 0
if __name__ == "__main__":
raise SystemExit(main())