[Schema Consistency] Schema Consistency Check - 2026-03-29 #23416
Replies: 2 comments 1 reply
-
|
@copilot clean out all 3 entries from JSON schema |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
/plan in a single issue |
Beta Was this translation helpful? Give feedback.
1 reply
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 for 2026-03-29. 3 inconsistencies found across engine configuration, removed features, and firewall config extraction.
Strategy used: Strategy-40 — Engine Configuration Dead Code + FirewallConfig Lifecycle Audit (NEW approach, day 88 mod 10 = 8)
Summary
engine.firewallnot in schema, and extracted but never consumederror_patternsin schema/examples but removed from codenetwork.firewall.cleanup-scriptin schema but not extractedCritical Issues
1.
engine.firewall— doubly-dead configuration (HIGH)Schema: All three object variants of
engine_config(oneOf[1]withid,oneOf[2]withruntime,oneOf[3]withid+display-name) haveadditionalProperties: false. None includefirewallas a property.Code:
ExtractEngineConfig()inpkg/workflow/engine.go:280–314extractsengineObj["firewall"]intoEngineConfig.Firewall, parsing sub-fieldsenabled,version,log-level, andcleanup-script. However,EngineConfig.Firewallis never read after being set — no consuming code exists anywhere inpkg/.Impact: Users writing
engine: { id: copilot, firewall: { version: v1.0.0 } }get a schema validation error (becauseadditionalProperties: false), and even if schema validation were bypassed, the configuration would be silently ignored. The entireengine.firewallextraction branch inengine.go:280–314is dead code.Fix: Either add
firewallto theengine_config.oneOf[1].propertiesin schema and wireEngineConfig.Firewallthrough to the compilation pipeline, or remove the extraction code and theFirewallfield fromEngineConfig.Relevant code
Schema variants (all have
additionalProperties: false):oneOf[1]:id, version, model, max-turns, max-continuations, concurrency, user-agent, command, env, error_patterns, config, agent, api-target, argsoneOf[2]:runtime, provideroneOf[3]:id, display-name, description, runtime-id, provider, models, auth, options2.
error_patterns— removed from code but still in schema and examples (HIGH)Schema:
error_patternsis defined inengine_config.oneOf[1].propertiesas a valid array of error pattern objects (withid,pattern,level_group,message_group,descriptionsub-fields).Example workflow:
pkg/cli/workflows/example-custom-error-patterns.mddemonstrates the feature with sample patterns:Code reality:
ExtractEngineConfig()does not extractengineObj["error_patterns"]. TheEngineConfigstruct has noErrorPatternsfield. The feature was removed:pkg/cli/audit_report.go:293says"// No error/warning extraction since error patterns have been removed"andpkg/cli/logs_report.go:922–924says"// logErrorAggregator and related functions have been removed since error patterns are no longer supported".Note:
GetErrorPatternsmentioned incopilot_engine_tools.go:14is a different concept (extracting built-in patterns from Copilot CLI logs), not user-definederror_patterns.Impact: Users who configure
error_patternsper the schema/example will have their configuration silently ignored. The example workflow ships dead configuration as a reference.Fix: Remove
error_patternsfromengine_config.oneOf[1].propertiesin the schema. Archive or removeexample-custom-error-patterns.md. Add a schema$commentnoting the feature was removed if migration guidance is needed.Evidence of removal
Schema still has (should be removed):
Schema/Parser Mismatch
3.
network.firewall.cleanup-script— in schema but not extracted (MEDIUM)Schema: The object variant of
network.firewall(network.oneOf[1].properties.firewall.oneOf[3]) defines these properties:args,version,log-level,ssl-bump,allow-urls,cleanup-script.Code:
extractFirewallConfig()inpkg/workflow/frontmatter_extraction_security.go:99–147extracts fromnetwork.firewall:args,version,log-level,ssl-bump,allow-urls— but notcleanup-script. TheCleanupScriptfield inFirewallConfigis only written fromengine.firewall(which is itself dead code per finding #1) and never read in any compilation step.Impact: Users who set
network.firewall.cleanup-scriptaccording to the schema will have their setting silently dropped. The field is inert in all code paths.Fix: Either implement
cleanup-scriptextraction inextractFirewallConfig()and wire it through to the AWF invocation, or remove it from thenetwork.firewallschema definition and theFirewallConfigstruct.Comparison
Schema (
network.firewallobject variant):{ "args": { ... }, "version": { ... }, "log-level": { ... }, "ssl-bump": { ... }, "allow-urls": { ... }, "cleanup-script": { ... } ← defined in schema }extractFirewallConfig()(frontmatter_extraction_security.go:99–147):FirewallConfig.CleanupScript: defined in struct, only written from deadengine.firewallextraction, never read in compilation.Recommendations
engine.firewall(HIGH): Decide on intent — implement it (add to schema, wire to compilation) or remove dead extraction code fromengine.go:280–314and dropEngineConfig.Firewall.error_patterns(HIGH): Remove from schemaengine_config.oneOf[1].propertiesand retire/removeexample-custom-error-patterns.md. The feature has been removed from the runtime.network.firewall.cleanup-script(MEDIUM): Implement extraction inextractFirewallConfig()and wireCleanupScriptto the AWF container invocation, or remove from schema and struct.Strategy Performance
Next Steps
engine.firewallextraction dead code (engine.go:280–314,EngineConfig.Firewallfield)error_patternsfrom schema and retire example workflownetwork.firewall.cleanup-scriptextraction or remove from schemaSandboxConfig,RateLimitConfig,QmdToolConfig) to find similar dead pathsReferences: §23701370406
Beta Was this translation helpful? Give feedback.
All reactions