Repository navigation
[Schema Consistency] Schema Consistency Check — 2026-02-20 #17118
Closed
Replies: 1 comment
|
This discussion was automatically closed because it expired on 2026-02-27T10:08:12.667Z.
|
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 run on 2026-02-20 using Strategy 9: Struct-Schema Differential Field Audit (proven strategy, day 051 → 51 mod 10 = 1).
Summary
Critical Issues
1.
messages.detection-failureis silently ignored at runtimeSeverity: Critical — user-configured values are silently dropped.
The
messages.detection-failurefield is correctly defined in the JSON schema and theSafeOutputMessagesConfigstruct, and the JS runtime (messages_run_status.cjs) is ready to consume it. However, neitherparseMessagesConfignormergeMessagesConfigextract this key from the raw YAML frontmatter map.pkg/parser/schemas/main_workflow_schema.jsoncompiler_types.go:539(DetectionFailurefield)actions/setup/js/messages_run_status.cjs(JS consumer)safe_outputs_config_messages.goparseMessagesConfig()imports.gomergeMessagesConfig()Impact: A workflow author who sets
messages.detection-failure: "custom message"will have their value silently ignored. The JS runtime will always fall back to the default message"⚠️ Security scanning failed for [{workflow_name}]({run_url})...".Fix: Add handling to
parseMessagesConfig()inpkg/workflow/safe_outputs_config_messages.go:And mirror in
mergeMessagesConfig()inpkg/workflow/imports.go:2.
messages.agent-failure-issueandmessages.agent-failure-commentare schema-blocked featuresSeverity: Critical — fields usable in JS runtime are completely blocked by
additionalProperties: false.The
SafeOutputMessagesConfigstruct defines two fields (agent-failure-issue,agent-failure-comment) that are consumed by the JS runtime inactions/setup/js/messages_footer.cjs:136-155. However:messages.propertiesadditionalProperties: false— so schema validation will reject any workflow that uses these fieldsparseMessagesConfig()ormergeMessagesConfig()compiler_types.go:540-541(struct fields)actions/setup/js/messages_footer.cjs:136-155(JS consumer)pkg/parser/schemas/main_workflow_schema.jsonmessages schemaadditionalProperties: false)safe_outputs_config_messages.goparseMessagesConfig()imports.gomergeMessagesConfig()Impact: The feature exists in the JS runtime but cannot be activated through frontmatter. Schema validation will reject attempts with an
additionalPropertieserror before the Go parser even runs.Fix: Add both fields to
pkg/parser/schemas/main_workflow_schema.jsonunderproperties["safe-outputs"]["properties"]["messages"]["properties"], add parsing inparseMessagesConfig(), merging inmergeMessagesConfig(), and documentation.Schema Gaps
3. MCP config
proxy-argsfield missing frommcp_config_schema.jsonThe
proxy-argsfield is fully implemented:mcp_config_custom.go:634-635— extracted from frontmattermcp_config_custom.go:451-471— rendered to TOML and JSON formatsmcp_config_comprehensive_test.go:891-892— test coverage existspropertyOrderfor bothstdioandcontainerMCP typesBut
proxy-argsis absent frompkg/parser/schemas/mcp_config_schema.json(which has 14 properties:allowed,args,command,container,entrypoint,entrypointArgs,env,headers,mounts,network,registry,type,url,version).Note: The MCP schema does not use
additionalProperties: false, so this won't cause validation errors — but IDE autocompletion and schema-driven tooling won't suggest the field, and there's no schema-level type documentation.Fix: Add to
pkg/parser/schemas/mcp_config_schema.json:4.
safe-outputsschema$commentlists 4 missing operationsThe
$commentfield on thesafe-outputsschema object serves as the authoritative list of supported operations, but it omits 4 valid operations that are fully defined in the schema properties:assign-to-usersafe-outputs.md:1134unassign-from-usersafe-outputs.md:1149create-projectsafe-outputs.md:435missing-datasafe-outputs.md:890This affects tooling and AI agents that read the
$commentto understand available operations.Fix: Update
$commentinpkg/parser/schemas/main_workflow_schema.jsonto include the four missing operations.Documentation Gaps
5.
messagesTemplates list insafe-outputs.mdis incompletedocs/src/content/docs/reference/safe-outputs.md:1256lists:Missing from this list (but defined in schema and struct):
footer-workflow-recompilefooter-workflow-recompile-commentdetection-failureAnd not yet documented at all:
agent-failure-issue(pendingfix #2above)agent-failure-comment(pendingfix #2above)Fix: Update the Templates list in
safe-outputs.mdto include all supported message template fields.6.
messages.detection-failureplaceholder{operation}not listed in variablesThe schema
messagesdescription says:Available placeholders: {workflow_name} (workflow name), {run_url} (GitHub Actions run URL), {triggering_number} (issue/PR/discussion number), {workflow_source} (owner/repo/path@ref), {workflow_source_url} (GitHub URL to source), {operation} (safe-output operation name for staged mode).However,
detection-failurespecifically uses{workflow_name}and{run_url}(not{operation}). The docs atsafe-outputs.md:1268list{operation}as a variable but don't clarify which templates support which placeholders. The variable documentation could be more precise.Recommendations
Immediate (bug fix): Add
detection-failureparsing toparseMessagesConfig()andmergeMessagesConfig()— one-line fix each with no architectural change needed.Immediate (schema fix): Add
agent-failure-issueandagent-failure-commentto the messages schema properties to unblock these JS-runtime features. Also add parsing and merging in Go.Quick wins:
$commentin safe-outputs schema to includeassign-to-user,unassign-from-user,create-project,missing-datasafe-outputs.mdtemplates listproxy-argstomcp_config_schema.jsonProcess improvement: The pattern of adding fields to the Go struct and JS runtime without updating the schema and parser functions has appeared multiple times (
detection-failure,agent-failure-*). Consider adding a linting check or PR template checklist item that verifies: when a field is added toSafeOutputMessagesConfig, it must also be added to (a) schema, (b)parseMessagesConfig, (c)mergeMessagesConfig, and (d) documentation.Strategy Performance
SafeOutputMessagesConfig, compared against schema properties, checkedparseMessagesConfig/mergeMessagesConfigfor completeness, cross-referenced JS runtime usageReferences:
All reactions