Skip to content

[dead-code] chore: remove dead functions — 5 functions removed - #77765

Merged
pelikhan merged 4 commits into
mainfrom
chore/remove-dead-functions-43603544361-df2f8a6bcb0d36ef
Nov 14, 2026
Merged

pelikhan merged 4 commits into
mainfrom
chore/remove-dead-functions-43603544361-df2f8a6bcb0d36ef

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Functions Removed

Function File
ValidateMCPConfigs pkg/workflow/mcp_config_validation.go
validateNoTemplateInjectionFromParsed pkg/workflow/template_injection_validation.go
validateNoGitHubExpressionsInRunScriptsFromParsed pkg/workflow/template_injection_validation.go
Projection.issueTransitionTargets pkg/workqueue/issue_transitions.go
Branch.synchronizeIssueTransition pkg/workqueue/branch_issue_sync.go

Tests 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

Generated by 🧹 Dead Code Removal Agent · copilot · routed: sonnet55 high · ~103 AIC · ⌖ ~2 AIC · ⊞ 5.1K · ◷

  • expires on Nov 17, 2026, 6:29 AM UTC-08:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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) {
@pelikhan
pelikhan marked this pull request as ready for review November 14, 2026 15:35
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

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.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~3 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

❌ PR Specification Reviewer failed to deliver outputs. Please review the logs for details.

PR Specification Reviewer

Outcome: reported_action

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.

Generated by PR Specification Reviewer for #77765 · copilot · gpt56 · ~3 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated by Ponytail Reviewer for #77765 · codex · routed: gpt61 medium · ~5 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 182 · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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 analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ 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: reported_no_action

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.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 8.6K · ◷

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@github-actions

Copy link
Copy Markdown
Contributor Author

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-ddc6345f-29ab-4534-a61f-e4df4a1c7b5a","parents":[],"payload":{"id":"ldg-54f7dadf-c0c2-4c91-8857-b693b1b773b0","operation":"append","value":{"finding_count":0,"head_sha":"1d8b29f9a2bdd7d3c4591bf2a7e60535f77859f3","outcome":"no_findings"}},"sha":"sha256:9fd930a34642d800f53f52082ee9bd40d86ff8891cfcc7fe6e88adb78b2c1e90","timestamp":"2026-11-14T15:43:21.708Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Fatalf now prints validateRunScriptExpressions(, true) (inline comment).
  • Lost rationale: the deleted validateNoGitHubExpressionsInRunScriptsFromParsed doc explained the stricter guardrail scope. It was dropped instead of moved (inline comment).
  • Exported API removal: ValidateMCPConfigs was exported from pkg/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)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/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 {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/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.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Fix failing check build-wasm (FAILURE): Check run.
  3. Fix failing check safe_outputs (FAILURE): Check run.

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"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

gh-aw-bot and others added 2 commits November 14, 2026 16:19
…ctions-43603544361-df2f8a6bcb0d36ef

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copilot AI commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Merged the latest main and fixed both requested failures in commit 6ad4ddba03. The WASM golden suite passes, and typed ledger schemas now constrain the generated safe-output value schema. The final gate surfaced three unrelated existing Go custom-linter findings; the modified JavaScript typecheck and 65 focused tests pass.

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)) {
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts on this branch.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.

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"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

…ctions-43603544361-df2f8a6bcb0d36ef

# Conflicts:
#	scripts/test-wasm-golden.mjs

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copilot AI commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts on this branch.

Merged current main and resolved the conflict in scripts/test-wasm-golden.mjs. Merge commit: 679ef3f.

Copilot AI commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Checked the refreshed main tip (236f4c1); it is already an ancestor of this branch via merge commit 679ef3f. The branch is current with main, so no additional merge commit was needed.

@pelikhan
pelikhan merged commit 16c75b2 into main Nov 14, 2026
85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore cookie Issue Monster Loves Cookies! dead-code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants