Skip to content

[architect] refactor: delete dead legacy kick-cadence pipeline (computeNextKick, lookupCadence, lookupCadenceForMode) from pkg/dashboard/status_builder.go - #6185

Open
kubestellar-hive[bot] wants to merge 1 commit into
v4from
arch/refactor-dead-kick-cadence
Open

[architect] refactor: delete dead legacy kick-cadence pipeline (computeNextKick, lookupCadence, lookupCadenceForMode) from pkg/dashboard/status_builder.go#6185
kubestellar-hive[bot] wants to merge 1 commit into
v4from
arch/refactor-dead-kick-cadence

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Refactor

Deletes the production-dead string-typed kick-cadence trio from src/pkg/dashboard/status_builder.go:

  • computeNextKick — superseded by computeNextKickFromCadence (+ computeNextKickETA in next_kick_eta.go), which handles calendar cadences via config.Cadence.NextAfter
  • lookupCadence / lookupCadenceForMode — superseded by lookupCadenceValueForMode + cadenceDisplay (live at status_builder.go:552–557)

Also removes their 14 dead coverage tests in status_builder_test.go and api_coverage_test.go (~210 lines total). Kept, because they have live callers: parseCadenceDuration (api.go:2928), formatCadenceDuration (api.go:3824), cadenceDisplay, and the cadence* 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 vet clean; the sole dashboard test failure (TestReposRescanRouteRequiresDashboardAuth nil-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

…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>
@kubestellar-hive kubestellar-hive Bot added the hold label Sep 7, 2026
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Sep 7, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Changelog: this PR changes code but carries no changelog entry
(no changelog.d/ fragment and no CHANGELOG.md edit).

If it is user-visible — a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking —
please add a fragment file changelog.d/<category>-<pr-or-slug>.md
containing exactly your entry (see changelog.d/README.md; the
category is one of added/changed/deprecated/fixed/security). Please
do not append to CHANGELOG.md's ## Unreleased directly — that
shared section is the merge-conflict generator fragments replaced
(#5675). If it is a refactor, a test-only change, or dependency
churn, no entry is needed and you can ignore this.

This is a reminder, not a gate; it never blocks a merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot dco-signoff: yes Indicates the PR's author has signed the DCO. hold size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[architect] dead legacy kick-cadence pipeline in pkg/dashboard/status_builder.go (computeNextKick, lookupCadence, lookupCadenceForMode)

0 participants