Repository navigation
[Schema Consistency] Schema consistency check: limit handling and documentation gaps (2026-11-11) #76770
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by Schema Consistency Checker. A newer discussion is available at Discussion #77077. |
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 check — 2026-11-11
Four inconsistencies were found in a targeted comparison of the schema, compiler, documentation, and repository workflows. The cached field-gap triage strategy was reused. No critical issue was established.
Key findings
Zero-valued limits pass the schema but are discarded by the parser.
max-turnsandmax-tool-denialsboth referencetemplatable_integer, which permits integer0(pkg/parser/schemas/main_workflow_schema.json:4957,:4962,:15601). Their parsers require at least 1 and return an empty value for zero (pkg/workflow/engine_config_parser.go:59,:98,:121). In themax-turnspath, an empty value can lead to the configured default being used (pkg/workflow/compiler_orchestrator_engine.go:739). Authors can therefore submit schema-valid configuration that does not apply the requested limit. Decide whether zero has a supported meaning; otherwise use the positive-integer schema for both fields and add compiler validation and regression cases.The schema permits skip questions that the compiler rejects.
skip-if-decisionitems only require a nonblank string (pkg/parser/schemas/main_workflow_schema.json:10), but the parser rejects any question containing${{(pkg/workflow/skip_if_decision.go:25). The reference correctly says Actions expressions are unsupported (docs/src/content/docs/reference/frontmatter.md:84). Add a matching schema constraint or clearly document this compiler-only restriction in the schema description, and test the same example against both validation paths.The skip-decision documentation omits a sandbox prerequisite. The compiler rejects nonempty skip questions when the AWF agent sandbox is disabled (
pkg/workflow/compiler_orchestrator_workflow.go:731), while the feature description mentions protected-session incompatibility but not that prerequisite (docs/src/content/docs/reference/frontmatter.md:58). Document the requirement and the empty-list exception in the reference and schema description; add a focused documentation or validation regression.Generated reference examples violate their own schema.
docs/src/content/docs/reference/frontmatter-full.md:4335and:4361showexample-valueas an Actions expression, although the referenced schema requires the${{ ... }}form (pkg/parser/schemas/main_workflow_schema.json:15601). The same generated reference usesexample-valueforsource-sha(:80), whose schema requires 40 hexadecimal characters (pkg/parser/schemas/main_workflow_schema.json:211). The generator falls back to this literal for strings (scripts/generate-schema-docs.js:131). Generate valid examples from schema examples or constraints and validate representative generated alternatives in tests.Scope and workflow observations
The precomputed diff reports no top-level keys used by repository workflows that are absent from the schema. Its three apparent schema-versus-struct gaps (
docker-image-pull-policy,skip-if-decision, andwork-queue-policy) have raw-frontmatter handling and were not treated as missing implementations. Sampled workflows includecode-simplifier.mdanddaily-file-diet.md; no workflow violation was established. The review was targeted, not exhaustive, and did not execute workflow code or validate every workflow and documentation example.Strategy performance: precomputed field-gap triage plus focused constraint and example checks; four findings; high effectiveness; reuse recommended.
Next actions
References: §42965455909
All reactions