Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

The main workflow schema defined both timeout-minutes and timeout_minutes as separate properties. This created schema pollution and unnecessary API surface for the same functionality.

Per feedback, timeout_minutes has been completely removed from both schema and runtime. Users can migrate their workflows using the existing timeout-minutes-migration codemod.

Changes

Schema cleanup

  • Removed timeout_minutes from pkg/parser/schemas/main_workflow_schema.json
  • Canonical timeout-minutes remains as the only schema-defined field
  • Workflows using timeout_minutes now fail validation with "additional properties not allowed"

Runtime removal

  • Removed fallback handling in compiler_orchestrator_workflow.go (no longer checks for timeout_minutes)
  • Removed dual prefix handling in claude_engine.go and copilot_engine_execution.go
  • Fixed default in tools.go to use timeout-minutes instead of timeout_minutes
  • Updated comment in jobs.go to reference timeout-minutes

Test updates

  • Removed pkg/workflow/timeout_minutes_test.go (obsolete test file)
  • Removed deprecated field test cases
  • Updated schema tests to verify field is rejected
  • Fixed test cases that incorrectly used timeout_minutes

Migration Path

Users with existing workflows using timeout_minutes should run:

gh aw fix

The timeout-minutes-migration codemod will automatically convert timeout_minutes to timeout-minutes while preserving comments and formatting.

Behavior

Workflows using timeout_minutes will now fail validation:

---
timeout_minutes: 45  # ❌ Error: additional properties 'timeout_minutes' not allowed
engine: copilot
---

Use the canonical form instead:

---
timeout-minutes: 45  # ✅ Correct
engine: copilot
---
Original prompt

This section details on the original issue you should resolve

<issue_title>[Code Quality] Remove duplicate timeout_minutes from schema (keep only timeout-minutes)</issue_title>
<issue_description>### Description

The main workflow schema defines both timeout-minutes and timeout_minutes as separate top-level properties, causing schema pollution and potential confusion. The runtime handles both for backwards compatibility, but the schema should only expose the canonical hyphenated form.

Problem

Schema Location: pkg/parser/schemas/main_workflow_schema.json

Currently defines:

{
  "properties": {
    "timeout-minutes": { ... },
    "timeout_minutes": { ... }  // ← Duplicate to remove
  }
}

Runtime: pkg/workflow/compiler_orchestrator_workflow.go:149-151 supports both field names for backwards compatibility (this is acceptable).

Impact

  • Schema Pollution: Two fields for the same concept
  • User Confusion: Users may not know which to use
  • Documentation Burden: Must explain both variants
  • API Surface: Unnecessarily large API

Suggested Changes

  1. Remove timeout_minutes from schema - Keep only timeout-minutes for consistency with GitHub Actions conventions
  2. Keep runtime support - Continue accepting both for backwards compatibility
  3. Update documentation - Add migration note explaining the dual support

Files to modify:

  • pkg/parser/schemas/main_workflow_schema.json - Remove timeout_minutes property
  • Documentation (if any) - Add note about backwards compatibility

Success Criteria

  • Schema only defines timeout-minutes (hyphenated form)
  • Runtime continues to accept both timeout-minutes and timeout_minutes
  • All existing workflows continue to work without changes
  • Schema validation passes
  • Unit tests confirm both forms are accepted at runtime

Source

Extracted from Schema Consistency: Runtime Behavior vs Schema Contracts

Finding: Critical Issue #1 - Dual Field Names

Priority

Medium - Affects API clarity and schema consistency, but not blocking functionality.

Estimated Effort

1 day (including schema updates, testing, and documentation)

AI generated by Discussion Task Miner - Code Quality Improvement Agent

  • expires on Feb 13, 2026, 5:22 AM UTC

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 30, 2026 09:25
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove duplicate timeout_minutes from workflow schema Remove duplicate timeout_minutes from schema while maintaining runtime support Jan 30, 2026
Copilot AI requested a review from pelikhan January 30, 2026 09:38
@pelikhan
Copy link
Contributor

@copilot completely remote timeout_minutes, there is a codemod

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 30, 2026

@copilot completely remote timeout_minutes, there is a codemod

Done! Completely removed timeout_minutes support from both schema and runtime. Users can migrate their workflows using gh aw fix which runs the timeout-minutes-migration codemod.

Changes in commit 4a26aa3:

  • Removed runtime fallback handling
  • Removed deprecated field test file
  • Updated tests to verify field is rejected
  • Workflows using timeout_minutes now fail with "additional properties not allowed" error

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review January 30, 2026 14:05
Copilot AI changed the title Remove duplicate timeout_minutes from schema while maintaining runtime support Completely remove timeout_minutes - use codemod to migrate Jan 30, 2026
@pelikhan pelikhan merged commit 655cf2b into main Jan 30, 2026
121 of 124 checks passed
@pelikhan pelikhan deleted the copilot/remove-duplicate-timeout-minutes branch January 30, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Code Quality] Remove duplicate timeout_minutes from schema (keep only timeout-minutes)

2 participants