Repository navigation
[Schema Consistency] 🔍 Schema Consistency Check — 2026-11-07 #75614
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by Schema Consistency Checker. A newer discussion is available at Discussion #75836. |
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.
Warning
Threat detection engine error
Threat detection could not complete its analysis due to a tooling error. This is not a security finding.
What happened
The threat detection results could not be parsed.
Review the workflow run logs to troubleshoot the error.
Overview
envor object-form top-level step sectionsKey issues
envis schema-valid and generated-doc-valid, but parser/compiler paths require a mapsteps,pre-steps,pre-agent-steps, andpost-stepsare schema-valid and generated-doc-valid, but compiler paths consume lists onlyFrontmatterConfig.ToMap()omits 28 fields that are present in both schema and typed configdocker-image-pull-policyandwork-queue-policyexist in schema and compiler raw handling but have no typed representationCritical issues
No current repository workflow uses either unsupported schema-valid shape, so this scan found no immediate workflow source that must be repaired. The first two findings remain high priority because the public schema and generated full reference explicitly admit shapes that compilation does not honor.
1. Scalar env passes schema but is dropped by parser/compiler
Evidence
pkg/parser/schemas/main_workflow_schema.json:3398permits both object and string forms.pkg/workflow/frontmatter_types.go:420declaresEnv map[string]string.pkg/workflow/frontmatter_normalization.go:7normalizes several schema shorthands, but not scalarenv. JSON decoding therefore cannot populate the typed config.pkg/workflow/frontmatter_serialization.go:41returns an empty map for non-map fields, andpkg/workflow/compiler_orchestrator_workflow.go:460uses that helper when compiling workflow environment variables.docs/src/content/docs/reference/frontmatter-full.md:2626advertisesenv: "example-value", whiledocs/src/content/docs/reference/frontmatter.md:464documents standard map syntax only.env.Action
Remove the string branch from the schema and regenerate
frontmatter-full.md, unless scalar semantics are intentionally supported. If intentional, define the meaning, normalize it into the typed form, and compile it rather than returning an empty map. Add a schema → parser → compiler regression test.2. Object-form top-level step sections pass schema but are ignored
Evidence
pkg/parser/schemas/main_workflow_schema.json:4778,:4825,:4860, and:4891allow either an object or an array.pkg/workflow/frontmatter_types.go:427through:430type all four fields as[]any.[]any:pkg/workflow/workflow_builder_steps.go:65,:148, and:210. An object reaches the compiler but contributes no steps.docs/src/content/docs/reference/frontmatter-full.md:3376through:3426publishes{}as format 1 for every section. The focused guide atdocs/src/content/docs/reference/steps-jobs.md:21through:105documents lists only.stepsappears in 109 workflow files,pre-stepsin 2,pre-agent-stepsin 22, andpost-stepsin 36; all use list form.Action
Either remove the object branches and regenerate docs, or specify a useful singleton/keyed-object contract and normalize it to a list. Compilation should reject unsupported schema-valid shapes instead of producing an empty step section.
3. ToMap omits 28 fields already represented by FrontmatterConfig
Evidence
A static key comparison between the 73 top-level schema properties and writes in
pkg/workflow/frontmatter_serialization.go:63through:248found 30 missing keys. Two lack typed fields entirely (finding 4); the other 28 are declared inpkg/workflow/frontmatter_types.go:356through:505but are never emitted:check-for-updates,checkout,emoji,evals,excluded-env,experiments,graders,import-schema,inlined-imports,lsp,max-ai-credits,max-daily-ai-credits,max-runs,max-tool-calls,max-tool-denials,max-turn-cache-misses,max-turns,model,models,observability,plugins,private,resources,runner,skills,source-sha,threat-detection-suppress, anduser-rate-limit.Eighteen of those keys occur across 385 unique repository workflow files. Examples include
max-turns,max-ai-credits,checkout,model,graders,skills, anduser-rate-limit. This is broad exposure if any migration, SDK, or future compiler path performs a typed round trip. No obvious non-test compiler call site forFrontmatterConfig.ToMap()was found, so this is a latent serialization/API defect rather than evidence that current compilation strips those values.Action
Make serialization systematic and add a bidirectional coverage test derived from schema keys and
FrontmatterConfigtags. Preserve explicit false values, expression-capable scalars, and raw object forms in round-trip tests, especially for budget and security fields.4. Two schema fields are raw-only and cannot round-trip
Evidence
work-queue-policyis defined atpkg/parser/schemas/main_workflow_schema.json:30and consumed fromRawFrontmatteratpkg/workflow/work_queue_policy.go:178.docker-image-pull-policyis defined atpkg/parser/schemas/main_workflow_schema.json:190and consumed fromRawFrontmatteratpkg/workflow/docker.go:290.FrontmatterConfig(pkg/workflow/frontmatter_types.go:356through:505), and neither is serialized byToMap.docs/src/content/docs/reference/frontmatter.md:143. The deprecated queue policy is mentioned only in the work-queue specification atdocs/src/content/docs/specs/work-queue-specification.md:576; the two frontmatter references contain no migration entry.Action
Add explicit typed fields or a deliberate raw-extension passthrough retained by
ToMap. Add round-trip tests for both. If deprecatedwork-queue-policyremains schema-accepted, add a short deprecation/migration entry to the frontmatter reference.Documentation gaps
envand four object-form step sections that the focused guides do not document and the compiler does not honor.work-queue-policyfield lacks a frontmatter-reference migration note.Schema improvements needed
envand top-level step-section types to implemented shapes, or implement the admitted branches end to end.Parser updates required
FrontmatterConfig.ToMap()coverage for the 28 typed omissions.Workflow violations
field_gaps.in_used_not_schemais empty: no repository workflow uses an unknown top-level key.envor object-form top-level step sections.Recommendations
envand step sections) and regenerate the full reference.ToMap→ parser table tests, with an explicit allowlist only for intentionally raw-managed fields.docker-image-pull-policyand deprecatedwork-queue-policy.envor object step sections.Strategy performance
strategy-1, success count 1Next steps
References:
All reactions