Skip to content

[plan] Fix engine field duplication in included_file_schema.json #7945

@github-actions

Description

@github-actions

Objective

Eliminate the engine field duplication risk by changing the included schema to use $ref instead of an inline definition.

Context

Priority: CRITICAL
Category: Schema Structure / Maintenance Burden

Currently:

  • Main Schema: Uses $ref: "#/$defs/engine_config" (centralized definition)
  • Included Schema: Uses inline definition with identical oneOf structure

This creates a maintenance burden where every engine schema change must be manually duplicated across two files, with risk of schema drift.

Approach

  1. Open pkg/parser/schemas/included_file_schema.json
  2. Locate the engine field definition (currently inline with oneOf structure)
  3. Replace the inline definition with: "$ref": "#/$defs/engine_config"
  4. Ensure the $defs/engine_config definition exists in the included schema (if not, copy from main schema)
  5. Rebuild the binary with make build (schemas are embedded via //go:embed)
  6. Test with a workflow that uses included files with engine configurations

Files to Modify

  • Update: pkg/parser/schemas/included_file_schema.json
    • Change engine field from inline to $ref
    • Ensure $defs/engine_config is present

Acceptance Criteria

  • Included schema uses $ref: "#/$defs/engine_config" for engine field
  • No inline duplication of engine config structure
  • Schema validates correctly with test workflows
  • Binary rebuilds successfully with make build
  • Included files with engine configs compile correctly

Testing

# Rebuild binary after schema changes
make build

# Test compilation with included file
./gh-aw compile test-workflow-with-includes.md

AI generated by Planning Assistant
Related to #7944

AI generated by Plan Command for discussion #7935

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions