Skip to content

Add engine.extensions to workflow schema and generated frontmatter docs#42317

Closed
Copilot wants to merge 5 commits into
mainfrom
copilot/deep-report-quick-win-add-engine-extensions
Closed

Add engine.extensions to workflow schema and generated frontmatter docs#42317
Copilot wants to merge 5 commits into
mainfrom
copilot/deep-report-quick-win-add-engine-extensions

Conversation

Copilot AI commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Pi workflows already support engine.extensions at parse/runtime, but the field was missing from the main workflow schema. That caused valid workflows to fail schema validation and left the generated frontmatter reference incomplete.

  • Schema

    • Adds engine.extensions to $defs.engine_config.properties in pkg/parser/schemas/main_workflow_schema.json
    • Models it as array<string> with Pi-specific semantics and examples
  • Regression coverage

    • Adds a focused schema test covering:
      • valid Pi frontmatter with string extensions
      • invalid frontmatter with a non-string extension entry
    • Extends schema-doc generator coverage so engine.extensions must appear in generated output
  • Generated reference

    • Updates docs/src/content/docs/reference/frontmatter-full.md to include the missing engine.extensions section in the engine config reference
engine:
  id: pi
  extensions:
    - .go
    - .md

Copilot AI and others added 2 commits June 29, 2026 18:35
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add engine.extensions to main_workflow_schema.json Add engine.extensions to workflow schema and generated frontmatter docs Jun 29, 2026
Copilot AI requested a review from pelikhan June 29, 2026 18:38
@pelikhan pelikhan marked this pull request as ready for review June 29, 2026 18:47
Copilot AI review requested due to automatic review settings June 29, 2026 18:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to add support for engine.extensions to the main workflow JSON schema and ensure the generated frontmatter reference includes it, with regression coverage in both Go schema validation tests and the schema-doc generator tests.

Changes:

  • Adds engine.extensions to pkg/parser/schemas/main_workflow_schema.json.
  • Adds schema validation coverage for engine.extensions in pkg/parser/schema_test.go.
  • Extends schema-doc generator tests and updates the generated frontmatter reference output.
Show a summary per file
File Description
scripts/generate-schema-docs.test.js Adds assertions that engine.extensions appears in generated docs (but currently asserts incorrect semantics).
pkg/parser/schemas/main_workflow_schema.json Introduces engine.extensions schema property (but description/examples conflict with existing Pi extension/plugin behavior).
pkg/parser/schema_test.go Adds schema validation test for engine.extensions (but uses values that don’t match how Pi extensions are implemented).
docs/src/content/docs/reference/frontmatter-full.md Updates generated frontmatter reference to include engine.extensions (but wording reflects incorrect semantics).

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 4/4 changed files
  • Comments generated: 5
  • Review effort level: Low

Comment on lines +12056 to +12066
"extensions": {
"type": "array",
"description": "Optional allowlist of file extensions that the Pi engine may modify. Entries should be strings such as '.go' or '.md'. When omitted or empty, the Pi engine uses its default extension behavior.",
"items": {
"type": "string"
},
"examples": [
[".go", ".md"],
[".js", ".ts", ".json"]
]
},
Comment on lines +2288 to +2290
# Optional allowlist of file extensions that the Pi engine may modify. Entries
# should be strings such as '.go' or '.md'. When omitted or empty, the Pi engine
# uses its default extension behavior.
Comment thread pkg/parser/schema_test.go
Comment on lines +483 to +486
"engine": map[string]any{
"id": "pi",
"extensions": []any{".go", ".md"},
},
Comment thread pkg/parser/schema_test.go
Comment on lines +496 to +499
"engine": map[string]any{
"id": "pi",
"extensions": []any{".go", 1},
},
Comment on lines +102 to +104
// Test 8: Verify engine.extensions appears in generated docs
allPassed &= assertContains(output, "extensions:", "Engine extensions field should be present in generated docs");
allPassed &= assertContains(output, "Pi engine may modify", "Engine extensions description should be present in generated docs");
@github-actions

Copy link
Copy Markdown
Contributor

🔍 PR Triage — §28395315609

Field Value
Category bug
Risk low
Score 51 / 100
Action fast_track
Batch bug-fixes-ready (#41830 · #42318 · #42313 · #42317)

Score breakdown: impact 22 + urgency 14 + quality 15

Schema omission fix: engine.extensions was accepted at runtime but rejected at validation. 4 files (+59/-5), CI in progress. Schema + docs + focused tests. Clean low-risk change.

Generated by 🔧 PR Triage Agent · 99.1 AIC · ⌖ 11.6 AIC · ⊞ 5.4K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot All CI checks are passing and the branch is clean. Please address the open inline feedback from the automated Copilot code review before this PR can merge.

Unresolved feedback from @copilot-pull-request-reviewer (review, 5 inline comments):

  • scripts/generate-schema-docs.test.js — assertions test incorrect semantics for engine.extensions
  • pkg/parser/schemas/main_workflow_schema.json — description/examples conflict with existing Pi extension/plugin behavior
  • pkg/parser/schema_test.go — test values don't match how Pi extensions are actually implemented
  • docs/src/content/docs/reference/frontmatter-full.md — wording reflects incorrect semantics

Once those are addressed, please invoke the pr-finisher skill to validate, resolve any remaining review threads, and prepare this PR for merge.

Generated by 👨‍🍳 PR Sous Chef · 141.7 AIC · ⌖ 10.1 AIC · ⊞ 6.7K ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[deep-report] [quick-win] Add engine.extensions to main_workflow_schema.json

4 participants