Skip to content

[deep-report] Consolidate duplicate ContainerPin struct (pkg/actionpins + pkg/workflow) #29144

@github-actions

Description

@github-actions

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

  1. Keep the canonical definition in pkg/actionpins/actionpins.go
  2. Remove the duplicate from pkg/workflow/action_cache.go
  3. Import pkg/actionpins in pkg/workflow/action_cache.go and alias/use actionpins.ContainerPin
  4. 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 ·

  • expires on May 1, 2026, 3:37 PM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions