[Schema Consistency] Schema Consistency Check - Engine Compatibility Documentation Gaps (2025-11-21) #4444
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it was created by an agentic workflow more than 1 week ago. |
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.
-
Schema Consistency Check - 2025-11-21
This analysis focused on conditional logic and feature flag validation across the schema, parser implementation, compiler, and documentation. The strategy examined engine-specific features, strict mode requirements, and conditional field interactions.
Key Finding: Schema descriptions lack engine compatibility warnings for HTTP transport and web-search features, while the compiler correctly enforces these requirements. Users relying on IDE autocomplete or external validation tools cannot discover these limitations until runtime.
Full Report Details
Analysis Summary
Critical Issues
1. HTTP Transport Engine Compatibility Not in Schema
Problem: The schema defines HTTP transport for MCP tools but doesn't document which engines support it.
Schema Location:
pkg/parser/schemas/main_workflow_schema.json-$defs.http_mcp_tool.properties.type.descriptionCurrent Schema Description:
Compiler Validation:
pkg/workflow/agent_validation.go:118-136Impact:
Recommendation:
{ "description": "MCP connection type for HTTP. Note: HTTP transport requires engine with HTTP support (copilot, claude). Engines without HTTP support only accept stdio transport. See: (redacted)" }2. Web-Search Engine Compatibility Not in Schema
Problem: The schema defines web-search tool but doesn't document that it's engine-specific.
Schema Location:
pkg/parser/schemas/main_workflow_schema.json-properties.tools.properties.web-search.descriptionCurrent Schema Description:
Compiler Validation:
pkg/workflow/agent_validation.go:161-176Documentation:
docs/src/content/docs/reference/engines.md:74-76Impact:
Recommendation:
{ "description": "Web search tool for performing internet searches and retrieving search results (subject to network permissions). Note: Built-in web-search support is engine-specific. For engines without native support (like copilot), use third-party MCP servers such as Tavily. See: (redacted)" }Moderate Issues
3. Action Pinning Strict Mode Behavior Unclear
Problem: Schema mentions action pinning in strict mode but doesn't explain the conditional fallback behavior.
Schema Location:
pkg/parser/schemas/main_workflow_schema.json-properties.strict.descriptionCurrent Schema Description (excerpt):
Compiler Implementation:
pkg/workflow/action_pins.go:110-128Key Insight: Strict mode REQUIRES successful dynamic SHA resolution. Non-strict mode falls back to hardcoded pins from
data/action_pins.json.Impact:
Enhancement:
{ "description": "... (3) Action Pinning - enforces actions pinned to commit SHAs instead of tags/branches (requires network connectivity for dynamic SHA resolution; non-strict mode falls back to embedded pins), ..." }4. Strict Mode Conditional Validations Could Use $comment Fields
Observation: Strict mode performs 4 validation checks with complex conditional logic.
Implementation:
pkg/workflow/strict_mode_validation.go:185-215Current State: Schema description documents all 5 checks as text, but doesn't use JSON Schema features to make this machine-readable.
Enhancement Opportunity: Add
$commentfields to document runtime behavior:contents:write→ requiressafe-outputsallowed: ["*"]→ requires explicit domains in strict modecontainer:→ requiresnetwork:configuration in strict modeImpact: Low priority - validation works correctly, just a metadata completeness improvement.
Positive Findings
✅ Max-Turns Engine Compatibility Well-Documented
Schema:
pkg/parser/schemas/main_workflow_schema.json:3486{ "max-turns": { "type": "integer", "description": "Maximum number of chat iterations per run. Helps prevent runaway loops and control costs. Has sensible defaults and can typically be omitted. Note: Only supported by the claude engine." } }Compiler Validation:
pkg/workflow/agent_validation.go:137-156Status: Perfect alignment between schema, compiler, and error messages. This is the model to follow for HTTP transport and web-search.
✅ 175 oneOf Patterns Working Correctly
Count: 175
oneOfpatterns across the schema for polymorphic type supportExamples:
onfield: string | objectenginefield: string | objectpermissionsfield: string | objectnetworkfield: string | object | nullStatus: All tested patterns validate correctly. Excellent type flexibility.
✅ 100 additionalProperties Constraints Prevent Typos
Count: 100
additionalProperties: falseconstraints across schemaBenefit: Catches field name typos at validation time
Example: If user types
engne:instead ofengine:, validation fails immediately.✅ Strict Mode Implementation Comprehensive
Validation Layers:
validateStrictPermissions()- Refuses write permissions on sensitive scopesvalidateStrictNetwork()- Requires explicit network configuration (no wildcards)validateStrictMCPNetwork()- Requires network config on custom MCP servers with containersvalidateStrictDeprecatedFields()- Refuses deprecated frontmatter fieldsCode Quality:
Documentation: Schema description accurately lists all 5 enforcement rules (4 validation + 1 zizmor integration).
Statistics
Recommendations
Priority 1: Add Engine Compatibility Warnings to Schema
Action Items:
$defs.http_mcp_tool.properties.type.descriptionto document engine requirementsproperties.tools.properties.web-search.descriptionto document engine support and alternativesdocs/reference/engines.mdfor detailed engine comparisonImpact: Improves discoverability of engine limitations at design time.
Priority 2: Consider Schema Versioning for Feature Compatibility
Idea: Add
$commentfields that track engine feature matrices:{ "$comment": "Feature support by engine: copilot (yes), claude (no), codex (no), custom (n/a)" }Benefit: Enables automated compatibility validation by external tools.
Priority 3: Document Conditional Defaults
Examples:
maxdefaults vary by type (1 for issues/discussions, 3 for labels)network.allowedspecifiedgh-aw-{engine-id}groupCurrent State: Defaults exist in code comments but not in schema
defaultfields or$commentmetadata.Enhancement: Add
$commentfields documenting conditional default behavior.Strategy Performance
Why This Strategy Works:
Next Steps
Files Analyzed
Schema:
pkg/parser/schemas/main_workflow_schema.jsonCompiler:
pkg/workflow/strict_mode_validation.gopkg/workflow/agent_validation.go(HTTP transport, max-turns, web-search)pkg/workflow/action_pins.go(strict mode pinning)Documentation:
docs/src/content/docs/reference/engines.mddocs/src/content/docs/guides/web-search.mdAnalysis Scripts:
Beta Was this translation helpful? Give feedback.
All reactions