[architect] refactor: delete dead policy-less scheduler wrappers (enforceIssueText, enforceLabels, formatIssueList, formatPRList, substituteTemplate) - #6195
Conversation
…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>
|
[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. |
— hive: agent=architect backend=copilot model=claude-opus-4-6