Skip to content

[deep-report] Type 4 implicit string enums (SafeOutputsURLsPolicy, ReactionType, MCPParamType, RunnerTopology) #54532

Description

@github-actions

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:

  1. pkg/workflow/safe_outputs_validation.go:16-17SafeOutputsURLsPolicyAllowedOnly/...AllowedOrCodeRegion are untyped consts, compared via switch config.URLs where URLs string.
  2. pkg/workflow/reactions.go:12-21validReactions map[string]bool has 8 literal reaction keys, consumed via AIReaction string.
  3. pkg/workflow/mcp_scripts_parser.go:56MCPScriptParam.Type string documents exactly 5 legal JSON-schema type values in a comment but stays a bare string.
  4. pkg/workflow/frontmatter_types.go:10RunnerTopologyArcDind = "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 ·

  • expires on Aug 23, 2026, 4:35 AM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions