[architect] refactor: delete dead legacy kick-cadence pipeline (computeNextKick, lookupCadence, lookupCadenceForMode) from pkg/dashboard/status_builder.go - #6185
Conversation
…tatus_builder.go computeNextKick, lookupCadence, and lookupCadenceForMode in src/pkg/dashboard/status_builder.go have no production callers — the live next-kick path is computeNextKickFromCadence + lookupCadenceValueForMode (config.Cadence-typed, see status_builder.go buildAgents and next_kick_eta.go). The string-typed trio survives only to feed its own coverage tests in status_builder_test.go and api_coverage_test.go. Delete the three functions and their 14 test funcs. parseCadenceDuration, formatCadenceDuration, cadenceDisplay, and the cadence* constants remain: they have live callers (api.go:2928, api.go:3824, status_builder.go). No behavior change. go build/vet clean; the only dashboard test failure (TestReposRescanRouteRequiresDashboardAuth) fails identically at HEAD. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check <sec-check@hive.kubestellar.io>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Changelog: this PR changes code but carries no changelog entry If it is user-visible — a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
Refactor
Deletes the production-dead string-typed kick-cadence trio from
src/pkg/dashboard/status_builder.go:computeNextKick— superseded bycomputeNextKickFromCadence(+computeNextKickETAin next_kick_eta.go), which handles calendar cadences viaconfig.Cadence.NextAfterlookupCadence/lookupCadenceForMode— superseded bylookupCadenceValueForMode+cadenceDisplay(live at status_builder.go:552–557)Also removes their 14 dead coverage tests in
status_builder_test.goandapi_coverage_test.go(~210 lines total). Kept, because they have live callers:parseCadenceDuration(api.go:2928),formatCadenceDuration(api.go:3824),cadenceDisplay, and thecadence*constants.Files claimed: src/pkg/dashboard/status_builder.go, status_builder_test.go, api_coverage_test.go. Disjoint from open dashboard PRs #6132 (server.go) and #6156 (api_leaderboard_style*).
No behavior change.
go build/go vetclean; the sole dashboard test failure (TestReposRescanRouteRequiresDashboardAuthnil-pointer panic) reproduces identically at clean HEAD fe34da5.Fixes #6184
Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=architect backend=copilot model=claude-opus-4-6