Skip to content

[deep-report] Type run_phase.go constants as RunPhase instead of untyped string #66137

Description

@github-actions

Description

pkg/workflow/run_phase.go:7-10 declares workflow run-phase constants as untyped string literals (runPhaseAgent = "agent", runPhaseDetection = "detection", runPhaseEvals = "evals"), returned from workflowRunPhase() as a bare string. The value is compared via == at 10+ call sites across 5 engine files (claude_engine.go, codex_engine.go, copilot_engine_execution.go, gemini_engine.go, pi_engine.go). Because the type is untyped string, a typo'd literal compiles silently and linters can't flag an exhaustiveness gap when a new phase is added.

Fix

Introduce type RunPhase string with the three constants typed as RunPhase, and change workflowRunPhase()'s return type to RunPhase.

Expected Impact

Compile-time safety against typo'd phase literals; enables exhaustiveness linting across the 5 engine files when a new run phase is added.

Suggested Agent

General coding agent — small, mechanical type change plus updating the 5 call-site comparisons.

Estimated Effort

Quick (< 1 hour)

Data Source

DeepReport Intelligence Briefing (2026-10-06, incremental cycle) — sourced from Typist: Go Type Consistency Analysis discussion #66107, live-verified against current pkg/workflow/run_phase.go.

Generated by 🔬 Deep Report · claude · agent · 207.7 AIC · ⌖ 7.97 AIC · ⊞ 7.1K · ◷

  • expires on Oct 8, 2026, 4:50 AM UTC-08:00

Activity

  1. github-actions commented on Oct 8, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-10-08T12:50:44.414Z.

    Closed by Workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions