Skip to content

[deep-report] Consolidate duplicate runtime maps runtimeActionRepos and actionRepoToRuntime #41738

Description

@github-actions

Description

Two package-level maps are built from the same knownRuntimes slice in separate init() functions: actionRepoToRuntime map[string]*Runtime (pkg/workflow/runtime_definitions.go:177, populated L192-194) and runtimeActionRepos map[string]bool (pkg/workflow/safe_update_enforcement.go:136, populated L139-142). runtimeActionRepos is just the key-set of actionRepoToRuntime, so it duplicates a subset of the same data and walks knownRuntimes a second time at startup. Verified on main this run.

Fix

Derive membership from actionRepoToRuntime (e.g. _, ok := actionRepoToRuntime[repo]) and delete the redundant runtimeActionRepos map + its init loop, or expose a single accessor. Keep the existing isRuntimeActionRepo-style behavior.

Expected Impact

Removes a duplicate map and a redundant startup iteration; single source of truth for runtime action repos, less drift risk. No behavior change.

Suggested Agent

Code Simplifier or a Go-capable maintenance agent.

Estimated Effort

Fast (< 30 min).

Data Source

DeepReport 2026-06-26; Repository Quality Improvement Report #41712 (LOW). Reference verified against main.

Generated by 🔬 DeepReport - Intelligence Gathering Agent · 255.2 AIC · ⌖ 18.5 AIC · ⊞ 9.8K ·

  • expires on Jun 28, 2026, 7:36 AM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions