[Schema Consistency] Type Inconsistency: version Fields Reject Numeric Values Despite Schema #8218
Replies: 1 comment 1 reply
-
|
/plan |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
Analysis of runtime type behavior versus schema type definitions revealed 2 critical inconsistencies where numeric version values are silently ignored despite schema advertising
string | numbersupport. Additionally, confirmed 1 previously-reported issue has been fixed (expires hours support).Key Finding: Schema advertises that
versionfields accept numbers with examples like20and3.11, but implementations only handle strings, causing user configurations to fail silently without error messages.Critical Issues
🔴 Issue 1: engine.version Rejects Numeric Types
Location:
pkg/workflow/engine.go:66-69Problem: Schema defines
engine.versionas"type": ["string", "number"]with examples[20, 3.11], but code only accepts strings:Schema Evidence:
{ "type": ["string", "number"], "examples": ["beta", "stable", 20, 3.11] }Impact: Users following schema examples with
engine.version: 20have configuration silently ignored with no error/warning. Falls back to default version, causing confusion when version-specific features don't work.Recommended Fix: Apply the pattern already used for
max-turnsfield (same file, lines 81-87):🔴 Issue 2: MCP Version Fields Reject Numeric Types (2 Locations)
Locations:
pkg/parser/mcp.go:372(GitHub MCP server)pkg/parser/mcp.go:447(Playwright container)Problem: Multiple MCP version fields advertise
string | numberbut only handle strings.Example (GitHub MCP, line 372):
Schema Examples:
Impact: Configurations like
tools.playwright.version: 1.41silently ignored. Particularly problematic for version pinning in production workflows.Recommended Fix: Create reusable helper:
Positive Findings ✅
Previously Reported Issue Fixed
The
expiresfield hours (h/H) support, reported as missing in 2025-12-21 analysis, is now properly implemented inpkg/workflow/config_helpers.go:229-240. This demonstrates the consistency checking workflow is effective - issues get identified and fixed.Excellent Type Coercion Quality
The codebase demonstrates high-quality type handling in most areas:
Well-Implemented Examples:
max-turnsfield (engine.go:81-87) ✅expiresfield (config_helpers.go:177-202) ✅ParseIntFromConfighelper (config_helpers.go:260-298) ✅The issue is localized gaps, not systemic poor design.
Recommendations
Immediate Actions (Priority: HIGH)
Total Critical Fixes: ~1 hour
Follow-Up Actions
parseVersionValue()helper for DRYRisk Assessment
Overall Risk: MEDIUM-HIGH
Why This Matters:
Mitigation:
Analysis Details
Strategy: Strategy-017 (Runtime Type Behavior vs Schema Type Definitions)
Date: 2025-12-30
Findings: 2 critical issues (3 code locations), 1 confirmed fix
Effectiveness: Very High
Methodology:
"type": ["string", "number"]Files Analyzed:
pkg/parser/schemas/main_workflow_schema.jsonpkg/workflow/engine.gopkg/parser/mcp.gopkg/workflow/config_helpers.goAction Items Summary
Next Analysis: Scheduled in ~7-10 days to validate fixes
Beta Was this translation helpful? Give feedback.
All reactions