[Schema Consistency] Schema Consistency Check - 2026-05-28 #35425
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Schema Consistency Checker. A newer discussion is available at Discussion #35656. |
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
Today's run used three brand-new detection strategies rather than re-running the cached set. Two of them uncovered net-new findings — most notably dead entries in
SharedWorkflowForbiddenFieldsand an undocumented Copilot interop escape hatch inIgnoredFrontmatterFields. Most schema defaults were verified to match the compiler.Critical Issues
None. All discovered issues are documentation or dead-code cleanups, not behavioral bugs.
New Findings (this run)
1. Dead entries in
SharedWorkflowForbiddenFields(pkg/constants/constants.go:325-343)SharedWorkflowForbiddenFieldslists fields that are forbidden at the top level of shared/included workflows. Two entries name fields that do not exist in the main schema and have noyaml:tag anywhere inpkg/parser/orpkg/workflow/as top-level keys:"roles""command"The top-level schema has
additionalProperties: false(verified viajq '.additionalProperties'→false), so any author writingroles:orcommand:at the top of a main workflow would already be rejected by schema validation. TheSharedWorkflowForbiddenFieldsentry never fires.Fix: Drop the
"roles"and"command"entries fromSharedWorkflowForbiddenFields(or, ifroleswas an intentional placeholder for a future feature, add a tracking comment). Note:timeout_minutes(underscore variant) should remain — it is the migration target ofpkg/cli/codemod_timeout_minutes.go.2. Undocumented
user-invokableescape hatch (pkg/constants/constants.go:309)IgnoredFrontmatterFields = []string{"user-invokable"}silently dropsuser-invokablefrom schema validation. The comment on line 308 explains:But a
grep -r "user-invokable" docs/returns zero hits. Authors who want to ship a workflow that doubles as a Copilot custom agent have no way to discover this interop affordance without readingconstants.go.Fix: Add a short interoperability note under
docs/src/content/docs/reference/frontmatter.mdlisting the ignored fields and why each is tolerated.3. Asymmetric
expiresdefault declaration (schema-only)safe-outputs.create-discussion.expiresdeclares"default": 7in the schema (integer-days form) and the compiler installs a 168-hour (7-day) fallback atpkg/workflow/create_discussion.go:55-57.safe-outputs.create-issue.expireshas nodefaultin the schema and the compiler installs no default at runtime.The two fields share the exact same
oneOfshape (integer/relative-time string/false). The asymmetry is intentional behaviorally (issues do not auto-expire by default; discussions do), but the schema-leveldefaultannotation surfaces only on the discussion path. IDEs and downstream tooling that read JSON-Schema defaults see one but not the other.Fix: Either drop the
default: 7fromcreate-discussion.expires(since the runtime fallback is what actually matters and the prose description already says "Defaults to 7 days") or add a matchingdefaultannotation with a description that explains the contrast oncreate-issue.expires. Documentation indocs/src/content/docs/reference/safe-outputs.md:1057already shows the divergent intent.Defaults that were verified consistent
properties.engine.default = copilotconstants.DefaultEngine = CopilotEngine(pkg/constants/engine_constants.go:34)properties.max-effective-tokens.default = 25000000constants.DefaultMaxEffectiveTokens = 25000000(pkg/constants/constants.go:267)properties.max-runs.default = 500constants.DefaultMaxRuns = 500(pkg/constants/constants.go:270)properties.sandbox.oneOf.1.properties.mcp.properties.port.default = 8080constants.DefaultMCPGatewayPort = 8080(pkg/constants/constants.go:105)safe-outputs.close-issue.state-reason.default = completedsafe-outputs.upload-artifact.max-size-bytes.default = 104857600AddDefault("max-size-bytes", ...)(pkg/workflow/safe_outputs_config.go:1537)safe-outputs.max-patch-size.default = 1024config.MaximumPatchSize = 1024(pkg/workflow/safe_outputs_config.go:465)Re-confirmed Findings (no progress since prior runs)
check-for-updates,disable-model-invocation,run-install-scriptshave zero mentions in curated docs (only in auto-generatedfrontmatter-full.md)docs/src/content/docs/reference/applyTostill in parservalidFieldsmap;schema_utilities.go:14comment still falsely claimsapplyTois validated by the schemapkg/parser/include_processor.go:267,pkg/parser/schema_utilities.go:14inline-sub-agentsandrate-limitdescribe themselves as deprecated in prose but lack the JSON Schemadeprecated: trueflag → invisible to IDE toolingpkg/parser/schemas/main_workflow_schema.jsoncheck-for-updatesandrun-install-scriptslink tofrontmatter/#<field>anchors that do not exist infrontmatter.mdpkg/parser/schemas/main_workflow_schema.json$defs.templatable_integeris defined but never$refd; siblingtemplatable_booleanis referenced. 62 inline `integerpkg/parser/schemas/main_workflow_schema.jsonengine.idschema declarestype: stringand enumerates valid values in prose only (no JSON Schemaenum); compiler also handles a"custom"id not listed in the prosepkg/parser/schemas/main_workflow_schema.json,pkg/workflow/compiler_yaml.go:772Documentation Gaps
user-invokableCopilot interop is invisible to authors (new finding 2).check-for-updatesandrun-install-scriptspoint to non-existent doc headings (strategy-12).Schema Improvements Needed
enum: ["claude", "codex", "copilot", "gemini", "opencode", "crush", "pi", "custom"]toproperties.engine.oneOf.1.properties.idso IDE validation catches engine typos at edit time (the test corpus already contains acopiliottypo).integer|stringduplicates to$ref: "#/$defs/templatable_integer"(already defined, currently unreferenced).deprecated: true(and ideallyx-deprecation-message) toinline-sub-agentsandrate-limittop-level properties.default: 7fromcreate-discussion.expiresor add a matchingdefaultannotation tocreate-issue.expireswith an explanatory description.Parser / Compiler Updates Required
"applyTo"entry fromvalidFieldsinpkg/parser/include_processor.go:267and the stale claim inpkg/parser/schema_utilities.go:14."roles"and"command"frompkg/constants/constants.goSharedWorkflowForbiddenFields.rate-limitdebug log to a user-facing deprecation warning (or drop the field — it has no schema deprecation flag either).Workflow Violations
None observed at top level. The
field_gaps.in_used_not_schemaentries in the pre-computed diff (e.g.affected_sections,independence,verdict) are all nested keys insideexperiments.*ortools.serena.*— not top-level frontmatter — and are expected.Recommendations
roles,commandinSharedWorkflowForbiddenFields;applyToinvalidFields). These are the cheapest cleanups and remove confusing code paths that never fire.user-invokableCopilot interop affordance indocs/src/content/docs/reference/frontmatter.md— currently invisible to anyone who has not readconstants.go.engine.idschema enum — single highest-leverage edit; converts a class of runtime errors into IDE squiggles at edit time.check-for-updatesandrun-install-scriptsand write the missing curated doc sections (strategies-7 and -12 share the same root cause — fix together).deprecated: truetoinline-sub-agentsandrate-limitso IDEs surface the deprecation.integer|stringduplicates to$refthe existing-but-unusedtemplatable_integerdef.Strategy Performance
IgnoredFrontmatterFieldsgrowsAll three new strategies have been added to
/tmp/gh-aw/cache-memory/strategies.json. Strategy-15 is the most extensible: as new safe-output entities accumulatedefaultannotations, this one will keep paying off.Next Steps
"roles"and"command"fromSharedWorkflowForbiddenFields(pkg/constants/constants.go)"applyTo"fromvalidFields(pkg/parser/include_processor.go:267) and update the misleading comment atpkg/parser/schema_utilities.go:14enum: [...]toengine.idin main schemadeprecated: truetoinline-sub-agentsandrate-limituser-invokableinterop indocs/src/content/docs/reference/frontmatter.mdcheck-for-updatesandrun-install-scriptsinfrontmatter.mdinteger|stringpatterns to$reftemplatable_integercreate-issue.expiresandcreate-discussion.expiresdefault annotationsReferences:
Beta Was this translation helpful? Give feedback.
All reactions