[Schema Consistency] Schema Consistency Check 2026-06-13 — engine.extensions parsed but missing from schema (blocks Pi engine feature) #39029
Replies: 0 comments
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.
-
Summary
This run drilled into nested config objects rather than top-level fields. The pre-computed
field_gapsare dominated by top-level keys that are accessed viamap[string]any(no yaml tags) and are well-covered, so the high-signal work is in sub-objects guarded byadditionalProperties: false. Diffing the keys the parser actually reads from theengine:object against the schema'sengine_configbranches surfaced a real, working feature that schema validation rejects.Critical Issues
🔴
engine.extensionsis parsed and used by the Pi engine but absent from the schemaThe compiler fully supports an
extensionsarray underengine:(used by the Pi engine to install extensions), but the JSON schema does not declare it in anyengine_configbranch — and every branch setsadditionalProperties: false. Because frontmatter is validated against the schema at compile time, any real workflow using this feature fails validation and shows editor squiggles, even though the compiler would handle it correctly.Evidence:
pkg/workflow/engine.go:468-490// Extract optional 'extensions' field (array of strings; used by the Pi engine)if extVal, hasExt := engineObj["extensions"]; hasExt { ... config.Extensions = ... }pkg/workflow/engine.go:74→Extensions []stringpkg/workflow/pi_engine.go:204-218generates an install step per extension (example values["@pi/web-search", "@pi/file-browser"], seepkg/workflow/cache_memory_prompt_test.go:154)pkg/parser/schemas/main_workflow_schema.json→$defs.engine_confighas noextensionsproperty in any of its 6oneOfbranches, alladditionalProperties: falseparser.ValidateMainWorkflowFrontmatterWithSchemaAndLocation(...)atpkg/workflow/compiler_orchestrator_frontmatter.go:140(usessanthosh-tekuri/jsonschema/v6)docs/src/content/docs/reference/engines.mdConfirmation it is the only such gap: diffing every
engineObj["key"]the parser reads against the union of allengine_configbranch properties yields exactly one parser-read key missing from the schema:extensions. (Schema-only keysdescription,display-name,models,options,runtime-idbelong to the AWF custom-provider branch and are handled inawf_config.go— not a gap.)Impact: A working compiler feature is effectively unusable through the normal validated path.
engine: { id: pi, extensions: ["@pi/web-search"] }errors withadditionalProperties 'extensions' not allowed.Suggested fix
Add
extensionsto the Pi-capableengine_configbranch(es) inmain_workflow_schema.json:Then document it under
docs/src/content/docs/reference/engines.md. Alternatively, ifengine.extensionsis considered dead/experimental, remove the parser path so the two sources agree.Schema Improvements Needed
🟡 Low priority — re-confirmed:
dispatch-repositorydash alias not in schemaThe parser accepts both
dispatch_repository(underscore, preferred) anddispatch-repository(dash) as a safe-output key (pkg/workflow/dispatch_repository.go:38-39), but the schema only definesdispatch_repository(main_workflow_schema.json:9095) whilesafe-outputshasadditionalProperties: false. The dash spelling is therefore rejected by schema validation despite parser/test/doc support. Fix: either add adispatch-repositoryalias property to the schema, or drop the dash alias from the parser and docs. (Tracked since 2026-06-12; still open.)Parser Updates Required
None — the parser is correct in both findings; the schema is the lagging source of truth.
Workflow Violations
No
.github/workflows/*.mdfile currently usesengine.extensionsor thedispatch-repositorydash spelling, so no existing workflow is broken. The risk is for authors who try to use these documented/working features.Recommendations
extensions(array of strings) to the Pi-capableengine_configbranch inmain_workflow_schema.jsonand document it inengines.md.dispatch-repositoryalias gap by adding the dash alias to the schema or removing it from parser/docs.engineObj["..."]reads inengine.goagainst the union ofengine_configbranch properties, failing when a parser-read key is absent from the schema. This sameadditionalProperties:falsesub-object diff generalizes tosafe-outputs.*andtools.*.Strategy Performance
additionalProperties:falseparser-vs-schema diff to other nested objects (safe-outputsentries,toolssub-objects) on the next runNext Steps
engine.extensionsto the schemaengine.extensionsinengines.mddispatch-repositorydash alias (schema add or parser/doc removal)References: §27459320087
Beta Was this translation helpful? Give feedback.
All reactions