[Schema Consistency] Schema Consistency Audit - 2026-04-19 #27145
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Schema Consistency Checker. A newer discussion is available at Discussion #27270. |
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.
-
Schema consistency analysis across
main_workflow_schema.json, parser/compiler code, documentation, and.github/workflows/files. Used new Cross-Reference Map strategy (4-way intersection).Summary
additionalPropertiesfalse✓Critical Issues
1.
disable-model-invocation— Schema Field With No Compiler ImplementationSeverity:⚠️ Medium-High
main_workflow_schema.json): definesdisable-model-invocationas a top-levelbooleanfieldpkg/parser/include_processor.goas an entry in a "known fields" whitelist — the compiler never reads this value and never changes behaviour based on itfrontmatter-full.md(no explanatory section)If a user sets
disable-model-invocation: trueexpecting the agent to skip model calls, nothing will happen — the field is silently ignored by the compiler.Recommendation: Either implement the field in the compiler (propagate to engine config) or add a deprecation notice/warning when the field is present.
Medium Issues
2.
create-code-scanning-alertvscreate-code-scanning-alerts— Plural/Singular Naming SplitSeverity:⚠️ Medium
The field name is inconsistent across layers:
create-code-scanning-alert(singular)safe-outputs.md,frontmatter-full.md)create-code-scanning-alert(singular)create_code_scanning_alert.go:24outputMap["create-code-scanning-alert"](singular)SafeOutputsConfigstruct yaml tagyaml:"create-code-scanning-alerts,omitempty"(plural)daily-safe-output-integrator.mdmarkdown contentcreate-code-scanning-alerts(plural)The struct's yaml tag is plural but all external-facing surfaces use singular. Since
extractSafeOutputsConfig()processes safe-outputs via direct map access (not YAML struct deserialization), this doesn't cause a runtime bug — but it misleads developers reading the struct and is propagated into thedaily-safe-output-integrator.mdworkflow which documents the plural form to users.Recommendation: Rename the struct field yaml tag to
yaml:"create-code-scanning-alert,omitempty"(singular) and updatedaily-safe-output-integrator.mdreferences.Relevant code locations
pkg/workflow/compiler_types.go—SafeOutputsConfig.CreateCodeScanningAlertsyaml tagpkg/workflow/create_code_scanning_alert.go:24— correct singular map access.github/workflows/daily-safe-output-integrator.mdlines 100, 154, 412, 423, 6413.
SafeOutputsConfigUsesyaml:Tags But Is Parsed Via JSONSeverity:⚠️ Medium (latent / architectural)
ParseFrontmatterConfig()(pkg/workflow/frontmatter_parsing.go) converts the raw frontmattermap[string]any→ JSON →FrontmatterConfigviajson.Marshal/json.Unmarshal. This meansjson:tags are used for field mapping,yaml:tags are ignored.SafeOutputsConfig(stored inFrontmatterConfig.SafeOutputs) uses onlyyaml:tags. When JSON-unmarshaling thesafe-outputsblock intoSafeOutputsConfig, all hyphenated keys likecreate-issue,add-comment, etc. will not be matched (JSON unmarshal falls back to exported field name, case-insensitive —CreateIssues≠create-issue).FrontmatterConfig.SafeOutputsis therefore always nil/empty afterParseFrontmatterConfig. Actual processing usesextractSafeOutputsConfig()(direct map access), so there is no runtime bug today. But this is a trap for future callers who accessparsedFrontmatter.SafeOutputsexpecting it to be populated.Recommendation: Either add
json:tags toSafeOutputsConfigmatching the hyphenated keys, or add a code comment onFrontmatterConfig.SafeOutputswarning that it is never populated viaParseFrontmatterConfig(intentional — useextractSafeOutputsConfig()instead).Relevant code locations
pkg/workflow/frontmatter_parsing.go:12-32— JSON marshal/unmarshal pathpkg/workflow/compiler_types.go:526—SafeOutputsConfigstruct (yaml tags only)pkg/workflow/safe_outputs_config.go:54—extractSafeOutputsConfig()(correct path)pkg/workflow/frontmatter_types.go:207—FrontmatterConfig.SafeOutputs4.
FrontmatterConfigHas Fields Not In Schema (version,include)Severity:⚠️ Low-Medium
The schema has
"additionalProperties": false. Two fields exist inFrontmatterConfigthat are absent from the schema:Version string \json:"version,omitempty"`— serialized back to map infrontmatter_serialization.go:81`Include any \json:"include,omitempty"`— serialized back to map infrontmatter_serialization.go:212`No workflows in
.github/workflows/currently use these fields at the top level, so schema validation doesn't fail. However:fc.Versionand then round-trips back to a map that is re-validated, schema validation would fail.versionmay be used for Copilot custom-agent files (which aren't validated against the main schema);includeappears to be an internal/legacy import alias forimports.Recommendation: Add
versionandincludeto the schema (with deprecation notes if appropriate) or document in code comments that these fields bypass schema validation.Documentation Gaps
5. Fields in Schema With No Dedicated Documentation Section
The following schema-defined fields are missing from the main
frontmatter.mdreference and only appear (if at all) infrontmatter-full.mdor scattered docs:tracker-idfooters.mdcheck-for-updatesfrontmatter-full.mdrun-install-scriptsfrontmatter-full.mdsecret-maskingimports.mdobservabilitycompilation-process.md,artifacts.mddisable-model-invocationfrontmatter-full.mdRecommendation: Add brief sections for each of these fields to
frontmatter.md(or cross-reference the dedicated doc files).Schema vs Code Coverage
Schema fields not in `FrontmatterConfig` struct (handled via direct map access)
These fields exist in the schema but are not typed in
FrontmatterConfig. They are handled by reading directly fromfrontmatter[key]in specific compiler files:botspkg/workflow/role_checks.goviaonMap["bots"]commandpkg/parser/schema_triggers.godependenciespkg/workflow/compiler_orchestrator_tools.gogithub-apppkg/workflow/workflow_github_app.goinferpkg/parser/include_processor.gowhitelist onlydisable-model-invocationdisable-model-invocationpkg/parser/include_processor.gowhitelist onlyDeprecated/removed tools in schema not in `ToolsConfig` struct
tools.grepCustominline maptools.serenashared/mcp/serena.md)Custominline mapThese are handled gracefully (no error) but silently ignored. The schema's deprecation message guides users correctly.
Recommendations
disable-model-invocation— either wire it to the compiler or emit a warning/error when usedcreate-code-scanning-alertyaml tag to use singular inSafeOutputsConfigstruct, updatedaily-safe-output-integrator.mdjson:tags toSafeOutputsConfigor document thatFrontmatterConfig.SafeOutputsis always nilversion/includeto schema or restrict their use to non-validated contextstracker-id,check-for-updates,run-install-scripts,secret-masking,observabilityStrategy Performance
References:
Beta Was this translation helpful? Give feedback.
All reactions