Remove 7 dead CJS scripts and their tests#26140
Merged
Conversation
Remove unused JavaScript files that have zero references from production code (not in HANDLER_MAP, not required by other .cjs files, not referenced in Go code or compiled workflows): Dead scripts removed: - add_copilot_reviewer.cjs (+ test) - demo_enhanced_errors.cjs - expiration_helpers.cjs - markdown_transformer.cjs (+ test) - safe_output_topological_sort.cjs (+ test) - safe_outputs_mcp_client.cjs (+ test) - update_runner.cjs (+ test) Total: 7 source files + 5 test files = 12 files removed.
Contributor
There was a problem hiding this comment.
Pull request overview
Removes a set of unused CommonJS helper/demo scripts under actions/setup/js/ along with their now-orphaned Vitest test files.
Changes:
- Deleted 7 unreferenced
.cjsscripts fromactions/setup/js/ - Deleted 5 associated
.test.cjsfiles that only exercised the removed scripts
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/update_runner.cjs | Removed unused shared update runner module. |
| actions/setup/js/update_runner.test.cjs | Removed tests for deleted update runner module. |
| actions/setup/js/safe_outputs_mcp_client.cjs | Removed unused MCP stdio client script. |
| actions/setup/js/safe_outputs_mcp_client.test.cjs | Removed tests for deleted MCP client script. |
| actions/setup/js/safe_output_topological_sort.cjs | Removed unused topological sort helper for safe outputs. |
| actions/setup/js/safe_output_topological_sort.test.cjs | Removed tests for deleted topological sort module. |
| actions/setup/js/markdown_transformer.cjs | Removed unused markdown header transformer helper. |
| actions/setup/js/markdown_transformer.test.cjs | Removed tests for deleted markdown transformer. |
| actions/setup/js/add_copilot_reviewer.cjs | Removed unused script for adding Copilot as a PR reviewer. |
| actions/setup/js/add_copilot_reviewer.test.cjs | Removed tests for deleted reviewer script. |
| actions/setup/js/expiration_helpers.cjs | Removed unused expiration checkbox helper. |
| actions/setup/js/demo_enhanced_errors.cjs | Removed unused demo script for enhanced error messages. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 12/12 changed files
- Comments generated: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes 7 unused JavaScript files (and 5 associated test files) that have zero references from production code.
Methodology
Systematic cross-referencing confirmed these files are:
HANDLER_MAP(dynamic handler loading insafe_output_handler_manager.cjs)require()'d by any other non-test.cjsfilepkg/workflow/,pkg/cli/).lock.yml)Files removed
add_copilot_reviewer.cjsdemo_enhanced_errors.cjsexpiration_helpers.cjsmarkdown_transformer.cjssafe_output_topological_sort.cjssafe_outputs_mcp_client.cjsupdate_runner.cjsTotal: 12 files, 3,243 lines deleted
Not removed (confirmed alive)
Fuzz harnesses (
fuzz_*_harness.cjs) were initially flagged but confirmed as test infrastructure — they are exercised by their co-located.test.cjsfiles.