Skip to content

[Code Quality] refactor: unify updateFailure/actionUpdateFailure duplicate structs in pkg/cli/update_types.go #49345

Closed as not planned

Description

@github-actions

Description

pkg/cli/update_types.go declares two structurally identical error-record types six lines apart: updateFailure{Name, Error string} (line 10) and actionUpdateFailure{name, err string} (line 17). Both represent the same "name + failure message" concept with only casing/field-name differences (unexported fields in the second).

Suggested Changes

  • Unify into a single exported updateFailure{Name, Error string} type
  • Update the actionUpdateFailure call sites (workflow action update-check path) to use updateFailure instead
  • Remove the now-redundant actionUpdateFailure type

Files Affected

  • pkg/cli/update_types.go
  • Call sites constructing/reading actionUpdateFailure (search pkg/cli/update_command.go and related update-flow files)

Success Criteria

  • Single canonical updateFailure struct used for both workflow-update and action-update failure records
  • No behavior change; existing update command output/tests unaffected
  • make test-unit and make build pass

Source

Extracted from Typist - Go Type Consistency Analysis discussion #49330 (Cluster 1, estimated <1 hour)

Priority

Low - trivial exact-duplicate cleanup, low risk, quick win

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · auto · 57.7 AIC · ⌖ 5.34 AIC · ⊞ 10.2K · ◷

  • expires on Aug 1, 2026, 5:24 AM UTC-08:00

Activity

  1. github-actions commented on Aug 1, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-08-01T13:24:19.989Z.

    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