Skip to content

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

Merged
pelikhan merged 4 commits into
mainfrom
chore/remove-dead-functions-37132019179-9e8280d5463af600
Oct 3, 2026
Merged

pelikhan merged 4 commits into
mainfrom
chore/remove-dead-functions-37132019179-9e8280d5463af600

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Functions Removed

Function File
CodexEngine.expandNeutralToolsToCodexTools pkg/workflow/codex_engine.go
applyCodexPlaywrightTool pkg/workflow/codex_engine.go
CodexEngine.expandNeutralToolsToCodexToolsFromMap pkg/workflow/codex_engine.go
writeIndentedCodexConfig pkg/workflow/codex_mcp.go
GetLogParserBootstrap pkg/workflow/js.go

Tests Removed

  • pkg/workflow/codex_playwright_test.go (TestCodexEnginePlaywrightUsesCLI, TestCodexEnginePlaywrightPreservesCustomMCPServer)
  • subtest "normalizes unterminated whitespace-only final config line" in codex_engine_test.go

Verification

  • go build ./...
  • go vet ./...
  • go vet -tags=integration ./...
  • make fmt

Note: go test ./pkg/workflow has 2 failures (TestCloudHypervisorSetupBundleScriptExecutesAgainstFixtures, TestBuildDynamicEnclaveExpiryScriptResolvesMinOfConfiguredAndJobExpiry) that also fail without these changes.

https://github.com/github/gh-aw/actions/runs/37132019179

Generated by 🧹 Dead Code Removal Agent · copilot · auto · 23.9 AIC · ⌖ 10.3 AIC · ⊞ 9.8K · ◷

  • expires on Oct 6, 2026, 7:16 AM UTC-08:00

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 57.7 AIC · ⌖ 8.7 AIC · ⊞ 9.9K · ◷
Comment /souschef to run again

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review October 3, 2026 15:55
Copilot AI balanced review requested due to automatic review settings October 3, 2026 15:55
@github-actions

github-actions Bot commented Oct 3, 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.

No ADR enforcement needed: PR #65340 does not have the implementation label and has 0 new lines of code in default business logic directories, so it does not meet the design decision gate.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Oct 3, 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

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Code Quality Reviewer completed the code quality review.

safeoutputs CLI is blocked in this environment; no GitHub write was possible from this run

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Ponytail Reviewer completed successfully!

Lean already. Ship.

Generated by Ponytail Reviewer for #65340

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.

Copilot review overview

🟡 Changes recommended

Removing the documented exported bootstrap function creates an unacknowledged breaking Go API change.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Removes five apparently unused workflow helpers and their dedicated tests.

Changes:

  • Removes obsolete Codex tool/config helpers.
  • Removes an empty JavaScript bootstrap getter.
  • Deletes tests tied exclusively to removed helpers.
File Description
pkg/​workflow/​js.go Removes the log-parser bootstrap getter.
pkg/​workflow/​codex_playwright_test.go Removes tests for deleted Codex wrappers.
pkg/​workflow/​codex_mcp.go Removes an unused indentation helper.
pkg/​workflow/​codex_engine.go Removes unused tool-conversion helpers.
pkg/​workflow/​codex_engine_test.go Removes the deleted helper’s test.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread pkg/workflow/js.go

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

Pure dead-code removal (0 additions, 162 deletions across 5 files) — applied /codebase-design to check for dangling references and /tdd to confirm removed tests matched removed code.

📋 Verification performed
  • go build ./... — passes
  • Targeted tests (TestCodex*, TestGetLogParser*) in pkg/workflow — all pass
  • Grepped the full repo for all 5 removed symbols (expandNeutralToolsToCodexTools, applyCodexPlaywrightTool, expandNeutralToolsToCodexToolsFromMap, writeIndentedCodexConfig, GetLogParserBootstrap) — zero remaining references
  • Confirmed writeIndentedCodexConfig was TOML-indentation logic made obsolete now that Codex config is rendered as JSON via GH_AW_CODEX_CONFIG_JSON, consistent with the rest of codex_mcp.go
  • maps import in codex_engine.go remains used elsewhere (getGitIdentityEnvVars), so no unused-import fallout

No functional code was changed — only removal of unreachable functions and their corresponding tests. Nothing actionable to flag.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 25.2 AIC · ⌖ 14.3 AIC · ⊞ 10K
Comment /matt to run again

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Comment Memory

reviewed_at: 2026-10-03T15:58:03Z
review_event: REQUEST_CHANGES
top_themes:
  - public API compatibility
files_reviewed:
  - pkg/workflow/codex_engine.go
  - pkg/workflow/codex_engine_test.go
  - pkg/workflow/codex_mcp.go
  - pkg/workflow/codex_playwright_test.go
  - pkg/workflow/js.go
comment_count: 1

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 76.7 AIC · ⌖ 7.3 AIC · ⊞ 19.2K · ◷
Comment /review 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.

Request changes

This cleanup still removes an exported pkg/workflow symbol, so it is a breaking API change rather than a no-risk dead-code deletion.

Blocking theme
  • pkg/workflow/js.go: GetLogParserBootstrap is exported and documented in the package surface, so deleting it will break downstream builds even though internal references are gone.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 76.7 AIC · ⌖ 7.3 AIC · ⊞ 19.2K
Comment /review to run again

Comment thread pkg/workflow/js.go
func GetLogParserBootstrap() string {
return ""
}

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.

Removing GetLogParserBootstrap is a public API break for any downstream code importing pkg/workflow, so this is not a safe "dead code" deletion.

💡 Why this blocks merge

GetLogParserBootstrap is exported, and pkg/workflow/README.md still lists it as part of the package surface. Internal callsites being gone only proves it is dead inside this repo; external consumers compiling against github.com/github/gh-aw/pkg/workflow will now fail at build time.

Please either keep a deprecated shim that preserves the symbol (it can keep returning ""), or treat this as an intentional breaking change with the corresponding release-note/API-compat path.

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.

Restored the original exported GetLogParserBootstrap() string getter in 8404eeb, preserving its empty-string return value. Added a regression test; the full workflow package test suite passes. This cleanup no longer removes the public symbol.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please take another pass on this PR.

Outstanding unresolved review feedback on the current head:

No failed checks are currently reported for this head. Please address or explicitly disposition the blocking review feedback, refresh the branch if GitHub offers it, and then run the pr-finisher skill before handing this back to maintainers.

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 57.7 AIC · ⌖ 8.7 AIC · ⊞ 9.9K · ◷
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

@copilot please take another pass on this PR.

Outstanding unresolved review feedback on the current head:...

Addressed both blocking threads in 8404eeb by restoring the exported getter and adding a regression test. Ran pr-finisher: the branch already includes current main; build, formatting, lint, focused tests, and the full workflow package suite pass. The final progress gate reports pre-existing smoke-Codex lock-file drift, left outside this fix. Automated review was unavailable (fallback review found no issues), and CodeQL skipped its oversized database. Both review threads have replies; thread-resolution tooling is unavailable here. CI on the new head remains unverified, so this is not yet a fully merge-ready handoff.

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI requested a review from gh-aw-bot October 3, 2026 16:30
@pelikhan
pelikhan merged commit 1b27443 into main Oct 3, 2026
@pelikhan
pelikhan deleted the chore/remove-dead-functions-37132019179-9e8280d5463af600 branch October 3, 2026 16:51
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v0.91.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants