Context
Typist Go Type Consistency Analysis #33996 (2026-05-22) identified an exact duplicate type cluster:
pkg/console/console_types.go:4 — ErrorPosition { File string; Line int; Column int }
pkg/workflow/workflow_errors.go:33 — FieldLocation { 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
- Pick one canonical type. Recommend keeping
pkg/console.ErrorPosition (more widely cited).
- Convert
pkg/workflow.FieldLocation into a type alias: type FieldLocation = console.ErrorPosition.
- Drop redundant conversion helpers if any exist.
- 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 · ◷
Context
Typist Go Type Consistency Analysis #33996 (2026-05-22) identified an exact duplicate type cluster:
pkg/console/console_types.go:4—ErrorPosition { File string; Line int; Column int }pkg/workflow/workflow_errors.go:33—FieldLocation { 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
pkg/console.ErrorPosition(more widely cited).pkg/workflow.FieldLocationinto a type alias:type FieldLocation = console.ErrorPosition.pkg/types/sourceloc.goand 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
go test ./...passesReferenced from DeepReport Intelligence Briefing — 2026-05-22.