[Schema Consistency] 🔍 Schema Consistency Check - Conditional Logic & Feature Interactions (2025-10-25) #2429
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it was created by an agentic workflow more than 1 month 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-10-25
Summary
Executive Summary
This analysis used a NEW strategy focusing on conditional logic, feature interactions, and feature flag validation. Unlike previous strategies that focused on field enumeration and type matching, this strategy examines:
Key Finding: The codebase has extensive conditional validation logic but the main schema lacks JSON Schema conditional constructs (
if/then/else,dependencies) to encode these rules declaratively. However, MCP tool schemas DO use sophisticated conditionals (anyOf, not, allOf) - providing an excellent gold standard example.Critical Issues
1. Missing Top-Level JSON Schema Conditionals
Location:
pkg/parser/schemas/main_workflow_schema.jsonIssue: The main workflow schema has NO
if/then/elseordependenciesfields despite extensive conditional validation in the code.Code Reality:
Impact: HIGH - Schema validation cannot catch invalid configurations that the compiler will reject later.
2. Strict Mode Conditional Requirements Not in Schema
Location:
pkg/workflow/strict_mode.govspkg/parser/schemas/main_workflow_schema.jsonIssue: Strict mode enforces 6 conditional requirements but schema doesn't encode them with JSON Schema conditionals.
Requirements Enforced by Code:
*in network.allowed*,:*)Impact: HIGH - Users won't get schema validation errors until runtime compilation.
3. Command Event Conflicts Not Documented with Examples
Issue: Code enforces that
commandcannot be used with 4 specific events, but docs don't show this restriction with clear anti-examples.Impact: MEDIUM - Users might try invalid combinations and get compile errors without understanding why.
Recommendation: Add anti-examples to triggers documentation showing what NOT to do.
Schema Architecture Strengths
✅ Excellent: MCP Tool Schema Conditionals
Location:
pkg/parser/schemas/main_workflow_schema.json→$defs.stdio_mcp_toolMCP tool schemas USE sophisticated JSON Schema conditionals correctly:
{ "anyOf": [ { "required": ["command"] }, { "required": ["container"] } ], "not": { "allOf": [ { "required": ["command"] }, { "required": ["container"] } ] }, "allOf": [ { "if": { "required": ["network"] }, "then": { "required": ["container"] } } ] }This correctly encodes:
This is the GOLD STANDARD - the same approach should be used for top-level conditional requirements.
Documentation Gaps
4. Strict Mode Side Effects Not Fully Documented
Current Docs: List 4 requirements
Missing: Bash wildcard restrictions, CLI precedence rules, isolation behavior, non-strict mode behavior
5. Network Configuration Conditional Not Documented
MCP schema has conditional: "If you specify
networkconfig for an MCP server, you MUST usecontainer(notcommand)"This is encoded in schema but not explained in documentation.
Workflow Usage Analysis
Findings from 56 Production Workflows:
strict: true- significant adoptionRecommendations
Immediate Actions (High Priority)
Add JSON Schema conditionals to main schema for:
Document command event restrictions with clear anti-examples in triggers.md
Expand strict mode documentation to cover all 6 requirements + precedence rules
Medium Priority
Strategy Performance
What Made This Effective:
Complementary Strategies: Use with enum validation, required fields, and cross-schema consistency strategies for comprehensive coverage.
Key Patterns Discovered
Next Steps
Full Analysis Report: Available in
/tmp/gh-aw/cache-memory/analysis-report-2025-10-25.mdStrategy Database: Updated in
/tmp/gh-aw/cache-memory/strategies.jsonBeta Was this translation helpful? Give feedback.
All reactions