Description
Several fixed-value-set fields are declared as bare string instead of a named enum type, despite the valid values being fully known and documented in code — verified live at all locations:
pkg/workflow/safe_outputs_validation.go:16-17 — SafeOutputsURLsPolicyAllowedOnly/...AllowedOrCodeRegion are untyped consts, compared via switch config.URLs where URLs string.
pkg/workflow/reactions.go:12-21 — validReactions map[string]bool has 8 literal reaction keys, consumed via AIReaction string.
pkg/workflow/mcp_scripts_parser.go:56 — MCPScriptParam.Type string documents exactly 5 legal JSON-schema type values in a comment but stays a bare string.
pkg/workflow/frontmatter_types.go:10 — RunnerTopologyArcDind = "arc-dind" is the only value today but is compared via a switch/error-message pattern signaling it's meant to grow.
Expected Impact
Each of these becomes compiler-enforced instead of only validated at runtime — a typo like "allow-only" or an invalid reaction currently fails silently or late; a named type rejects it at compile time. Low-risk, mechanical, and enables exhaustive switch checking.
Suggested Agent
Copilot coding agent — introduce SafeOutputsURLsPolicy, ReactionType, MCPParamType, and RunnerTopology as named string types with consts; update field types and switch statements; run tests.
Estimated Effort
Medium (3-4 hours combined)
Data Source
DeepReport analysis, 2026-08-21 cycle, sourced from discussion #54506 (Typist - Go Type Consistency Analysis), Untyped Usages Categories 1 & 3. No existing open issue found covering these specific fields.
Generated by 🔬 Deep Report · agent · 186.6 AIC · ⌖ 14.7 AIC · ⊞ 11.9K · ◷
Description
Several fixed-value-set fields are declared as bare
stringinstead of a named enum type, despite the valid values being fully known and documented in code — verified live at all locations:pkg/workflow/safe_outputs_validation.go:16-17—SafeOutputsURLsPolicyAllowedOnly/...AllowedOrCodeRegionare untyped consts, compared viaswitch config.URLswhereURLs string.pkg/workflow/reactions.go:12-21—validReactions map[string]boolhas 8 literal reaction keys, consumed viaAIReaction string.pkg/workflow/mcp_scripts_parser.go:56—MCPScriptParam.Type stringdocuments exactly 5 legal JSON-schema type values in a comment but stays a bare string.pkg/workflow/frontmatter_types.go:10—RunnerTopologyArcDind = "arc-dind"is the only value today but is compared via a switch/error-message pattern signaling it's meant to grow.Expected Impact
Each of these becomes compiler-enforced instead of only validated at runtime — a typo like
"allow-only"or an invalid reaction currently fails silently or late; a named type rejects it at compile time. Low-risk, mechanical, and enables exhaustiveswitchchecking.Suggested Agent
Copilot coding agent — introduce
SafeOutputsURLsPolicy,ReactionType,MCPParamType, andRunnerTopologyas named string types with consts; update field types and switch statements; run tests.Estimated Effort
Medium (3-4 hours combined)
Data Source
DeepReport analysis, 2026-08-21 cycle, sourced from discussion #54506 (Typist - Go Type Consistency Analysis), Untyped Usages Categories 1 & 3. No existing open issue found covering these specific fields.