From 6eeadbaff83cc2fc1a9def54e746e63704883711 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Jul 2026 06:27:58 +0000 Subject: [PATCH 1/6] Initial plan From 79fa13ea465b95e841ddc38ce9a21826a6b59644 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Jul 2026 06:41:31 +0000 Subject: [PATCH 2/6] Deduplicate runtime override cloning Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/workflow/runtime_override_test.go | 43 ++++++++++++++++++ pkg/workflow/runtime_overrides.go | 63 ++++++++++----------------- 2 files changed, 67 insertions(+), 39 deletions(-) diff --git a/pkg/workflow/runtime_override_test.go b/pkg/workflow/runtime_override_test.go index 881f6c1c544..7906f8a5b8b 100644 --- a/pkg/workflow/runtime_override_test.go +++ b/pkg/workflow/runtime_override_test.go @@ -230,6 +230,49 @@ func TestApplyRuntimeOverrides(t *testing.T) { } } +func TestApplyRuntimeOverrides_KnownRuntimeActionOverrides(t *testing.T) { + var knownNode *Runtime + for _, runtime := range knownRuntimes { + if runtime.ID == "node" { + knownNode = runtime + break + } + } + if knownNode == nil { + t.Fatal("expected known node runtime to exist") + } + + requirements := map[string]*RuntimeRequirement{} + + applyRuntimeOverrides(map[string]any{ + "node": map[string]any{ + "version": "22", + "action-repo": "custom/setup-node", + "action-version": "v5", + }, + }, requirements) + + nodeReq, ok := requirements["node"] + if !ok { + t.Fatal("expected node requirement to be added") + } + if nodeReq.Version != "22" { + t.Fatalf("expected version 22, got %s", nodeReq.Version) + } + if nodeReq.Runtime == knownNode { + t.Fatal("expected action overrides to clone the known runtime") + } + if nodeReq.Runtime.ActionRepo != "custom/setup-node" { + t.Fatalf("expected ActionRepo custom/setup-node, got %s", nodeReq.Runtime.ActionRepo) + } + if nodeReq.Runtime.ActionVersion != "v5" { + t.Fatalf("expected ActionVersion v5, got %s", nodeReq.Runtime.ActionVersion) + } + if knownNode.ActionRepo == "custom/setup-node" { + t.Fatal("expected known runtime to remain unchanged") + } +} + func TestDetectRuntimeRequirementsWithOverrides(t *testing.T) { tests := []struct { name string diff --git a/pkg/workflow/runtime_overrides.go b/pkg/workflow/runtime_overrides.go index e01b6a7e92e..14242cdc5d2 100644 --- a/pkg/workflow/runtime_overrides.go +++ b/pkg/workflow/runtime_overrides.go @@ -5,6 +5,28 @@ import ( "strconv" ) +func cloneRuntimeWithActionOverrides(base *Runtime, actionRepo, actionVersion string) *Runtime { + customRuntime := &Runtime{ + ID: base.ID, + Name: base.Name, + ActionRepo: base.ActionRepo, + ActionVersion: base.ActionVersion, + VersionField: base.VersionField, + DefaultVersion: base.DefaultVersion, + Commands: base.Commands, + ExtraWithFields: base.ExtraWithFields, + } + + if actionRepo != "" { + customRuntime.ActionRepo = actionRepo + } + if actionVersion != "" { + customRuntime.ActionVersion = actionVersion + } + + return customRuntime +} + // applyRuntimeOverrides applies runtime version overrides from frontmatter func applyRuntimeOverrides(runtimes map[string]any, requirements map[string]*RuntimeRequirement) { runtimeSetupLog.Printf("Applying runtime overrides for %d configured runtimes", len(runtimes)) @@ -70,27 +92,7 @@ func applyRuntimeOverrides(runtimes map[string]any, requirements map[string]*Run // If action-repo or action-version is specified, create a custom Runtime if actionRepo != "" || actionVersion != "" { runtimeSetupLog.Printf("Applying custom action config for runtime %s: repo=%s, version=%s", runtimeID, actionRepo, actionVersion) - // Clone the existing runtime to avoid modifying the global knownRuntimes - customRuntime := &Runtime{ - ID: existing.Runtime.ID, - Name: existing.Runtime.Name, - ActionRepo: existing.Runtime.ActionRepo, - ActionVersion: existing.Runtime.ActionVersion, - VersionField: existing.Runtime.VersionField, - DefaultVersion: existing.Runtime.DefaultVersion, - Commands: existing.Runtime.Commands, - ExtraWithFields: existing.Runtime.ExtraWithFields, - } - - // Apply overrides - if actionRepo != "" { - customRuntime.ActionRepo = actionRepo - } - if actionVersion != "" { - customRuntime.ActionVersion = actionVersion - } - - existing.Runtime = customRuntime + existing.Runtime = cloneRuntimeWithActionOverrides(existing.Runtime, actionRepo, actionVersion) } } else { // Check if this is a known runtime @@ -101,24 +103,7 @@ func applyRuntimeOverrides(runtimes map[string]any, requirements map[string]*Run // Clone the known runtime if we need to customize it if actionRepo != "" || actionVersion != "" { runtimeSetupLog.Printf("Cloning known runtime %s with custom action config: repo=%s, version=%s", runtimeID, actionRepo, actionVersion) - runtime = &Runtime{ - ID: knownRuntime.ID, - Name: knownRuntime.Name, - ActionRepo: knownRuntime.ActionRepo, - ActionVersion: knownRuntime.ActionVersion, - VersionField: knownRuntime.VersionField, - DefaultVersion: knownRuntime.DefaultVersion, - Commands: knownRuntime.Commands, - ExtraWithFields: knownRuntime.ExtraWithFields, - } - - // Apply overrides - if actionRepo != "" { - runtime.ActionRepo = actionRepo - } - if actionVersion != "" { - runtime.ActionVersion = actionVersion - } + runtime = cloneRuntimeWithActionOverrides(knownRuntime, actionRepo, actionVersion) } else { runtimeSetupLog.Printf("Using known runtime %s as-is", runtimeID) runtime = knownRuntime From 14708e0aae25300d8099eefc02302f5d6d0bfeaf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Jul 2026 07:22:23 +0000 Subject: [PATCH 3/6] chore: start pr-finisher triage Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/skills/agentic-workflow-designer/SKILL.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/skills/agentic-workflow-designer/SKILL.md b/.github/skills/agentic-workflow-designer/SKILL.md index 0550b85156d..b7ee93f0ea5 100644 --- a/.github/skills/agentic-workflow-designer/SKILL.md +++ b/.github/skills/agentic-workflow-designer/SKILL.md @@ -152,13 +152,8 @@ Present a structured summary and ask for approval before generation. | "link a sub-issue" | `link-sub-issue` | | "add labels", "remove labels" | `add-labels`, `remove-labels` | | "replace a label with another" | `replace-label` | -| "report missing data needed for the task" | `missing-data` (system type, auto-enabled) | -| "report unavailable or missing tool/permission" | `missing-tool` (system type, auto-enabled) | -| "signal task could not be completed due to infrastructure failure" | `report-incomplete` (system type, auto-enabled) | | "nothing visible", "just analyze" | no safe outputs required | -> **System types** (`missing-data`, `missing-tool`, `report-incomplete`) are error-signaling outputs that are automatically available in every workflow without being declared in `safe-outputs:`. They emit structured infrastructure signals (not task results) and can be disabled explicitly (e.g. `missing-tool: false`) but should rarely be suppressed. - ### Network Mapping | User says... | Maps to | @@ -317,14 +312,8 @@ After confirmation, generate one workflow file using the same skeleton style as --- emoji: description: -strict: true on: -max-turns: -max-ai-credits: -max-daily-ai-credits: -user-rate-limit: -models: permissions: contents: read issues: read From 302f9be7aa701f0b4afe0b0307f984efe18599b1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Jul 2026 07:32:38 +0000 Subject: [PATCH 4/6] Fix runtime clone drift and strengthen known-node assertions Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/workflow/runtime_override_test.go | 7 +++++-- pkg/workflow/runtime_overrides.go | 15 +++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/pkg/workflow/runtime_override_test.go b/pkg/workflow/runtime_override_test.go index 7906f8a5b8b..5e994b4e4b5 100644 --- a/pkg/workflow/runtime_override_test.go +++ b/pkg/workflow/runtime_override_test.go @@ -268,8 +268,11 @@ func TestApplyRuntimeOverrides_KnownRuntimeActionOverrides(t *testing.T) { if nodeReq.Runtime.ActionVersion != "v5" { t.Fatalf("expected ActionVersion v5, got %s", nodeReq.Runtime.ActionVersion) } - if knownNode.ActionRepo == "custom/setup-node" { - t.Fatal("expected known runtime to remain unchanged") + if knownNode.ActionRepo != "actions/setup-node" { + t.Fatalf("expected known runtime ActionRepo to remain actions/setup-node, got %s", knownNode.ActionRepo) + } + if knownNode.ActionVersion != "v6" { + t.Fatalf("expected known runtime ActionVersion to remain v6, got %s", knownNode.ActionVersion) } } diff --git a/pkg/workflow/runtime_overrides.go b/pkg/workflow/runtime_overrides.go index 14242cdc5d2..bdb308d6bc9 100644 --- a/pkg/workflow/runtime_overrides.go +++ b/pkg/workflow/runtime_overrides.go @@ -6,17 +6,12 @@ import ( ) func cloneRuntimeWithActionOverrides(base *Runtime, actionRepo, actionVersion string) *Runtime { - customRuntime := &Runtime{ - ID: base.ID, - Name: base.Name, - ActionRepo: base.ActionRepo, - ActionVersion: base.ActionVersion, - VersionField: base.VersionField, - DefaultVersion: base.DefaultVersion, - Commands: base.Commands, - ExtraWithFields: base.ExtraWithFields, + if base == nil { + return nil } + customRuntime := *base + if actionRepo != "" { customRuntime.ActionRepo = actionRepo } @@ -24,7 +19,7 @@ func cloneRuntimeWithActionOverrides(base *Runtime, actionRepo, actionVersion st customRuntime.ActionVersion = actionVersion } - return customRuntime + return &customRuntime } // applyRuntimeOverrides applies runtime version overrides from frontmatter From b3b505600c2d78894442cea5dfbfd20b64fd3fd2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Jul 2026 07:38:34 +0000 Subject: [PATCH 5/6] Deep-copy runtime reference fields and strengthen immutability test Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/workflow/runtime_override_test.go | 9 +++++++++ pkg/workflow/runtime_overrides.go | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/pkg/workflow/runtime_override_test.go b/pkg/workflow/runtime_override_test.go index 5e994b4e4b5..c95d17add92 100644 --- a/pkg/workflow/runtime_override_test.go +++ b/pkg/workflow/runtime_override_test.go @@ -3,6 +3,8 @@ package workflow import ( + "maps" + "reflect" "testing" ) @@ -241,6 +243,10 @@ func TestApplyRuntimeOverrides_KnownRuntimeActionOverrides(t *testing.T) { if knownNode == nil { t.Fatal("expected known node runtime to exist") } + originalKnownNode := *knownNode + originalKnownNode.Commands = append([]string(nil), knownNode.Commands...) + originalKnownNode.ManifestFiles = append([]string(nil), knownNode.ManifestFiles...) + originalKnownNode.ExtraWithFields = maps.Clone(knownNode.ExtraWithFields) requirements := map[string]*RuntimeRequirement{} @@ -274,6 +280,9 @@ func TestApplyRuntimeOverrides_KnownRuntimeActionOverrides(t *testing.T) { if knownNode.ActionVersion != "v6" { t.Fatalf("expected known runtime ActionVersion to remain v6, got %s", knownNode.ActionVersion) } + if !reflect.DeepEqual(*knownNode, originalKnownNode) { + t.Fatal("expected all known runtime fields to remain unchanged") + } } func TestDetectRuntimeRequirementsWithOverrides(t *testing.T) { diff --git a/pkg/workflow/runtime_overrides.go b/pkg/workflow/runtime_overrides.go index bdb308d6bc9..6a9b9436c97 100644 --- a/pkg/workflow/runtime_overrides.go +++ b/pkg/workflow/runtime_overrides.go @@ -2,6 +2,8 @@ package workflow import ( "fmt" + "maps" + "slices" "strconv" ) @@ -11,6 +13,9 @@ func cloneRuntimeWithActionOverrides(base *Runtime, actionRepo, actionVersion st } customRuntime := *base + customRuntime.Commands = slices.Clone(base.Commands) + customRuntime.ManifestFiles = slices.Clone(base.ManifestFiles) + customRuntime.ExtraWithFields = maps.Clone(base.ExtraWithFields) if actionRepo != "" { customRuntime.ActionRepo = actionRepo From 82c5526d8b01e5772609efbf5dce769c5cd0c773 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Jul 2026 07:55:18 +0000 Subject: [PATCH 6/6] Add coverage for runtime override clone edge paths Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> --- pkg/workflow/runtime_override_test.go | 83 +++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/pkg/workflow/runtime_override_test.go b/pkg/workflow/runtime_override_test.go index c95d17add92..12d076bdea0 100644 --- a/pkg/workflow/runtime_override_test.go +++ b/pkg/workflow/runtime_override_test.go @@ -285,6 +285,89 @@ func TestApplyRuntimeOverrides_KnownRuntimeActionOverrides(t *testing.T) { } } +func TestApplyRuntimeOverrides_KnownRuntimeActionRepoOnly(t *testing.T) { + var knownNode *Runtime + for _, runtime := range knownRuntimes { + if runtime.ID == "node" { + knownNode = runtime + break + } + } + if knownNode == nil { + t.Fatal("expected known node runtime to exist") + } + + originalKnownNode := *knownNode + originalKnownNode.Commands = append([]string(nil), knownNode.Commands...) + originalKnownNode.ManifestFiles = append([]string(nil), knownNode.ManifestFiles...) + originalKnownNode.ExtraWithFields = maps.Clone(knownNode.ExtraWithFields) + + requirements := map[string]*RuntimeRequirement{} + applyRuntimeOverrides(map[string]any{ + "node": map[string]any{ + "action-repo": "custom/setup-node", + }, + }, requirements) + + nodeReq, ok := requirements["node"] + if !ok { + t.Fatal("expected node requirement to be added") + } + if nodeReq.Runtime == knownNode { + t.Fatal("expected action overrides to clone the known runtime") + } + if nodeReq.Runtime.ActionRepo != "custom/setup-node" { + t.Fatalf("expected ActionRepo custom/setup-node, got %s", nodeReq.Runtime.ActionRepo) + } + if nodeReq.Runtime.ActionVersion != knownNode.ActionVersion { + t.Fatalf("expected ActionVersion %s, got %s", knownNode.ActionVersion, nodeReq.Runtime.ActionVersion) + } + if !reflect.DeepEqual(*knownNode, originalKnownNode) { + t.Fatal("expected all known runtime fields to remain unchanged") + } +} + +func TestApplyRuntimeOverrides_ExistingRequirementActionRepoOnlyClonesRuntime(t *testing.T) { + existingRuntime := &Runtime{ + ID: "node", + ActionRepo: "actions/setup-node", + ActionVersion: "v4", + Commands: []string{"node --version"}, + ManifestFiles: []string{"package.json"}, + ExtraWithFields: map[string]string{"cache": "npm"}, + } + originalExistingRuntime := *existingRuntime + originalExistingRuntime.Commands = append([]string(nil), existingRuntime.Commands...) + originalExistingRuntime.ManifestFiles = append([]string(nil), existingRuntime.ManifestFiles...) + originalExistingRuntime.ExtraWithFields = maps.Clone(existingRuntime.ExtraWithFields) + + requirements := map[string]*RuntimeRequirement{ + "node": { + Runtime: existingRuntime, + Version: "20", + }, + } + applyRuntimeOverrides(map[string]any{ + "node": map[string]any{ + "action-repo": "custom/setup-node", + }, + }, requirements) + + nodeReq := requirements["node"] + if nodeReq.Runtime == existingRuntime { + t.Fatal("expected existing runtime to be cloned when applying action overrides") + } + if nodeReq.Runtime.ActionRepo != "custom/setup-node" { + t.Fatalf("expected ActionRepo custom/setup-node, got %s", nodeReq.Runtime.ActionRepo) + } + if nodeReq.Runtime.ActionVersion != "v4" { + t.Fatalf("expected ActionVersion v4, got %s", nodeReq.Runtime.ActionVersion) + } + if !reflect.DeepEqual(*existingRuntime, originalExistingRuntime) { + t.Fatal("expected existing runtime fields to remain unchanged") + } +} + func TestDetectRuntimeRequirementsWithOverrides(t *testing.T) { tests := []struct { name string