Description
EngineCapabilities (pkg/workflow/agentic_engine.go:111) and EngineCapabilitiesDefinition (pkg/workflow/engine_definition.go:126) are field-for-field identical 6-bool structs. A direct struct conversion (EngineCapabilities(d)) only compiles because the two types have identical field names/order/types -- any future field addition to one without the other would silently break or drift.
Suggested Changes
- Add
yaml tags directly onto EngineCapabilities and delete EngineCapabilitiesDefinition, OR
- Make
EngineCapabilitiesDefinition a type alias: type EngineCapabilitiesDefinition = EngineCapabilities
Files Affected
pkg/workflow/agentic_engine.go:111
pkg/workflow/engine_definition.go:126,137
Success Criteria
- Only one struct definition remains (or an alias)
- Existing
ToRuntimeCapabilities() conversion path removed or simplified
- All existing tests pass
Source
Extracted from Typist - Go Type Consistency Analysis #48872
Priority
Low - <1 hour effort, prevents future drift
🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · aut00 · 51.4 AIC · ⌖ 5.2 AIC · ⊞ 9.9K · ◷
Description
EngineCapabilities(pkg/workflow/agentic_engine.go:111) andEngineCapabilitiesDefinition(pkg/workflow/engine_definition.go:126) are field-for-field identical 6-bool structs. A direct struct conversion (EngineCapabilities(d)) only compiles because the two types have identical field names/order/types -- any future field addition to one without the other would silently break or drift.Suggested Changes
yamltags directly ontoEngineCapabilitiesand deleteEngineCapabilitiesDefinition, OREngineCapabilitiesDefinitiona type alias:type EngineCapabilitiesDefinition = EngineCapabilitiesFiles Affected
pkg/workflow/agentic_engine.go:111pkg/workflow/engine_definition.go:126,137Success Criteria
ToRuntimeCapabilities()conversion path removed or simplifiedSource
Extracted from Typist - Go Type Consistency Analysis #48872
Priority
Low - <1 hour effort, prevents future drift