From 7fec2da0407a964baa4328756ca8a861d560f0af Mon Sep 17 00:00:00 2001 From: npc0-hue Date: Tue, 18 Aug 2026 07:02:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8D=8A=E6=88=90=E5=93=81=E5=A5=91?= =?UTF-8?q?=E7=BA=A6=E5=92=8C=20SCUM=20manifest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform/service/distribution_build_execution.go | 2 +- platform/service/distribution_build_execution_test.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/service/distribution_build_execution.go b/platform/service/distribution_build_execution.go index 3de782b..e0e6e08 100644 --- a/platform/service/distribution_build_execution.go +++ b/platform/service/distribution_build_execution.go @@ -338,7 +338,7 @@ func autonomousLogSource(source domain.RuntimeLogSource) domain.RunAutonomousLog } func autonomousRunLogSourceKind(kind string) bool { - return kind == "process.stdout" || kind == "process.stderr" || kind == "file.tail" + return kind == "process.stdout" || kind == "process.stderr" } func autonomousDLLExtension(extension domain.RuntimeDLLExtensionPlan) domain.RunAutonomousDLLExtension { diff --git a/platform/service/distribution_build_execution_test.go b/platform/service/distribution_build_execution_test.go index b8b5498..72b8453 100644 --- a/platform/service/distribution_build_execution_test.go +++ b/platform/service/distribution_build_execution_test.go @@ -145,9 +145,12 @@ func TestCoreServiceKeepsPlatformBuildKeyOffMachineJobChannel(t *testing.T) { if plan == nil || plan.SchemaVersion != "1" || plan.ServerInstanceID != instance.ID || plan.PluginID != plugin.ID || plan.ProfileKey != "local" || plan.Bootstrap == nil || plan.Bootstrap.Action != domain.ServerLifecycleActionStart || plan.Bootstrap.TargetKey != "actions/start.json" { t.Fatalf("platform builder received incomplete autonomous lifecycle plan: %+v", plan) } - if len(plan.DependencyProbes) != 1 || plan.DependencyProbes[0].Key != "java-runtime" || len(plan.InstallPlans) != 1 || plan.InstallPlans[0].Key != "java-install" || len(plan.LogSources) != 3 || !hasAutonomousLogSource(plan.LogSources, "process.stdout", "console") || !hasAutonomousLogSource(plan.LogSources, "file.tail", "latest-log") || !hasAutonomousLogSource(plan.LogSources, "file.tail", "scum.server") || plan.RuntimeBindings["logs/latest"] != "runtime.logs.latest" { + if len(plan.DependencyProbes) != 1 || plan.DependencyProbes[0].Key != "java-runtime" || len(plan.InstallPlans) != 1 || plan.InstallPlans[0].Key != "java-install" || len(plan.LogSources) != 1 || !hasAutonomousLogSource(plan.LogSources, "process.stdout", "console") || plan.RuntimeBindings["logs/latest"] != "runtime.logs.latest" { t.Fatalf("autonomous lifecycle plan lost plugin runtime declarations: %+v", plan) } + if hasAutonomousLogSource(plan.LogSources, "file.tail", "latest-log") || hasAutonomousLogSource(plan.LogSources, "file.tail", "scum.server") { + t.Fatalf("autonomous lifecycle plan must not carry file-tail sources into process.start: %+v", plan.LogSources) + } var seededPlan domain.RunAutonomousLifecyclePlan if err := json.Unmarshal([]byte(seedFiles[2].Content), &seededPlan); err != nil { t.Fatalf("unmarshal seeded autonomous lifecycle plan: %v", err)