Skip to content

[architect] refactor: delete dead policy-less scheduler wrappers (enforceIssueText, enforceLabels, formatIssueList, formatPRList, substituteTemplate) - #6195

Open
kubestellar-hive[bot] wants to merge 1 commit into
v4from
arch/refactor-scheduler-policyless-wrappers
Open

[architect] refactor: delete dead policy-less scheduler wrappers (enforceIssueText, enforceLabels, formatIssueList, formatPRList, substituteTemplate)#6195
kubestellar-hive[bot] wants to merge 1 commit into
v4from
arch/refactor-scheduler-policyless-wrappers

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

— hive: agent=architect backend=copilot model=claude-opus-4-6

…orceIssueText, enforceLabels, formatIssueList, formatPRList, substituteTemplate)

pkg/scheduler kept five thin legacy wrappers that discard the fail-closed
policy bool of their live ...WithPolicy/...Verdict counterparts and are
unreachable from any cmd/ binary (x/tools deadcode): enforceIssueText,
enforceLabels, formatIssueList, formatPRList (scheduler.go, ioscan_enforce.go)
and substituteTemplate (scheduler.go). Only tests called them, so the suite
exercised a dual API that production never uses and silently dropped the
fail-closed signal at 43 call sites.

Delete the wrappers, migrate all test call sites to the WithPolicy/Verdict
variants (discarding the bool explicitly), and move the ioscan enforcement
doc comments onto the surviving functions. No behavior change: each wrapper
was a one-line delegation that dropped the second return value.

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 danathar 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

@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.

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 7, 2026
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.

0 participants