Repository navigation
[dead-code] chore: remove dead functions — 5 functions removed - #77765
Conversation
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The change removes the exported ValidateMCPConfigs API, creating a source-breaking compatibility issue for external consumers unless a deprecated wrapper is retained or a major-version change is made.
1 open issue
What changed in this PR
This pull request removes five wrapper functions and retargets tests and documentation to the underlying workflow validation and workqueue synchronization implementations. Removing the exported ValidateMCPConfigs function is a source-breaking API change, and the benchmark retains stale naming and a malformed failure label.
Changes:
- Removes redundant MCP, template-injection, issue-transition, and synchronization wrappers.
- Retargets unit, benchmark, heredoc, sanitizer, and fuzz tests to live implementations.
- Updates API documentation and compiler comments.
| File | Description |
|---|---|
| pkg/workqueue/issue_transitions.go | Removes the unused issue-transition target wrapper. |
| pkg/workqueue/issue_transitions_test.go | Retargets issue-transition tests to issueTransitionSelection. |
| pkg/workqueue/branch_issue_sync.go | Removes the unused issue synchronization wrapper. |
| pkg/workqueue/branch_issue_sync_test.go | Retargets synchronization tests to synchronizeCheckedIssueTransition. |
| pkg/workflow/template_injection_validation.go | Removes redundant parsed-workflow template-injection validation wrappers and updates comments. |
| pkg/workflow/template_injection_validation_test.go | Retargets template-injection validation tests to the live validators. |
| pkg/workflow/template_injection_validation_benchmark_test.go | Retargets the benchmark to validateRunScriptExpressions, while retaining stale benchmark naming and a malformed failure label. |
| pkg/workflow/template_injection_heredoc_test.go | Retargets heredoc validation tests to the live validators. |
| pkg/workflow/run_step_sanitizer_test.go | Retargets sanitizer validation tests to the live validators. |
| pkg/workflow/run_step_sanitizer_fuzz_test.go | Retargets fuzz validation to the live expression validator. |
| pkg/workflow/README.md | Removes the deleted MCP validation function from the exported API appendix. |
| pkg/workflow/mcp_json_test.go | Retargets MCP configuration tests to the warnings-returning validator. |
| pkg/workflow/mcp_config_validation.go | Removes the exported ValidateMCPConfigs wrapper. |
| pkg/workflow/error_message_quality_test.go | Retargets MCP error-quality tests to the live validator. |
| pkg/workflow/compiler.go | Updates template-validation comments to reference the underlying functions. |
Review effort: Lite (dynamic)
| return err | ||
| } | ||
|
|
||
| func validateMCPConfigsWithWarnings(tools map[string]any) ([]string, error) { |
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
❌ PR Specification Reviewer failed to deliver outputs. Please review the logs for details. PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ 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.
|
|
✅ 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.
|
|
✅ 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.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
There was a problem hiding this comment.
Reviewed head 1d8b29f against compiler threat-detection v1.0.102, security architecture v1.1.9, and the work-queue specification. Blocking finding: removing exported pkg/workflow.ValidateMCPConfigs is a source-breaking public API removal; absence of in-repository callers does not establish external compatibility. The generated public API appendix changes, but no deprecation, migration, or approved major-version treatment is provided. Please retain the exported wrapper or provide the repository-approved compatibility treatment. Existing inline comment records this finding; no duplicate was added. Static review only; tests were not run.
Generated by PR Specification Reviewer for #77765 · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review-specs to run again
There was a problem hiding this comment.
Review complete: no new actionable issues found in the current diff. The existing review comment about removing the exported ValidateMCPConfigs API remains the relevant concern.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design and /tdd. The refactor is behaviour-preserving: each removed wrapper was a one-line delegate, and every test now calls the live function directly. go vet, gofmt, and targeted tests for pkg/workflow and pkg/workqueue pass.
📋 Key Themes & Highlights
Key Themes
- Stale identifier in a failure message: the benchmark
Fatalfnow printsvalidateRunScriptExpressions(, true)(inline comment). - Lost rationale: the deleted
validateNoGitHubExpressionsInRunScriptsFromParseddoc explained the stricter guardrail scope. It was dropped instead of moved (inline comment). - Exported API removal:
ValidateMCPConfigswas exported frompkg/workflow. Removing it is source-breaking for any external importer. This is already raised in the existing review thread. If no external consumers exist, the removal is fine, but the PR should say so explicitly.
Positive Highlights
- ✅ Thin delegate wrappers removed, with test-only callers retargeted rather than deleted
- ✅ Stale doc references updated to the live entry points
- ✅ Historical ADR reference left intact, which is correct
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| if err := validateNoGitHubExpressionsInRunScriptsFromParsed(parsed); err != nil { | ||
| b.Fatalf("validateNoGitHubExpressionsInRunScriptsFromParsed() error = %v", err) | ||
| if err := validateRunScriptExpressions(parsed, true); err != nil { | ||
| b.Fatalf("validateRunScriptExpressions(, true) error = %v", err) |
There was a problem hiding this comment.
[/tdd] The failure message now prints validateRunScriptExpressions(, true) because the rename left an empty argument in the format string. The message should name the function, not show a blank argument.
💡 Suggested fix
b.Fatalf("validateRunScriptExpressions() error = %v", err)@copilot please address this.
| return validateRunScriptExpressions(workflow, true) | ||
| } | ||
|
|
||
| func validateRunScriptExpressions(workflow map[string]any, checkShellEvaluation bool) error { |
There was a problem hiding this comment.
[/codebase-design] The deleted wrapper validateNoGitHubExpressionsInRunScriptsFromParsed documented why this guardrail exists: it rejects expressions left in run: scripts, including comments and quoted heredocs that the sanitizer preserves. That doc was dropped rather than moved, so validateRunScriptExpressions now has no explanation of its stricter scope.
💡 Suggested doc
// validateRunScriptExpressions rejects GitHub Actions expressions left in run: scripts.
// It also covers comments and quoted heredocs that the sanitizer preserves,
// so it is stricter than the sanitizer itself.@copilot please address this.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "1d8b29f9a2bdd7d3c4591bf2a7e60535f77859f3",
"kind": "requested",
"schema_version": "1",
"state": "363191b668ee837e37e3ccf85c112bf8ce373f3f369db93b72c0714e5f2c259c",
"work": [
"8acb61a077717e3a460018aacdfde96fd489f77606cd36169e2328d9079b75bb",
"c7cf93e497befdd5e698d00101b0703e4101fe4133d86d433f7c170d07402b7e"
],
"workflow": "pr-sous-chef"
}
|
…ctions-43603544361-df2f8a6bcb0d36ef Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged the latest |
| if (generalLedgers.length === 1 && generalLedgers[0].schema && !containsSchemaRef(generalLedgers[0].schema)) { | ||
| enhancedTool.inputSchema.properties.record = { ...enhancedTool.inputSchema.properties.record, ...generalLedgers[0].schema }; | ||
| } | ||
| } else if (generalLedgers.length === 1 && typeof generalLedgers[0].type === "string" && ["log", "set", "table"].includes(generalLedgers[0].type) && generalLedgers[0].schema && !containsSchemaRef(generalLedgers[0].schema)) { |
|
@copilot resolve the merge conflicts on this branch. |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "6ad4ddba03bda80c174b961de9a0fec827539e44",
"kind": "requested",
"schema_version": "1",
"state": "6871e6d0490166f5d9e900b291419dd599faea51230610be6acff4a7b332c685",
"work": [],
"workflow": "pr-sous-chef"
}
|
…ctions-43603544361-df2f8a6bcb0d36ef # Conflicts: # scripts/test-wasm-golden.mjs Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged current |
Checked the refreshed |

Functions Removed
ValidateMCPConfigsvalidateNoTemplateInjectionFromParsedvalidateNoGitHubExpressionsInRunScriptsFromParsedProjection.issueTransitionTargetsBranch.synchronizeIssueTransitionTests Removed
None. All five were thin wrappers with test-only callers; their tests were retargeted to the underlying live functions (
validateMCPConfigsWithWarnings,validateRunScriptTemplateInjection,validateRunScriptExpressions,issueTransitionSelection,synchronizeCheckedIssueTransition). Stale doc/comment references were updated.Verification
go build ./...go vet ./...https://github.com/github/gh-aw/actions/runs/43603544361