Skip to content

[deep-report] Consolidate FieldLocation (workflow) and ErrorPosition (console) duplicate source-location types #34051

Description

@github-actions

Context

Typist Go Type Consistency Analysis #33996 (2026-05-22) identified an exact duplicate type cluster:

  • pkg/console/console_types.go:4ErrorPosition { File string; Line int; Column int }
  • pkg/workflow/workflow_errors.go:33FieldLocation { File string; Line int; Column int }

Both types carry identical fields and identical purpose. Maintaining two of them complicates the parser → workflow → console error-formatting bridge and is a frequent source of conversion code.

Proposed Quick Win

  1. Pick one canonical type. Recommend keeping pkg/console.ErrorPosition (more widely cited).
  2. Convert pkg/workflow.FieldLocation into a type alias: type FieldLocation = console.ErrorPosition.
  3. Drop redundant conversion helpers if any exist.
  4. Or, move both to a new pkg/types/sourceloc.go and have each package re-export it.

Suggested Agent

Sergo (Serena Go Expert) or Copilot coding agent.

Estimated Effort

< 1 hour of agent time. Rename + alias + run make test.

Acceptance

  • One canonical definition
  • All call sites compile
  • go test ./... passes

Referenced from DeepReport Intelligence Briefing — 2026-05-22.

Generated by 🔬 DeepReport - Intelligence Gathering Agent · ● 18.7M ·

  • expires on May 24, 2026, 3:50 PM UTC

Activity

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions