Description
The Typist Go type analysis (discussion #29092) identified an exact duplicate struct defined in two packages:
pkg/actionpins/actionpins.go:45
pkg/workflow/action_cache.go:33
Both have identical fields and JSON tags. This forces an explicit type conversion at pkg/workflow/action_pins.go:94, adding friction whenever these types need to interoperate.
// Both packages define this identically:
type ContainerPin struct {
Image string `json:"image"`
Digest string `json:"digest"`
PinnedImage string `json:"pinned_image"`
}
Expected Fix
- Keep the canonical definition in
pkg/actionpins/actionpins.go
- Remove the duplicate from
pkg/workflow/action_cache.go
- Import
pkg/actionpins in pkg/workflow/action_cache.go and alias/use actionpins.ContainerPin
- Remove the now-unnecessary explicit type conversion at
pkg/workflow/action_pins.go:94
Expected Impact
Eliminates a hidden maintenance hazard where the two structs can drift apart. Removes one type conversion.
Suggested Agent
Copilot or Claude code agent — straightforward refactor with clear before/after.
Estimated Effort
Fast (< 30 min)
Data Source
DeepReport Intelligence Briefing — 2026-04-29 · Typist analysis discussion #29092 · Run §25117657405
Generated by DeepReport - Intelligence Gathering Agent · ● 654.3K · ◷
Description
The Typist Go type analysis (discussion #29092) identified an exact duplicate struct defined in two packages:
pkg/actionpins/actionpins.go:45pkg/workflow/action_cache.go:33Both have identical fields and JSON tags. This forces an explicit type conversion at
pkg/workflow/action_pins.go:94, adding friction whenever these types need to interoperate.Expected Fix
pkg/actionpins/actionpins.gopkg/workflow/action_cache.gopkg/actionpinsinpkg/workflow/action_cache.goand alias/useactionpins.ContainerPinpkg/workflow/action_pins.go:94Expected Impact
Eliminates a hidden maintenance hazard where the two structs can drift apart. Removes one type conversion.
Suggested Agent
Copilot or Claude code agent — straightforward refactor with clear before/after.
Estimated Effort
Fast (< 30 min)
Data Source
DeepReport Intelligence Briefing — 2026-04-29 · Typist analysis discussion #29092 · Run §25117657405