[Schema Consistency] Schema Consistency Audit — 2026-04-28 #28849
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Schema Consistency Checker. A newer discussion is available at Discussion #29043. |
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 audit covering four areas: JSON schema (
main_workflow_schema.json), parser/compiler implementation (pkg/parser/*.go,pkg/workflow/*.go), reference documentation (docs/src/content/docs/reference/), and in-repo workflows (.github/workflows/*.md).Strategy used: New approach — Tool Registry Cross-Reference + Engine Property Documentation Sweep (day-of-year mod 10 = 8, triggering the 30% new-strategy path).
Summary
Total actionable findings: 9
Critical Issues
1.
tools.safety-prompt— In code, absent from schema and docsThe
safety-prompttool is listed inbuiltInToolNames(recognized by the compiler) and intools_parser.go's valid tool map, but it is completely absent from:tools.propertiesinmain_workflow_schema.jsonImpact: Users who discover the tool name (e.g., from error messages or source inspection) get no IDE completion, no schema validation, and no documentation. The schema currently rejects it via JSON Schema validation even though the compiler accepts it.
Files:
pkg/workflow/mcp_config_validation.go:41—"safety-prompt": trueinbuiltInToolNamespkg/workflow/tools_parser.go:170—"safety-prompt": truein valid tools mappkg/parser/schemas/main_workflow_schema.json—tools.propertiesmissingsafety-promptView evidence
2. Deprecated tools (
grep,serena) give wrong compiler errorThe schema marks
tools.grepasdeprecated: truewith message "grep is always available as part of default bash tools. Remove this field and use bash tool instead." It markstools.serenaasx-removed: truewith a helpful migration message pointing toshared/mcp/serena.md.However, neither
grepnorserenais inbuiltInToolNames. When a user writestools: { grep: true }, the compiler callsValidateToolsSection, which rejects it with a generic error:The user never sees the specific, helpful deprecation/removal message that was carefully written into the schema.
Impact: Medium — confusing error messages; users don't see the migration path.
serenaalso has an inconsistency:pkg/parser/mcp.go:186,214still processesserenaas a valid built-in MCP tool at parse time, but validation would have already rejected it.Files:
pkg/workflow/mcp_config_validation.go:121-139—ValidateToolsSectiondoes not check schema deprecationpkg/parser/schemas/main_workflow_schema.json—tools.grep.deprecated: true,tools.serena.x-removed: truepkg/parser/mcp.go:186,214—serenastill processed in MCP extraction (dead code path due to upstream validation rejection)View schema deprecation messages
tools.grep:
{ "deprecated": true, "x-deprecation-message": "grep is always available as part of default bash tools (echo, ls, pwd, cat, head, tail, grep, wc, sort, uniq, date, yq). Remove this field and use bash tool instead." }tools.serena:
{ "deprecated": true, "x-removed": true, "x-removal-message": "tools.serena built-in support has been removed. Import shared/mcp/serena.md instead:\n imports:\n - uses: shared/mcp/serena.md\n with:\n languages: [\"go\", \"typescript\"]" }Documentation Gaps
3.
features.mcp-cli— Implemented feature flag with zero doc coverageThe
mcp-clifeature flag gates the entire MCP-CLI mounting subsystem inpkg/workflow/mcp_cli_mount.go. It is listed inpkg/constants/README.md:151asMCPCLIFeatureFlag. Despite controlling a significant feature (mounting MCP servers as CLI executables in PATH), it has zero mentions in the reference documentation.Files:
pkg/workflow/mcp_cli_mount.go:57-64— feature gate checkpkg/constants/README.md:151— constant defineddocs/src/content/docs/reference/frontmatter.md— no mention4.
features.disable-xpia-prompt— Undocumented feature flagThe
disable-xpia-promptfeature flag (constants.DisableXPIAPromptFeatureFlag) is referenced in code (pkg/constants/README.md:144) but has zero documentation in the reference docs. The flag name suggests it disables cross-prompt injection attack (XPIA) prompt injection, which is security-relevant.5.
engine.bare— Newly added field missing fromengines.mdAdded in v0.68.1 (per
docs/src/content/docs/blog/2026-04-13-weekly-update.md), theengine.bare: truefield suppresses automatic context loading (AGENTS.md for Copilot, CLAUDE.md for Claude). It is:main_workflow_schema.jsonwith full descriptionpkg/workflow/engine.go:159,306docs/src/content/docs/reference/frontmatter-full.md:1683,1770docs/src/content/docs/reference/engines.md(the main engine reference)docs/src/content/docs/reference/frontmatter.mdImpact: Users reading the main engine reference have no way to discover this feature.
6.
run-install-scripts— In schema and code, missing from mainfrontmatter.mdThe
run-install-scripts: truefield disables--ignore-scriptson npm install commands (supply-chain security). It is well-implemented in code and defined in the schema with a security warning, butdocs/src/content/docs/reference/frontmatter.mdcontains no mention of it. It exists only infrontmatter-full.md.Files:
pkg/workflow/frontmatter_parsing.go:123-137— implementationpkg/parser/schemas/main_workflow_schema.json— full definition with security contextdocs/src/content/docs/reference/frontmatter-full.md:5898-5904— only coveragePre-computed Diff Methodology Issues
These are findings about
schema-diff.jsonitself, not about the codebase:7.
parser_yaml_fieldscaptures wrong structThe
parser_yaml_fieldsin the pre-computed diff contains only["default", "options", "required", "type"]— these are fields frompkg/parser/import_processor.go'sParameterDefinitionstruct, not frontmatter parsing fields. The frontmatter parser uses a genericmap[string]any(no struct tags), so there are no yaml struct tags to capture. This makes thein_schema_not_parsergap meaningless.8.
in_used_not_schemahas false positives from markdown bodyFields like
else,try,repo,refactor,authors,date,title,serena-find_symbolappear inin_used_not_schemabecause the diff script scans YAML key-value patterns across the entire workflow file, including the markdown body (which can contain YAML examples, instructions, or code blocks). Verified by checking line numbers:else:at lines 181, 200, 210 ofdaily-performance-summary.mdare in the markdown body, not frontmatter.Schema Improvements Needed
safety-prompttotools.propertiesin the schema with descriptionengine.baresection toengines.mdandfrontmatter.mdrun-install-scriptstofrontmatter.mdsecurity sectionfeatures.mcp-cliandfeatures.disable-xpia-promptdocumentation to the features section offrontmatter.mdfeatures.propertiesin schema (currentlyadditionalProperties: truewith empty properties — no IDE completion formcp-cli,integrity-reactions,awf-diagnostic-logs, etc.)Parser/Compiler Updates Required
ValidateToolsSectionshould emit deprecation-specific errors for deprecated/removed tools by checking schema deprecation metadata, instead of giving a generic "unknown tool name" errorpkg/parser/mcp.go:186,214,425still handleserenaas a valid built-in, butValidateToolsSectionwill have already rejected it. Either re-addserenatobuiltInToolNames(and emit the helpful removal warning) or remove the dead code path inmcp.goRecommendations
safety-promptto the schema — this is the highest-impact fix. A real tool that users can't discover via schema/docs.ValidateToolsSectionshould look upx-deprecation-message/x-removal-messagefrom the schema for better UX.engine.bareinengines.md— recently shipped feature with no main-reference coverage.features.properties— currently thefeaturesschema object is completely open (additionalProperties: true). Adding known flags as properties with descriptions would unlock IDE completion.serenahandling — either add back tobuiltInToolNameswith a warning+continue behavior, or remove frompkg/parser/mcp.go.Strategy Performance
safety-promptgapReferences: Workflow run §25034412959
Beta Was this translation helpful? Give feedback.
All reactions