From b2edd1f27641279a8cea98bcd33d99db20ee385c Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 13 Jul 2026 17:10:44 +0100 Subject: [PATCH] Separate Unity resolution from operability --- .../src/bin/epiphany-unity-bridge-smoke.rs | 18 +++++++++--------- .../src/bin/epiphany-unity-bridge.rs | 18 +++++++++--------- ...onceptual-substitution-audit-2026-07-12.md | 9 +++++++++ notes/fresh-workspace-handoff.md | 5 +++++ state/ledgers.msgpack | Bin 481568 -> 481875 bytes state/map.yaml | 2 +- 6 files changed, 33 insertions(+), 19 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-unity-bridge-smoke.rs b/epiphany-core/src/bin/epiphany-unity-bridge-smoke.rs index ce7ab44c..6fb81859 100644 --- a/epiphany-core/src/bin/epiphany-unity-bridge-smoke.rs +++ b/epiphany-core/src/bin/epiphany-unity-bridge-smoke.rs @@ -50,7 +50,7 @@ fn run_smoke() -> Result { require_artifact(&missing, "unity-bridge-inspection.md")?; let exact_editor = create_fake_editor(&fake_roots, PROJECT_VERSION)?; - let ready = run_bridge( + let resolved = run_bridge( &root, &workspace, &artifact_root, @@ -59,15 +59,15 @@ fn run_smoke() -> Result { true, )?; require( - ready["status"] == "ready", - "exact editor should satisfy pin", + resolved["status"] == "resolved", + "exact editor path should resolve the pin", )?; require( - ready["editorPath"] == exact_editor.to_string_lossy().as_ref(), + resolved["editorPath"] == exact_editor.to_string_lossy().as_ref(), "inspection should resolve exact editor", )?; require( - ready + resolved .pointer("/editorBridge/exists") .and_then(Value::as_bool) == Some(false), @@ -89,7 +89,7 @@ fn run_smoke() -> Result { true, )?; require( - planned["status"] == "ready", + planned["status"] == "resolved", "dry run should still require exact editor", )?; require( @@ -148,7 +148,7 @@ fn run_smoke() -> Result { true, )?; require( - bridged["status"] == "ready", + bridged["status"] == "resolved", "bridge project should still resolve exact editor", )?; require( @@ -287,13 +287,13 @@ fn run_smoke() -> Result { "workspace": workspace, "artifactRoot": artifact_root, "missingStatus": missing["status"], - "readyStatus": ready["status"], + "editorResolutionStatus": resolved["status"], "plannedStatus": planned["runStatus"], "missingPackageStatus": missing_package["status"], "sceneProbeStatus": scene_probe["runStatus"], "testStatus": tests["runStatus"], "blockedStatus": blocked["runStatus"], - "resolvedEditor": ready["editorPath"], + "resolvedEditor": resolved["editorPath"], }); write_json(&result_path, &result)?; Ok(result) diff --git a/epiphany-core/src/bin/epiphany-unity-bridge.rs b/epiphany-core/src/bin/epiphany-unity-bridge.rs index 8fb6b783..8c8da6d3 100644 --- a/epiphany-core/src/bin/epiphany-unity-bridge.rs +++ b/epiphany-core/src/bin/epiphany-unity-bridge.rs @@ -223,7 +223,7 @@ fn read_unity_project_version(project_path: &Path) -> serde_json::Value { .as_str() .is_some_and(|value| !value.is_empty()) { - result["status"] = json!("ready"); + result["status"] = json!("pinned"); } else { result["status"] = json!("missingProjectVersion"); result["note"] = json!("ProjectVersion.txt did not contain m_EditorVersion."); @@ -364,7 +364,7 @@ fn resolve_unity_editor(project_path: &Path) -> Result { .collect::>() ); if let Some(exact) = exact { - result["status"] = json!("ready"); + result["status"] = json!("resolved"); result["editorPath"] = json!(path_string(exact)); result["note"] = json!(format!( "Project pins Unity {project_version}; exact editor resolved at {}.", @@ -481,7 +481,7 @@ fn build_unity_command( Ok(command) } -fn editor_bridge_ready(summary: &serde_json::Value) -> bool { +fn editor_bridge_present(summary: &serde_json::Value) -> bool { summary["editorBridge"]["exists"].as_bool() == Some(true) } @@ -619,7 +619,7 @@ fn run_unity(options: &UnityOptions) -> Result { summary["operation"] = json!("run"); summary["label"] = json!(options.label); summary["unityArgs"] = json!(options.unity_args); - if summary["status"].as_str() != Some("ready") { + if summary["status"].as_str() != Some("resolved") { summary["runStatus"] = json!("blocked"); summary["note"] = json!(format!( "{} Runtime execution refused; install the exact pinned editor or use inspect artifacts as evidence of the missing runtime.", @@ -701,7 +701,7 @@ fn run_named_probe(options: &UnityOptions, operation: &str) -> Result Result Result { summary["operation"] = json!("run-tests"); summary["testPlatform"] = json!(options.platform); summary["testFilter"] = json!(options.filter); - if summary["status"].as_str() != Some("ready") { + if summary["status"].as_str() != Some("resolved") { summary["runStatus"] = json!("blocked"); summary["note"] = json!(format!( "{} Unity tests refused; install the exact pinned editor or use inspect artifacts as evidence of the missing runtime.", @@ -935,8 +935,8 @@ fn bridge_guidance(project_path: &Path) -> Result { "`epiphany-unity-bridge inspect --project-path {}`", project_path.display() ); - if summary["status"].as_str() == Some("ready") { - if editor_bridge_ready(&summary) { + if summary["status"].as_str() == Some("resolved") { + if editor_bridge_present(&summary) { Ok(format!( "- Unity bridge: project pins {} and the exact editor resolved to `{}`. If Unity execution is needed, use named bridge operations such as `epiphany-unity-bridge probe --project-path {} --operation scene-facts --scene ` or `epiphany-unity-bridge check-compilation --project-path {}`. The bridge owns -batchmode, -quit, -projectPath, -logFile, -executeMethod, and artifacts. Do not invoke `Unity`, `Unity.exe`, default installs, or PATH-resolved editors directly, and do not refactor Unity-owned scene/prefab state as raw text when the editor bridge can inspect it.", summary["projectVersion"].as_str().unwrap_or("unknown"), diff --git a/notes/conceptual-substitution-audit-2026-07-12.md b/notes/conceptual-substitution-audit-2026-07-12.md index 2b77df20..6a74aebd 100644 --- a/notes/conceptual-substitution-audit-2026-07-12.md +++ b/notes/conceptual-substitution-audit-2026-07-12.md @@ -1487,3 +1487,12 @@ The Rider bridge called a discovered executable path, solution file, and Git branch `ready` without executing or validating any of them. These projections now report `discovered`, `found`, and `gitDetected`. Discovery owns topology; only an actual launch receipt may later claim operability. + +## Editor resolution is not editor operability + +Unity inspection called a parsed project version and an existing exact-editor +path `ready`; its smoke proved that state with a fake text file named as the +editor executable. The project version is now `pinned`, the editor path is +`resolved`, and editor-bridge package existence is explicitly `present`. +Commands may use resolution to choose what to execute, but only `runStatus` +records planned, completed, failed, or blocked execution consequence. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 0c540727..419e8e4b 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -568,3 +568,8 @@ binary tests, and the all-bin check pass. Rider bridge topology no longer claims readiness from path existence. Rider is `discovered`, solutions are `found`, and repository topology is `gitDetected`; the native bridge smoke passes with the renamed evidence states. + +Unity bridge uses the same boundary: project version parsing is `pinned`, exact +editor path discovery is `resolved`, and the editor package predicate is named +`present`. Operability belongs to the subsequent `runStatus` receipt. The +native Unity bridge smoke, 259 library tests, and all-bin check pass. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index f42d388c8806743d37d49dca4ef29f94622218c9..74ca3bf99b60486f97cc107dd123b192d17931a8 100644 GIT binary patch delta 306 zcmXAiu}T9$5J25Kb62Dg3qgyM5!((oB-My%lg@uCkajk!# zs37Mf%N!^aerG!cXcF~<&2qi zro|-hb(B5~o1;n6ZhnVpt9kkm+0BoL&&Y&p$eqz+1hSXlv6M~*^iVoGK^34hM25y7 zNdsO<-k>(YI&kRitO~{wjGQgNmgr<|W^5dQ4>DAKso{6j2dm=+>JF4rO(oaLW5*)J zEl#0F3LW;N`Zp>|9_JO3LJk$ukOx=M=}Oy$6B*0`!54Ol&E9UhwK1}adm3^>(iv