Repository navigation
[dead-code] chore: remove dead functions — 4 functions removed - #76529
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Active issues remain because the rename left stale function references in code and ADR documentation, and removing a test eliminated direct coverage of a still-live warning diagnostic.
2 open issues
What changed in this PR
This pull request removes four unused workflow helper functions and updates affected tests to call the canonical implementations directly.
Changes:
- Removes redundant model-routing, alias-expansion, OpenAI WIF validation, and Claude tool helpers.
- Repoints unit and integration tests to the live implementations.
- Removes the obsolete routed-model override test and updates related documentation and comments.
| File | Description |
|---|---|
| pkg/workflow/reported_tool_permissions_test.go | Updates Claude tool permission tests to use the dynamic workflow implementation. |
| pkg/workflow/neutral_tools_simple_test.go | Repoints neutral-tool tests to the live Claude tool helper. |
| pkg/workflow/model_routing.go | Removes the unused routed-model warning method. |
| pkg/workflow/model_routing_test.go | Removes the test for the deleted routed-model warning method. |
| pkg/workflow/model_routing_candidates.go | Removes the redundant model alias expansion wrapper. |
| pkg/workflow/model_routing_aliases_test.go | Updates alias expansion tests to call the namespace-aware implementation. |
| pkg/workflow/git_commands_test.go | Updates Claude tool permission tests to use the canonical helper. |
| pkg/workflow/git_commands_integration_test.go | Updates integration setup to use the live Claude tool implementation. |
| pkg/workflow/compiler_validators.go | Removes the redundant OpenAI WIF validation wrapper. |
| pkg/workflow/codex_azure_oidc_test.go | Updates tests to call path-aware OpenAI WIF validation directly. |
| pkg/workflow/claude_tools.go | Removes the unused Claude tool computation wrapper. |
| pkg/workflow/claude_permissions_test.go | Updates scoped Claude permission tests to use the live helper. |
| pkg/workflow/claude_engine.go | Updates an explanatory comment to reference the remaining Claude tool helper. |
| pkg/workflow/claude_engine_tools_test.go | Repoints Claude tool computation tests to the canonical implementation. |
| pkg/workflow/bash_defaults_consistency_test.go | Updates cross-engine default consistency tests to use the live helper. |
Review effort: Lite (auto)
| } | ||
|
|
||
| // computeAllowedClaudeToolsString generates the tool specification string for Claude's --allowed-tools flag. | ||
| // computeAllowedClaudeToolsStringWithDynamicWorkflows generates the tool specification string for Claude's --allowed-tools flag. |
| require.Equal(t, 1, compiler.GetWarningCount()) | ||
| } | ||
|
|
||
| func TestGenerateModelRoutingConversationStep(t *testing.T) { |
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🎉 This pull request is included in a new release. Release: |

Functions Removed
Compiler.warnRoutedModelOverridespkg/workflow/model_routing.govalidateOpenAIWIFEngineAuthpkg/workflow/compiler_validators.goexpandModelRoutingAliaspkg/workflow/model_routing_candidates.goClaudeEngine.computeAllowedClaudeToolsStringpkg/workflow/claude_tools.goTest-only callers were repointed to the live equivalents (
validateOpenAIWIFEngineAuthAtPath,expandModelRoutingAliasInNamespace,computeAllowedClaudeToolsStringWithDynamicWorkflows(..., false)).Tests Removed
TestWarnRoutedModelOverridesVerification
go build ./...go vet ./...https://github.com/github/gh-aw/actions/runs/42831976347