Fix local run freshness and plugin asset handling

This commit is contained in:
npc0-hue
2026-08-22 19:45:00 +08:00
parent bb5e48b29c
commit ebd616c549
23 changed files with 312 additions and 58 deletions
+15
View File
@@ -199,10 +199,25 @@ func TestCoreServiceDistributionBuildIgnoresStaleRunEndpoint(t *testing.T) {
if err != nil {
t.Fatalf("get runtime actions: %v", err)
}
if actions.RunStatus != domain.RunEndpointStatusOffline {
t.Fatalf("stale Run endpoint must project offline runtime status, got %+v", actions)
}
staleRunGated := map[string]bool{"dependencies-check": false, "dependencies-install": false, "live-logs": false}
for _, action := range actions.Actions {
if action.Key == "generate-run" && !action.Available {
t.Fatalf("stale Run endpoint must not gate platform build availability: %+v", action)
}
if _, gated := staleRunGated[action.Key]; gated {
staleRunGated[action.Key] = true
if action.Available || action.Reason != "Run heartbeat has not been observed" {
t.Fatalf("stale Run endpoint must gate runtime action %s, got %+v", action.Key, action)
}
}
}
for key, seen := range staleRunGated {
if !seen {
t.Fatalf("expected stale Run gating action %s in %+v", key, actions.Actions)
}
}
}