[Schema Consistency] Deep Type Constraint Validation - February 11, 2026 #14906
Closed
Replies: 2 comments
-
|
🤖 Beep boop! The smoke test agent just passed through here like a digital tumbleweed! 🌪️ Everything's looking crispy on this fine Tuesday morning. Tests are passing, builds are building, and the only smoke around here is from our victory cigars. 🎉 Keep up the amazing work, team! ✨ — Your friendly neighborhood smoke test agent 🚀
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This discussion was automatically closed because it expired on 2026-02-18T06:50:47.136Z.
|
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.
-
Summary
This analysis applied the Deep Type Constraint Validation strategy (Strategy 2) to systematically examine enum values, const constraints, and pattern validations across the schema, parser/compiler implementation, documentation, and real workflows.
Critical Issues
1. Input Type Enum - Missing Validation⚠️
Severity: Medium-High
The schema defines 5 valid input types but the parser/compiler doesn't validate them:
Schema:
pkg/parser/schemas/main_workflow_schema.json:717Code: Type field exists in struct but NO validation
pkg/workflow/inputs.go:23- Field defined with comment listing typespkg/parser/import_processor.go:57- Same field, no validationImpact: Users could specify invalid input types (e.g.,
type: array) and receive no validation error until GitHub Actions runtimeRecommendation: Add validation in
ParseInputDefinitionfunction to check input type against allowed enum values.View Code Context
No validation logic found for these enum values.
2. Environment Input Type - Undocumented 📚
Severity: Medium
The schema includes
"environment"as a valid input type, and tests reference it, but it's completely undocumented.workflow_dispatch_inputs_fuzz_test.go:49Impact: Users unaware this is a valid option for GitHub environment-based inputs.
Recommendation: Document the
environmentinput type indocs/src/content/docs/reference/triggers.mdor relevant sections.Validation Gaps
3. Issue Types Enum - Not Validated
Severity: Low-Medium
The schema defines 18 different issue event types but no validation exists in the parser.
Schema:
pkg/parser/schemas/main_workflow_schema.json:570Code: No explicit validation found
Impact: Low - GitHub Actions API will reject invalid types, but early validation would improve error messages.
4. Workflow_Run Status Enum - Not Validated
Severity: Low
Schema:
pkg/parser/schemas/main_workflow_schema.json:751Code: No validation found
Impact: Low - Deferred to GitHub Actions validation.
5. No Generic Enum Validation Function
Observation: The codebase has 147 unique enum values but no generic
validateEnum()helper function. Validation is field-specific where it exists.Impact: Inconsistent validation approach, harder to maintain.
Recommendation: Consider creating a generic enum validation utility for reuse.
Properly Validated Constraints ✅
These constraints show good schema-code consistency:
Permissions Enum ✅
["read-all", "write-all"]and["read", "write", "none"]pkg/workflow/frontmatter_types.go:307Sandbox Type Enum ✅
["awf", "srt"]pkg/workflow/sandbox.go:30-31docs/src/content/docs/reference/sandbox.mdSlash Command Events Enum ✅
"issue_comment","pull_request_comment", etc.pkg/workflow/command.go:33-38Tracker-ID Pattern ✅
^[a-zA-Z0-9_-]+$with minLength 8pkg/workflow/frontmatter_extraction_metadata.go:86-96Pattern Validation Status
View Pattern Validation Coverage
tracker-idfrontmatter_extraction_metadata.go^[^/]enforcedaction_sha_checker.go:48Schema Statistics
const: falsefor boolean fields)Recommendations
Priority 1 - Fix Now
pkg/workflow/inputs.goParseInputDefinition functionPriority 2 - Enhance Later
validateEnum(value, allowedValues, fieldName)utility functionPriority 3 - Architecture
Strategy Performance
Analysis Methodology
This analysis:
Key Insight: The codebase follows a "validate critical fields, defer others to GitHub" strategy, but this isn't documented and leads to inconsistent user experience.
Workflow Run: §21895394716
Beta Was this translation helpful? Give feedback.
All reactions