Skip to content

Remove 7 dead CJS scripts and their tests#26140

Merged
dsyme merged 1 commit intomainfrom
cleanup/remove-dead-cjs-scripts
Apr 14, 2026
Merged

Remove 7 dead CJS scripts and their tests#26140
dsyme merged 1 commit intomainfrom
cleanup/remove-dead-cjs-scripts

Conversation

@dsyme
Copy link
Copy Markdown
Collaborator

@dsyme dsyme commented Apr 14, 2026

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:

  • Not in the HANDLER_MAP (dynamic handler loading in safe_output_handler_manager.cjs)
  • Not require()'d by any other non-test .cjs file
  • Not referenced in Go code (pkg/workflow/, pkg/cli/)
  • Not referenced in compiled workflow YAML (.lock.yml)
  • Not referenced in shell scripts or action definitions

Files removed

File Purpose Had tests?
add_copilot_reviewer.cjs Add Copilot as PR reviewer Yes (removed)
demo_enhanced_errors.cjs Demo/example script No
expiration_helpers.cjs Expiration checkbox helpers No
markdown_transformer.cjs Markdown header level transformer Yes (removed)
safe_output_topological_sort.cjs Topological sort for safe outputs Yes (removed)
safe_outputs_mcp_client.cjs MCP client for safe outputs Yes (removed)
update_runner.cjs Shared update runner Yes (removed)

Total: 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.cjs files.

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.
Copilot AI review requested due to automatic review settings April 14, 2026 01:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 .cjs scripts from actions/setup/js/
  • Deleted 5 associated .test.cjs files 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

@dsyme dsyme merged commit b27b355 into main Apr 14, 2026
92 of 93 checks passed
@dsyme dsyme deleted the cleanup/remove-dead-cjs-scripts branch April 14, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants