Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 31, 2025

The required array in safe output custom job schemas was non-deterministic due to Go map iteration order, causing unnecessary diffs in compiled workflows.

Changes

  • pkg/workflow/safe_outputs_config_generation.go: Sort requiredFields alphabetically before adding to JSON schema
  • pkg/workflow/safe_outputs_custom_job_tools_test.go: Add test verifying required array stability

Example

Before (random order):

{
  "inputSchema": {
    "required": ["zebra", "middle", "apple"]
  }
}

After (stable alphabetical order):

{
  "inputSchema": {
    "required": ["apple", "middle", "zebra"]
  }
}

This ensures workflow lock files have stable output across compilations when custom jobs define multiple required inputs.

Original prompt

The required array in the safe output custom jobs schema should be sorted to be stable.

Custom agent used: ci-cleaner
Tidies up the repository CI state by formatting sources, running linters, fixing issues, running tests, and recompiling workflows


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Sort required array in safe output schema Sort required fields in safe output custom job schemas for stable output Dec 31, 2025
Copilot AI requested a review from pelikhan December 31, 2025 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants