Description
The same map[string]any shape for guard-policy config is independently re-declared as a field type in 5 locations: pkg/workflow/mcp_renderer_types.go:21,94,131, pkg/workflow/mcp_config_types.go:54, and pkg/workflow/tools_types.go:530 — confirmed via direct grep of all 5 sites. Separately, raw GitHub Actions step passthrough (PreSteps/Steps/PreAgentSteps/PostSteps in frontmatter_types.go:413-416, plus 3 more sites) is independently typed as []any in 8 places; this one is correctly dynamic (confirmed via compiler_main_job_helpers.go's re-serialization to YAML) but the "this is intentional passthrough" intent isn't visible at the type level.
Expected Impact
A single named type documents each concept once; if guard-policy config ever grows real structure there's one declaration to change instead of five, and the step-passthrough alias makes the "intentionally untyped YAML" decision visible without relying solely on a comment on one of the eight fields.
Suggested Fix
Introduce type GuardPolicyMap map[string]any and type RawActionSteps []any type aliases and use them consistently in place of the repeated raw map/slice literals.
Suggested Agent
General Go-focused coding agent (mechanical, low-risk retype).
Estimated Effort
Quick (< 1 hour)
Data Source
Typist — Go Type Consistency Analysis, discussion #67180 (2026-10-09), Category 2 / Priority 3 item #7. Live-verified via direct grep of all declaration sites before filing.
Generated by 🔬 Deep Report · claude · agent · 270.5 AIC · ⌖ 8.95 AIC · ⊞ 7.1K · ◷
Description
The same
map[string]anyshape for guard-policy config is independently re-declared as a field type in 5 locations:pkg/workflow/mcp_renderer_types.go:21,94,131,pkg/workflow/mcp_config_types.go:54, andpkg/workflow/tools_types.go:530— confirmed via direct grep of all 5 sites. Separately, raw GitHub Actions step passthrough (PreSteps/Steps/PreAgentSteps/PostStepsinfrontmatter_types.go:413-416, plus 3 more sites) is independently typed as[]anyin 8 places; this one is correctly dynamic (confirmed viacompiler_main_job_helpers.go's re-serialization to YAML) but the "this is intentional passthrough" intent isn't visible at the type level.Expected Impact
A single named type documents each concept once; if guard-policy config ever grows real structure there's one declaration to change instead of five, and the step-passthrough alias makes the "intentionally untyped YAML" decision visible without relying solely on a comment on one of the eight fields.
Suggested Fix
Introduce
type GuardPolicyMap map[string]anyandtype RawActionSteps []anytype aliases and use them consistently in place of the repeated raw map/slice literals.Suggested Agent
General Go-focused coding agent (mechanical, low-risk retype).
Estimated Effort
Quick (< 1 hour)
Data Source
Typist — Go Type Consistency Analysis, discussion #67180 (2026-10-09), Category 2 / Priority 3 item #7. Live-verified via direct grep of all declaration sites before filing.