Repository navigation
[Schema Consistency] Schema Consistency Report - 2026-04-30 #29250
Closed
Replies: 1 comment
|
This discussion was automatically closed because it expired on 2026-05-01T04:54:45.702Z.
|
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.
Analysis of schema, parser/compiler, documentation, and workflow files for inconsistencies. Strategy used: Hybrid — Schema vs Code Struct Comparison + Engine Enum Cross-check + Documentation Coverage Audit (first run; no prior cache).
Summary
Critical Issues
1.
safe-outputs.create-code-scanning-alert— Singular/Plural Naming MismatchImpact: Medium — Naming inconsistency between the struct yaml tag and all other references.
main_workflow_schema.json:6345)create-code-scanning-alert(singular)create_code_scanning_alert.go:24)outputMap["create-code-scanning-alert"](singular)safe-outputs.md:690)create-code-scanning-alert(singular)SafeOutputsConfigstruct yaml tag (compiler_types.go:575)yaml:"create-code-scanning-alerts,omitempty"(plural)The Go struct yaml tag says
create-code-scanning-alerts(plural) while the schema, parsing code, and documentation all usecreate-code-scanning-alert(singular). Since parsing is done manually via map key lookup rather thanyaml.Unmarshal, this doesn't cause a runtime bug — but it is misleading to developers reading the struct, and could cause confusion if any tooling relies on marshaling aSafeOutputsConfigstruct back to YAML.Recommended fix: Change the struct yaml tag at
pkg/workflow/compiler_types.go:575:2.
engineSchema Missingopencodeas Supported Built-inImpact: Medium — Schema validation and IDE autocompletion will not recognize
opencodeas a valid engine string.main_workflow_schema.json)"Engine name: built-in ('claude', 'codex', 'copilot', 'gemini', 'crush') or a named catalog entry"constants/engine_constants.go:24)OpenCodeEngine EngineName = "opencode"constants/README.md:55)AgenticEngines = ["claude", "codex", "copilot", "gemini", "opencode", "crush"]engines.md)opencodein the engine comparison tableThe
opencodeengine is fully implemented in code and documented, but not mentioned in the schema's engine string description. This means schema-based validators and IDE plugins will not autocomplete or validateengine: opencode.Recommended fix: Update the engine string description in
pkg/parser/schemas/main_workflow_schema.json:Also update the
engine_config$defsobject id descriptions in the same file.Documentation Gaps
3. Nine
safe-outputsFields Missing from Mainsafe-outputs.mdImpact: Low–Medium — Fields are documented in
frontmatter-full.mdor spec docs, but users consulting the primarysafe-outputs.mdreference won't find them.The following schema properties are defined under
safe-outputsbut not covered indocs/src/content/docs/reference/safe-outputs.md:activation-commentsfrontmatter-full.mdcreate-agent-task$commentonly (deprecated)id-tokenfrontmatter-full.mdmark-pull-request-as-ready-for-reviewfrontmatter-full.mdonlymax-patch-filesfrontmatter-full.mdmerge-pull-requestsafe-outputs-specification.md,glossary.mdreport-incompletesafe-outputs-specification.md,glossary.mdscriptscustom-safe-outputs.mdset-issue-typefrontmatter-full.mdNotably,
merge-pull-request,mark-pull-request-as-ready-for-review, andset-issue-typehave no dedicated section in the mainsafe-outputs.mdguide — users would need to find them via the exhaustive reference or specification docs.4.
featuresSchema Does Not Enumerate Known Feature Flag NamesImpact: Low — Known feature flags are documented in the glossary but the schema can't validate them.
The
featuresschema uses"additionalProperties": truewith no enumerated property names. The glossary documents these known flags:action-mode,copilot-requests,mcp-gateway,integrity-reactions,cli-proxy,awf-diagnostic-logs,byok-copilot(deprecated). A typo in a feature flag name (e.g.,copilot-requestinstead ofcopilot-requests) silently passes schema validation.Recommended fix: Add a
propertiesblock with the known flags to thefeaturesschema while keepingadditionalProperties: truefor extensibility:Schema Improvements Needed
5.
safe-outputs.comment-memoryStruct Tag Does Not Reflect User-Facing LocationImpact: Low — Developer confusion rather than user-facing bug.
SafeOutputsConfighasyaml:"comment-memory,omitempty"atpkg/workflow/compiler_types.go(line within SafeOutputsConfig struct). However,comment-memoryis atoolsfield — the compiler extracts it fromtools.comment-memoryand copies it into the compiledSafeOutputsConfig. The schema correctly placescomment-memoryundertools(verified atmain_workflow_schema.json:4081).The struct yaml tag implies
safe-outputs.comment-memoryis a user-writable field, which it is not. This is internal compiler state.Recommended fix: Add a comment to the struct field clarifying it's populated at compile-time from
tools.comment-memory, not directly from user frontmatter:6.
safe-outputs.create-agent-taskDeprecated but No Schema Deprecation MarkerImpact: Very Low —
create-agent-taskis deprecated in favor ofcreate-agent-session. The schema has both fields and a$commentnoting the deprecation, but there is no formal JSON Schemadeprecated: trueannotation on the field itself. This is a minor polish item.Workflow Violations / False Positives
7.
in_used_not_schemaFields Are Not Real ViolationsThe pre-computed diff flagged these as "used in workflow files but not in schema":
authors,date,else,https,refactor,repo,serena-find_referencing_code_snippets,serena-find_symbol,title,try.Investigation shows these are not frontmatter fields:
authors,date,title— appear inside blog post template bodies inweekly-blog-post-writer.mdelse,try— Python/JavaScript code blocks inside workflow instruction texthttps— raw URL text in workflow file bodiesrepo,refactor— parts of GitHub search query strings in workflow instructionsserena-*— MCP tool references in workflow instructionsNo action needed — these are body content false positives from the pre-computed field extraction, not real frontmatter fields.
Recommendations
create-code-scanning-alertsstruct yaml tag (singular→plural rename atpkg/workflow/compiler_types.go:575) to match schema and parsing behavior.opencodeto engine schema descriptions in theengine_config$defsstring type description — low effort, high visibility for IDE users.safe-outputs.mdformark-pull-request-as-ready-for-review,merge-pull-request, andset-issue-type— these are non-obvious capabilities that users looking at the main guide will miss.report-incompletetosafe-outputs.md— it's a mandatory safe output type documented only in the spec and glossary, not the practical guide.featuresflags in the schema for better IDE validation support.Strategy Performance
All three strategies will be cached for future runs. The
create-code-scanning-alertsingular/plural mismatch and the missingopencodeengine description are the highest-value findings.Next Steps
pkg/workflow/compiler_types.go:575yaml tag (singularcreate-code-scanning-alert)pkg/parser/schemas/main_workflow_schema.jsonengine string descriptions to includeopencodemerge-pull-request,mark-pull-request-as-ready-for-review,report-incomplete,set-issue-typesections todocs/src/content/docs/reference/safe-outputs.mdfeaturesflags in schema for validation supportAll reactions