dita_v2: VenueTelemetrySnapshot + Zinc venue plane (4th shm partition) + local Rust target dir

Upstream-canonical commit of the ~366 lines that sat uncommitted in the working
tree (surveyed in DITAV2_SOA_SURVEY_20260702). Venue telemetry published at every
venue boundary (submit/cancel/reconcile) over the zinc venue_region; SOA per
UV DITAv2 adjudication 2026-07-03.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-07-03 00:42:20 +02:00
parent 1db4802ee8
commit 9bef1f6b01
8 changed files with 1091 additions and 8 deletions

View File

@@ -107,6 +107,9 @@ def _crate_dir() -> Path:
return Path(__file__).resolve().with_name("_rust_kernel")
_LOCAL_TARGET_DIR = Path("/root/.cargo/dita_v2_target")
def _library_path() -> Path:
if sys.platform == "darwin":
name = "libdita_v2_kernel.dylib"
@@ -114,6 +117,9 @@ def _library_path() -> Path:
name = "dita_v2_kernel.dll"
else:
name = "libdita_v2_kernel.so"
local = _LOCAL_TARGET_DIR / "release" / name
if local.exists():
return local
return _crate_dir() / "target" / "release" / name
@@ -121,10 +127,13 @@ def _build_library() -> None:
crate_dir = _crate_dir()
if not crate_dir.exists():
raise FileNotFoundError(f"Missing Rust kernel crate: {crate_dir}")
_LOCAL_TARGET_DIR.mkdir(parents=True, exist_ok=True)
env = {**os.environ, "CARGO_TARGET_DIR": str(_LOCAL_TARGET_DIR)}
subprocess.run(
["cargo", "build", "--release", "--manifest-path", str(crate_dir / "Cargo.toml")],
cwd=_repo_root(),
check=True,
env=env,
)