[Schema Consistency] Audit 2026-05-27 — Schema enum gaps, unused $def, plus re-confirmed doc/deprecation issues #35149
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Schema Consistency Checker. A newer discussion is available at Discussion #35425. |
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.
-
Summary
strategy-13($defs reference integrity),strategy-14(enum vs prose-only enumeration)Critical Issues
🆕 1.
engine.idhas no enum constraint — typos pass schema validationengine.idinpkg/parser/schemas/main_workflow_schema.json(engine_config def) is declared{"type": "string"}with the valid values listed only in the description prose:The existing error-formatting test at
pkg/workflow/compiler_error_formatting_test.go:246uses a literal"copiliot"typo because the only validation today happens at compile time, not in the editor / schema validator. Adding anenum: [...]constraint (with thenamed catalog entrycarve-out handled viaoneOfif needed) would catch these at edit time in any JSON-schema-aware IDE.Additionally, the engine model-env switch at
pkg/workflow/compiler_yaml.go:772includes:"custom"is not listed in the schema description's enumeration of valid engine ids, but the compiler explicitly handles it — pick one truth.🆕 2. Unused
templatable_integer$def, 62 inline duplicates$defs.templatable_integeris defined in the schema (with a good description) but is referenced from zero places:Its sibling
$defs.templatable_booleanis referenced 5+ times and works exactly the way you'd expect. Meanwhile the schema contains 62 inline copies of the sameoneOf: [{type: integer}, {type: string, pattern: ^\$\{\{...\}\}$}]shape — e.g.rate-limit.max-runs,rate-limit.max, plus dozens of similar locations.Folding those duplicates into
$ref: "#/$defs/templatable_integer"would (a) shrink the schema, (b) make GitHub Actions expression support universally consistent (some inline copies omitminimum: 0, others omit the templating string variant), and (c) put the unused$defto work.Documentation Gaps
3. Three fields entirely undocumented in curated docs (re-confirmed)
The following top-level fields have zero mentions anywhere in
docs/src/content/docs/outside the auto-generatedfrontmatter-full.md:check-for-updatesdisable-model-invocationrun-install-scriptsThese are reachable via the schema and surfaced in tooling, but a user reading the curated reference will never learn what they do.
4. Broken
reference/frontmatter/#anchorlinks in schema descriptionsThe schema descriptions for
check-for-updatesandrun-install-scriptsboth link tofrontmatter/#<field>anchors that do not resolve to any heading indocs/src/content/docs/reference/frontmatter.md. Fixing #3 and #4 together is a single PR.Schema Improvements Needed
5. Prose-only deprecation flags (re-confirmed)
Two top-level fields are described as deprecated/legacy but lack the JSON Schema
deprecated: trueflag, so IDE deprecation strikethrough never fires and the compiler'swarnDeprecatedFrontmatterFields()infrastructure can't see them either:deprecated:flagrate-limit"Legacy alias for 'user-rate-limit'..."inline-sub-agents"Deprecated switch for inline sub-agent support..."For
rate-limit,pkg/workflow/role_checks.go:301only logs"Extracted legacy rate-limit configuration"via the debug-onlyroleLog.Print— not a user-visible warning. Adding"deprecated": trueto both schema entries hooks them into the existing warning machinery atpkg/workflow/compiler_orchestrator_tools.go:436-460.Parser Updates Required
6.
applyTois a deadvalidFieldsallowlist entry (re-confirmed)pkg/parser/include_processor.go:267still lists"applyTo": truein the valid-fields allowlist for shared workflows, and the comment atpkg/parser/schema_utilities.go:14claims:This is false:
applyTodoes not appear as a top-level property inmain_workflow_schema.jsonand isn't used by any workflow file or referenced anywhere in implementation logic. Either restore real schema/implementation support or remove the entry and the misleading comment.Workflow Violations
No new workflow-side violations beyond those already covered by
field_gaps.in_used_not_schema(which is dominated by nested keys flattened by the diff script — none of the remaining names appear to be real new top-level violations).Recommendations
Schema PR — enum + dead def cleanup (new, high impact)
enum(oroneOfwith a named-catalog-entry escape hatch) onengine_config.oneOf[1].properties.idand on the bare-string variant; align withpkg/workflow/compiler_yaml.go:764-776."custom"is officially supported. If yes, document and add to the enum / description. If no, treat it as thedefault:arm and remove thecase "custom"branch.integer | $\{\{ ... \}\}patterns to$ref: "#/$defs/templatable_integer"(≈62 sites).Deprecation PR
"deprecated": trueto therate-limitandinline-sub-agentsschema entries.warnDeprecatedFrontmatterFields()then surfaces a user-visible warning when either is used.Docs PR
check-for-updates,disable-model-invocation, andrun-install-scriptsindocs/src/content/docs/reference/frontmatter.md, with heading slugs that match the existing schema links.Parser cleanup PR
"applyTo"frompkg/parser/include_processor.go:267or restore real support.pkg/parser/schema_utilities.go:14.Strategy Performance
engine.idenum +custommismatch)Cache updated at
/tmp/gh-aw/cache-memory/strategies.jsonwith two new strategies (strategy-13,strategy-14). Both should be reused in future cycles — they target schema-internal hygiene, which is independent of code/doc churn.Next Steps
engine.idenum constraint (and decide the fate of"custom")integer | stringpatterns to use$defs/templatable_integer"deprecated": truetorate-limitandinline-sub-agentsschema entriescheck-for-updates,disable-model-invocation,run-install-scriptsapplyToallowlist entry and fix the stale commentReferences:
Beta Was this translation helpful? Give feedback.
All reactions