Skip to content

[plan] Fix version field type handling to match schema definitions #8221

@github-actions

Description

@github-actions

Overview

This tracking issue addresses critical inconsistencies between schema type definitions and runtime type handling for version fields. The schema advertises string | number support with numeric examples, but implementations only handle strings, causing silent configuration failures.

Source: Discussion #8218

Problem Summary

Three version fields accept "type": ["string", "number"] in schema with examples like 20 and 3.11, but runtime parsing only checks for strings:

  • engine.version - affects AI engine version pinning
  • tools.github.version (GitHub MCP) - affects MCP server versioning
  • tools.playwright.version - affects Playwright container versioning

Impact: Users following schema examples have numeric versions silently ignored without errors/warnings, causing unexpected fallback to default versions.

Planned Tasks

  1. Fix engine.version numeric type handling in pkg/workflow/engine.go
  2. Fix GitHub MCP version numeric type handling in pkg/parser/mcp.go
  3. Fix Playwright version numeric type handling in pkg/parser/mcp.go
  4. Add regression tests for numeric version values
  5. Create reusable version parsing helper function

Success Criteria

  • All three version fields accept both string and numeric types as advertised
  • Numeric versions (integers and floats) are properly converted to strings
  • Regression tests prevent future type handling inconsistencies
  • No breaking changes to existing string-based configurations

Risk Assessment

Risk Level: Medium-High

  • Silent failures without error messages
  • Schema examples actively encourage numeric format
  • Low detectability for users

Mitigation: Localized to 3 specific code locations, straightforward fixes using existing patterns in the codebase (e.g., max-turns field implementation).

AI generated by Plan Command for discussion #8218

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions