Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/parser/schemas/main_workflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3312,7 +3312,7 @@
},
{
"type": "array",
"description": "Short syntax: array of language identifiers to enable (e.g., [\"go\", \"typescript\"])",
"description": "Short syntax: array of language identifiers to enable (e.g., [\"go\", \"typescript\"]). Note: rust does not generate a runtime setup step.",
"items": {
"type": "string",
"enum": ["go", "typescript", "python", "java", "rust", "csharp"]
Expand Down Expand Up @@ -3445,7 +3445,7 @@
"additionalProperties": false
}
],
"description": "Configuration for Rust language support in Serena code analysis. Enables Rust-specific parsing, linting, and security checks."
"description": "Configuration for Rust language support in Serena code analysis. Enables Rust-specific parsing, linting, and security checks. Note: rust does not generate a runtime setup step in GitHub Actions."
},
"csharp": {
"oneOf": [
Expand Down
45 changes: 34 additions & 11 deletions pkg/workflow/frontmatter_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,26 @@ var frontmatterTypesLog = logger.New("workflow:frontmatter_types")

// RuntimeConfig represents the configuration for a single runtime
type RuntimeConfig struct {
Version string `json:"version,omitempty"` // Version of the runtime (e.g., "20" for Node, "3.11" for Python)
If string `json:"if,omitempty"` // Optional GitHub Actions if condition (e.g., "hashFiles('go.mod') != ''")
Version string `json:"version,omitempty"` // Version of the runtime (e.g., "20" for Node, "3.11" for Python)
If string `json:"if,omitempty"` // Optional GitHub Actions if condition (e.g., "hashFiles('go.mod') != ''")
ActionRepo string `json:"action-repo,omitempty"` // Override the GitHub Actions repository (e.g., "actions/setup-node")
ActionVersion string `json:"action-version,omitempty"` // Override the action version (e.g., "v4")
}

// RuntimesConfig represents the configuration for all runtime environments
// This provides type-safe access to runtime version overrides
type RuntimesConfig struct {
Node *RuntimeConfig `json:"node,omitempty"` // Node.js runtime
Python *RuntimeConfig `json:"python,omitempty"` // Python runtime
Go *RuntimeConfig `json:"go,omitempty"` // Go runtime
UV *RuntimeConfig `json:"uv,omitempty"` // uv package installer
Bun *RuntimeConfig `json:"bun,omitempty"` // Bun runtime
Deno *RuntimeConfig `json:"deno,omitempty"` // Deno runtime
Node *RuntimeConfig `json:"node,omitempty"` // Node.js runtime
Python *RuntimeConfig `json:"python,omitempty"` // Python runtime
Go *RuntimeConfig `json:"go,omitempty"` // Go runtime
UV *RuntimeConfig `json:"uv,omitempty"` // uv package installer
Bun *RuntimeConfig `json:"bun,omitempty"` // Bun runtime
Deno *RuntimeConfig `json:"deno,omitempty"` // Deno runtime
Dotnet *RuntimeConfig `json:"dotnet,omitempty"` // .NET runtime
Elixir *RuntimeConfig `json:"elixir,omitempty"` // Elixir runtime
Haskell *RuntimeConfig `json:"haskell,omitempty"` // Haskell runtime
Java *RuntimeConfig `json:"java,omitempty"` // Java runtime
Ruby *RuntimeConfig `json:"ruby,omitempty"` // Ruby runtime
}

// PermissionsConfig represents GitHub Actions permissions configuration
Expand Down Expand Up @@ -292,10 +299,16 @@ func parseRuntimesConfig(runtimes map[string]any) (*RuntimesConfig, error) {
}
}

// Create runtime config with both version and if condition
// Extract action-repo and action-version overrides (optional)
actionRepo, _ := configMap["action-repo"].(string)
actionVersion, _ := configMap["action-version"].(string)

// Create runtime config with all fields
runtimeConfig := &RuntimeConfig{
Version: version,
If: ifCondition,
Version: version,
If: ifCondition,
ActionRepo: actionRepo,
ActionVersion: actionVersion,
}

// Map to specific runtime field
Expand All @@ -312,6 +325,16 @@ func parseRuntimesConfig(runtimes map[string]any) (*RuntimesConfig, error) {
config.Bun = runtimeConfig
case "deno":
config.Deno = runtimeConfig
case "dotnet":
config.Dotnet = runtimeConfig
case "elixir":
config.Elixir = runtimeConfig
case "haskell":
config.Haskell = runtimeConfig
case "java":
config.Java = runtimeConfig
case "ruby":
config.Ruby = runtimeConfig
Comment on lines +328 to +337
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to parseRuntimesConfig correctly extract and populate the new ActionRepo and ActionVersion fields, and add support for the five new runtime types. However, the corresponding runtimesConfigToMap function (lines 699-785) also needs to be updated to:

  1. Include action-repo and action-version fields when converting each runtime config back to a map
  2. Add support for the five new runtime types: dotnet, elixir, haskell, java, ruby

Without these updates, the new fields and runtime types will be lost during round-trip conversion (parse → typed struct → map), breaking functionality that relies on ToMap() for serialization or backward compatibility.

Similarly, the countRuntimes helper function (lines 449-474) needs to include the five new runtime types in its count logic.

Copilot uses AI. Check for mistakes.
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/workflow/runtime_detection.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func detectSerenaLanguageRuntimes(serenaConfig *SerenaToolConfig, requirements m
"javascript": "node",
"python": "python",
"java": "java",
"rust": "rust", // rust is not in knownRuntimes yet, but including for completeness
"rust": "rust", // rust is listed as a valid Serena language but has no knownRuntime entry, so no setup step is generated
"csharp": "dotnet",
}

Expand Down
3 changes: 3 additions & 0 deletions smoke-test-pr-push-22306576814.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
# Smoke test file for PR push - run 22306576814
echo "Smoke test push verified"