[Schema Consistency] Schema Consistency Audit - 2025-11-23: Field Relationship Dependencies #4579
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.
-
This automated analysis identifies inconsistencies between the JSON schema, parser/compiler implementation, documentation, and real workflows. Today's analysis used a brand new strategy focused on discovering implicit field relationships and dependency chains.
Analysis Overview
Strategy Used: Schema Relationship Graph & Dependency Chain Analysis (Strategy-018) - NEW APPROACH
This analysis examined implicit relationships between schema fields - dependencies, conflicts, cascading defaults, and conditional behaviors that exist in the implementation but aren't explicitly documented in the schema. Unlike previous strategies that analyze individual fields, this approach maps the dependency graph between fields.
Scope Analyzed:
Inconsistencies Found: 8 relationship patterns
Critical Findings
Critical Issue #1: command.events Enables Event Combination
Type: Hierarchical Dependency / Design Pattern Gap
Discovery:
The
commandtrigger has format-dependent conflict behavior:Simple Format (conflicts exist):
Object Format with events (conflicts removed):
Code Evidence (pkg/workflow/compiler.go:1280):
This validation only checks sibling relationships in the
on:map. When usingcommand.events, the events are nested inside the command object, not siblings.Real World Usage:
Schema Gap:
The schema shows
commandin the same oneOf pattern as all other events, but doesn't document:eventsfield removes conflictseventsfield acts as a relationship modifierImpact:
Recommendation:
Add schema description noting format-dependent behavior
Critical Issue #2: Cascading Auto-Enablement in safe-outputs
Type: Implicit Dependencies / Hidden Defaults
Discovery:
When
safe-outputsis configured, three child fields are automatically enabled even if not specified:Usage Statistics:
safe-outputsconfiguredthreat-detection(4%)missing-tool(4%)noop(0%)Schema Gap:
The schema shows these as independent optional fields but doesn't document:
maxvalue for noop (1)HasSafeOutputsEnabled()checkfalse)Impact:
Recommendation:
Add schema metadata documenting the cascade
Moderate Findings
Moderate Issue #1: max-patch-size Default and Type Coercion
Type: Conditional Defaults / Type Flexibility
Discovery:
The
max-patch-sizefield has cascading default logic with type coercion:Schema Gaps:
Impact: Medium - Users may not know default, float behavior surprising
Moderate Issue #2: timeout-minutes → timeout_minutes Fallback
Type: Deprecation Precedence Chain
Discovery:
Preference order with deprecation warning:
Impact: Low - Works correctly, just needs documentation
Info / Documentation Gaps
Info #1: GitHub Token Precedence Chain
Discovery:
Token resolution follows 4-level precedence:
Schema Gap: Three
github-tokenfields shown independently, precedence not documentedInfo #2: Network Field Name Collision
Discovery:
Two different fields both named
network:frontmatter.network(engine network permissions)mcp-servers.*.network(MCP isolation config)Different contexts, same name.
Info #3: Required Field Not Enforced
Discovery:
Schema marks
onas required but compiler doesn't enforce - generates defaults if missing.Cross-Reference: Confirmed finding from Strategy-003 (2025-11-20)
Info #4: HasSafeOutputsEnabled() Dependency
Discovery:
Many safe-outputs behaviors depend on
HasSafeOutputsEnabled()check, which is not a field but a computed property.Positive Findings
✅ command.events Pattern Works Correctly: Real workflow (archie.md) successfully uses
command.events: [issues, pull_request]format✅ Automatic Security Features: 96% of safe-outputs workflows benefit from automatic threat-detection enablement
✅ Type Coercion Resilience: max-patch-size accepts multiple numeric types with graceful float truncation
✅ Backward Compatibility: timeout_minutes → timeout-minutes fallback preserves old workflows
✅ Token Precedence Chain: GitHub token resolution correctly implements 4-level precedence
✅ No Broken Relationships: All discovered relationships work correctly in implementation - gaps are documentation only
Key Insights
Hierarchical Dependencies: Field behavior can change based on format (command string vs. object) - schema doesn't express this
Cascading Defaults: Parent field existence triggers auto-enablement of children (safe-outputs → threat-detection) - invisible to schema
Relationship Modifiers: Sub-fields can change parent field's relationships (command.events removes conflicts)
96% Implicit Enablement: Nearly all safe-outputs workflows rely on automatic feature enablement
Inter-Field Relationships: More important than individual field validation for understanding system behavior
Recommendations
Priority 1: Document Hierarchical Dependencies (CRITICAL)
Add to schema description that format determines conflict behavior for command trigger.
Where:
pkg/parser/schemas/main_workflow_schema.json- command field descriptionPriority 2: Document Cascading Auto-Enablement (HIGH)
Add schema metadata documenting that missing-tool, noop, and threat-detection are automatically enabled when safe-outputs exists.
Where: Each auto-enabled field's schema definition
Priority 3: Add Default Value Metadata (MEDIUM)
Formalize defaults:
Where: Field definitions in main_workflow_schema.json
Priority 4: Document Precedence Chains (MEDIUM)
Add note explaining github-token and network field precedence rules.
Priority 5: Consider Schema Extensions
$commentfields for implementation notesx-dependenciescustom field for inter-field relationshipsStrategy Performance
Strategy: Schema Relationship Graph & Dependency Chain Analysis (Strategy-018)
Status: ⭐ NEW STRATEGY - First use
Effectiveness: Very High
Unique Value:
Should Reuse: ✅ YES - Added to strategy cache for future use
Methodology Summary
Total Analysis Time: ~30 minutes
Files Analyzed: 15+ (schema, compiler, parser, workflows)
Code Patterns Found: 8 relationship patterns
Workflows Validated: 3 (archie, brave, cloclo with command triggers)
Strategy Cache Updated: ✅ Strategy-018 added to
/tmp/gh-aw/cache-memory/strategies.jsonDetailed Findings: See
/tmp/gh-aw/cache-memory/strategy-018-findings-2025-11-23.mdBeta Was this translation helpful? Give feedback.
All reactions