-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
automationcode-qualitycookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!refactoringtask-mining
Description
Description
There's naming inconsistency between schema property names (singular) and compiler struct names (plural), with mixed YAML tags causing confusion. This was identified in Schema Consistency Analysis #13673.
Current Inconsistency
Schema uses SINGULAR:
create-issueclose-issuecreate-pull-request
Compiler structs use MIXED naming:
// pkg/workflow/compiler_types.go:439-445
CreateIssues *CreateIssuesConfig `yaml:"create-issues,omitempty"` // ✅ Both plural
CloseIssues *CloseIssuesConfig `yaml:"close-issue,omitempty"` // ❌ Struct plural, tag SINGULAR
UpdateIssues *UpdateIssuesConfig `yaml:"update-issues,omitempty"` // ✅ Both plural
CreateDiscussions *CreateDiscussionsConfig `yaml:"create-discussions,omitempty"` // ✅ Both pluralImpact
- Maintainability confusion - Struct name doesn't match YAML tag
- Documentation ambiguity - Not clear which convention to use
- Developer experience - Mixed signals about correct naming
Suggested Changes
Option A: Standardize on SINGULAR (Recommended)
Pros:
- Matches existing schema
- Less breaking change
- Aligns with field name pattern
Changes needed:
- Update struct field names to singular
- Keep YAML tags singular (some already are)
- Update all references in code
// After refactoring
CreateIssue *CreateIssueConfig `yaml:"create-issue,omitempty"`
CloseIssue *CloseIssueConfig `yaml:"close-issue,omitempty"`
UpdateIssue *UpdateIssueConfig `yaml:"update-issue,omitempty"`
CreateDiscussion *CreateDiscussionConfig `yaml:"create-discussion,omitempty"`Option B: Standardize on PLURAL
Pros:
- Matches some existing struct names
- Semantically correct (creates multiple issues)
Cons:
- Requires schema changes
- Breaking change for existing workflows
Files Affected
pkg/workflow/compiler_types.go- Struct definitionspkg/workflow/compiler_safe_outputs.go- Safe outputs compilationpkg/parser/schemas/main_workflow_schema.json- Schema (if plural chosen)- All files referencing these structs
Success Criteria
- Choose singular OR plural convention
- Update all struct names to match convention
- Update all YAML tags to match convention
- Update schema if necessary
- Update documentation
- All tests pass
- No breaking changes for existing workflows (if singular chosen)
Recommended Approach
Phase 1: Analysis (30 minutes)
- Audit all safe-outputs struct references
- Count breaking changes for each option
- Verify workflow compatibility
Phase 2: Implementation (2-3 hours)
- Rename structs consistently
- Update YAML tags
- Update all code references
- Run tests
Phase 3: Documentation (1 hour)
- Update API docs
- Update examples
- Add migration notes if breaking
Source
Extracted from Schema Consistency Analysis discussion #13673
Priority: Medium - Code consistency improvement
AI generated by Discussion Task Miner - Code Quality Improvement Agent
- expires on Feb 18, 2026, 9:12 AM UTC
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
automationcode-qualitycookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!refactoringtask-mining