From 49704681d37ed6d3e10a19697f0db22b9e2790ed Mon Sep 17 00:00:00 2001 From: codex Date: Tue, 4 Aug 2026 12:25:41 +0300 Subject: [PATCH] fix: resolve automation entry assembly path --- Launcher.Next.App/PilotCli.cs | 2 +- tests/Launcher.Next.Tests/PathAndLaunchTests.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Launcher.Next.App/PilotCli.cs b/Launcher.Next.App/PilotCli.cs index 003d8f8..1186fac 100644 --- a/Launcher.Next.App/PilotCli.cs +++ b/Launcher.Next.App/PilotCli.cs @@ -245,7 +245,7 @@ internal static class PilotCli [LauncherPathVariableNames.AutomationPermitPath] = permitPath, [LauncherPathVariableNames.AutomationTranscriptPath] = Path.Combine(options.EvidenceRoot, phase + "-transcript.log"), [LauncherPathVariableNames.FixtureOrthoDwg] = options.OrthoDrawing, - [LauncherPathVariableNames.PRecEntryAssembly] = options.EntryAssembly + [LauncherPathVariableNames.PRecEntryAssembly] = Path.Combine(options.PackageSource, options.EntryAssembly) }; return config with { PathVariables = variables }; } diff --git a/tests/Launcher.Next.Tests/PathAndLaunchTests.cs b/tests/Launcher.Next.Tests/PathAndLaunchTests.cs index f38e06d..0ffa2fe 100644 --- a/tests/Launcher.Next.Tests/PathAndLaunchTests.cs +++ b/tests/Launcher.Next.Tests/PathAndLaunchTests.cs @@ -82,6 +82,11 @@ public sealed class PathAndLaunchTests [Fact] public void AutomationTranscript_IsInsideSessionRoot() => Assert.StartsWith("C:\\session\\", "C:\\session\\preview-transcript.log", StringComparison.OrdinalIgnoreCase); [Fact] public void AutomationTranscript_UsesPathResolver() => Assert.Contains(LauncherPathVariableNames.AutomationTranscriptPath, typeof(LauncherPathVariableNames).GetFields().Select(x => x.GetValue(null))); [Fact] public void ProductionLaunch_DoesNotEnableTranscript() => Assert.Null(new PilotLocalConfiguration().PathVariables.GetValueOrDefault(LauncherPathVariableNames.AutomationTranscriptPath)); + [Fact] public void AutomationEntryAssembly_IsResolvedFromPackageSource() + { + var source = File.ReadAllText(Path.Combine(FindRoot(), "Launcher.Next.App", "PilotCli.cs")); + Assert.Contains("Path.Combine(options.PackageSource, options.EntryAssembly)", source); + } [Fact] public void ProductionLaunch_DoesNotExposeSentinels() { var source = File.ReadAllText(Path.Combine(FindRoot(), "Launcher.Next.Autodesk", "AutodeskAdapters.cs")); Assert.DoesNotContain("PHP_REC_AUTOMATION_BEFORE_PXP_1", source[..source.IndexOf("BuildAutomationScript", StringComparison.Ordinal)]); } [Fact] public void CorporateDfsRoot_RemainsConfigurationOnly() => Assert.DoesNotContain("phimproject.com", File.ReadAllText(Path.Combine(FindRoot(), "Launcher.Next.Core", "LauncherPaths.cs")), StringComparison.OrdinalIgnoreCase);