Skip to content

[plan] Align pattern constraints between main and MCP config schemas #11709

@github-actions

Description

@github-actions

Objective

Fix pattern constraint mismatches between main_workflow_schema.json and mcp_config_schema.json to ensure consistent validation.

Context

From discussion #11706: The schemas have conflicting pattern constraints that cause inconsistent validation:

  • Environment variable patterns differ (lowercase vs uppercase-only)
  • Container image pattern missing in main schema
  • URL/Command fields lack minLength constraint in main schema

Approach

Update pkg/parser/schemas/main_workflow_schema.json to match mcp_config_schema.json:

  1. Environment variable pattern: Change to ^[A-Z_][A-Z0-9_]*$ (uppercase-only, POSIX standard)
  2. Container image pattern: Add ^[a-zA-Z0-9][a-zA-Z0-9/:_.-]*$
  3. URL/Command minLength: Add minLength: 1 to prevent empty strings

Files to Modify

  • pkg/parser/schemas/main_workflow_schema.json - Update pattern constraints and minLength

Acceptance Criteria

  • Environment variable pattern uses uppercase-only regex
  • Container image pattern added to main schema
  • URL and command fields have minLength: 1
  • Patterns match between both schemas exactly
  • Schema remains valid JSON
  • Run make build to embed updated schema
  • Existing tests continue to pass

AI generated by Plan Command for discussion #11706

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions