Skip to content

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

@github-actions

Description

@github-actions

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions