[Schema Consistency] Schema Consistency Audit - Deep Type Constraint Validation (Feb 7, 2026) #14299
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-02-14T06:43:17.770Z.
|
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.
-
This audit used a new strategy focusing on enum values, const constraints, and pattern regexes to find validation gaps between schema definitions and their enforcement in code.
Summary
🔴 Critical Issues
1. Missing Validation:
engine.runtimeEnumSchema (
pkg/parser/schemas/main_workflow_schema.json:2760):Problem: No validation in
pkg/workflow/engine.go:74(ExtractEngineConfig). Invalid values like"invalid"would be accepted.Impact: Runtime failures with unclear error messages
Fix: Add validation after line 88:
2. Undocumented Pattern: MCP Domain Validation
Schema (
pkg/parser/schemas/main_workflow_schema.json:6540):Problem: DNS hostname pattern for MCP domains is not documented in
docs/src/content/docs/reference/mcp-gateway.mdImpact: Users get validation errors without understanding format requirements
Fix: Document in MCP Gateway reference:
api.example.com,localhost,mcp-server.internal-invalid.com,domain..com,under_score.com🟡 Medium Priority Issues
3. Confusing Runtime Field Definitions
Schema (
pkg/parser/schemas/main_workflow_schema.json:2207,2216):Problem: Schema defines top-level
runtimefield, but:sandbox.agentinstead)features.sandbox-runtimeflag, notruntimefieldActual usage in workflows:
Fix:
runtimeis deprecated4. Undocumented Field:
engine.languageSchema (
pkg/parser/schemas/main_workflow_schema.json:3152):Problem: Field exists in schema and code (
pkg/workflow/tools_types.go:301) but is completely undocumentedImpact: Users unaware of feature, can't leverage Serena language-specific configs
Fix: Document in
docs/src/content/docs/reference/frontmatter.md:🟢 Low Priority Issues
5. Missing Validation: github-token.access-level
Schema (
pkg/parser/schemas/main_workflow_schema.json:5982):Problem: No validation in parser/compiler code
Impact: Low - GitHub API will reject invalid values anyway
Fix: Add compile-time validation for fail-fast with clear error message
6. Pattern Not Enforced: Workflow ID
Schema (
pkg/parser/schemas/main_workflow_schema.json:32):Problem: No regex validation in
pkg/parser/frontmatter.goImpact: Low - All current workflows comply, but invalid IDs could slip through
Fix: Add regex validation in frontmatter parser
7. Unclear Validation: Permissions Shortcuts
Schema (
pkg/parser/schemas/main_workflow_schema.json:1428):Problem: Comment in
pkg/workflow/permissions.go:133mentions validation, but implementation unclearImpact: Low - Likely handled correctly elsewhere
Fix: Add explicit validation with tests
✅ Positive Findings
Perfect Alignment Found
["claude", "codex", "copilot", "custom"]perfectly matches registered engines in code["read", "write", "none"]matches constants inpkg/workflow/permissions.go:81-83.github/workflows/*.mdfiles use valid enum values (no violations found)Recommendations Priority
High Priority (Week 1)
engine.runtimevalidation to prevent runtime failuresMedium Priority (Week 2-3)
runtimefieldengine.languagefield and usageLow Priority (Backlog)
github-token.access-levelvalidationStrategy Performance
Strategy Used: Deep Type Constraint Validation (NEW)
Approach:
Effectiveness: HIGH ⭐
Should Reuse: ✅ Yes - Add to rotation (30% probability in future runs)
Workflow Run: §21775830822
Beta Was this translation helpful? Give feedback.
All reactions