[Schema Consistency] Consistency Check 2026-05-16 — Stale engine list in schema descriptions, unenforced engine.agent restriction #32580
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Schema Consistency Checker. A newer discussion is available at Discussion #32772. |
Beta Was this translation helpful? Give feedback.
0 replies
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
Found 2 new actionable inconsistencies and confirmed 1 previously-reported issue is fixed. The recurring pattern is around the engine_config $def: the schema's free-text descriptions list 5 built-in engines while the engine registry registers 7 (
opencodeandpiare missing from the schema descriptions). A second finding shows that theengine.agentfield's documented restriction ("copilot engine only") is not actually enforced by the compiler — the field is silently ignored when set on other engines.Summary
engine-registry-vs-schema(proven, 2nd consecutive hit) andschema-restriction-vs-runtime-enforcement(new)/tmp/gh-aw/agent/schema-diff.json(consumed in step 0)Critical Issues
1. Schema engine-id descriptions are stale —
opencodeandpiare missing in 4 placesSeverity: High (user-facing schema confusion; recurring — flagged 2026-05-15, still present)
The engine registry in
pkg/workflow/agentic_engine.go:440-446registers 7 engines:But four description strings in
pkg/parser/schemas/main_workflow_schema.jsonstill list only 5:engine_config.oneOf[0](string form)"built-in ('claude', 'codex', 'copilot', 'gemini', 'crush') or a named catalog entry"engine_config.oneOf[1].properties.id"built-in ('claude', 'codex', 'copilot', 'gemini', 'crush') or a named catalog entry"engine_config.runtime.id"Runtime adapter identifier (e.g. 'codex', 'claude', 'copilot', 'gemini', 'crush')"engine_config.provider.id(or related)"Unique engine identifier (e.g. 'copilot', 'claude', 'codex', 'gemini', 'crush')"docs/src/content/docs/reference/engines.md(the engines reference page) correctly lists all 7 — only the schema descriptions are stale. So the schema description is the canonical inconsistency.Fix: update all 4 descriptions to
'claude', 'codex', 'copilot', 'gemini', 'opencode', 'crush', 'pi'(or a shorter "see docs" pointer that won't drift again).2.
engine.agentclaims "copilot engine only" but no validation enforces itSeverity: Medium (silent misconfiguration)
Schema definition at
pkg/parser/schemas/main_workflow_schema.json($defs.engine_config.oneOf[1].properties.agent):{ "type": "string", "description": "Agent identifier to pass to copilot --agent flag (copilot engine only). Specifies which custom agent to use for the workflow." }The field is only read in
pkg/workflow/copilot_engine_execution.go:85(Copilot's executor). No code path inpkg/workflow/engine_validation.goorpkg/workflow/agent_validation.gorejects (or warns about)engine.agentwhenengine.idis anything other thancopilot. Compare with the similar pattern invalidateUniversalLLMConsumerModelatpkg/workflow/agent_validation.go:162, which does enforce engine-conditional requirements foropencode/crush.Impact: A user setting
engine: { id: claude, agent: my-agent }gets no error and theagentvalue is silently ignored. The schema and docs assert a restriction the compiler doesn't enforce.Fix options: (a) add a validator that errors when
engine.agentis set on a non-copilot engine, mirroringvalidateUniversalLLMConsumerModel; or (b) relax the description to "used by the copilot engine; ignored by other engines" if silent-ignore is the intended behavior.Confirmed Fixed Since Last Run
tracker-idmaxLength is now validated ✅The 2026-05-15 run reported that
extractTrackerIDonly enforcedminLengthdespite the schema declaringmaxLength: 128. Verified today atpkg/workflow/frontmatter_extraction_metadata.go:106-114:Both bounds and the pattern are now enforced. No action needed.
Pre-computed gaps — interpretation notes
The schema-diff generator's
field_gapsblock needs context to read correctly:in_schema_not_parser(57 fields): All top-level schema fields are listed here becausepkg/parser/*.goonly declares yaml-tagged structs for input parameter schemas (type,required,default,options) — main frontmatter is processed inpkg/workflow/*.goviamap[string]anyaccess, not via yaml struct tags. This category is structural noise, not a real gap.in_schema_not_workflow(40 fields): Same root cause — fields likeexperiments,features,metadataare read byfrontmatter["key"]map access (seepkg/workflow/compiler_experiments.go:60,frontmatter_extraction_metadata.go:19), not via yaml struct tags. Real gap detection requires also grepping forfrontmatter["<field>"]patterns.in_used_not_schema(34 entries): As noted in the 2026-05-15 cache strategyused-not-schema-false-positive-detection, these are mostly content inside markdown code-fences within workflow.mdfiles (e.g., thedaily-subagent-optimizer.mdtemplate). The diff generator is matching YAML-looking prose. Worth fixing in the diff generator itself.A more accurate field-gap analysis would need to either (1) parse workflow frontmatter blocks only (stop at
---), or (2) build a hybrid index of yaml tags plus literalfrontmatter["key"]lookups inpkg/workflow/*.go.Recommendations
pkg/parser/schemas/main_workflow_schema.json(lines ~10192, 10200, 10422, 10544). Consider replacing the inline list with a stable phrase like"a built-in engine ID (see docs/reference/engines.md) or a named catalog entry"so future engine additions don't reintroduce this drift.engine.agenton non-copilot engines, or relax the schema description to match the silent-ignore behavior. Mirror the pattern inpkg/workflow/agent_validation.go:155-175(validateUniversalLLMConsumerModel).frontmatter["key"]lookups when building the parser/workflow index. This will eliminate the bulk of the false-positives inin_schema_not_*andin_used_not_schema.schema-restriction-vs-runtime-enforcementnext run on other engine_config fields containing "only"/"requires"/"must use" phrases.Strategy Performance
engine-registry-vs-schema(proven, success_count → 2) andschema-restriction-vs-runtime-enforcement(new)Next Steps
main_workflow_schema.jsonengine.agent: validator vs. description relaxschema-constraints-vs-extractionon other $defs withmaxLength/patternconstraintsReferences:
Beta Was this translation helpful? Give feedback.
All reactions