-
Notifications
You must be signed in to change notification settings - Fork 296
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Objective
Improve codebase readability and intent documentation by introducing type aliases for the pervasive map[string]any usage in YAML frontmatter processing.
Context
Discussion #19575 identified 1,191 map[string]any usages across 121 function signatures in pkg/workflow/. A MapToolConfig alias already exists in pkg/workflow/mcp_config_types.go:52 but adoption is inconsistent.
Approach
- Add the following type aliases to
pkg/workflow/compiler_types.go:type Frontmatter = map[string]any type ToolsMap = map[string]any
- Replace
map[string]anyparameter/return types acrosspkg/workflow/(~40 files, ~121 sites) where the value represents YAML frontmatter or tools config data - Prioritize key files first:
pkg/workflow/compiler_orchestrator_workflow.go—extractYAMLSectionspkg/workflow/agent_validation.go—validateMaxTurnsSupportpkg/workflow/safe_outputs_config.go—extractSafeOutputsConfigpkg/workflow/compiler_safe_outputs.go—parseOnSection
- Run
go build ./...to verify no breakage - Run
make fmt && make test-unitto validate
Acceptance Criteria
-
FrontmatterandToolsMaptype aliases defined inpkg/workflow/compiler_types.go - Function signatures in
pkg/workflow/updated to use the aliases where they represent frontmatter/tools data -
go build ./...passes with no errors -
make test-unitpasses
Generated by Plan Command for issue #discussion #19575 · ◷
- expires on Mar 6, 2026, 11:40 AM UTC
Reactions are currently unavailable