Skip to content

🧹 Remove dead code: bundler subsystem, utilities, and tests#18787

Merged
dsyme merged 9 commits intomainfrom
ded3
Feb 28, 2026
Merged

🧹 Remove dead code: bundler subsystem, utilities, and tests#18787
dsyme merged 9 commits intomainfrom
ded3

Conversation

@dsyme
Copy link
Contributor

@dsyme dsyme commented Feb 28, 2026

More dead code removal

…deleted, 53 files)

- Delete entire bundler subsystem (5 source + 14 test files)
- Delete compiler_string_api.go OOPS - restored after discovering WASM uses it
- Delete other dead workflow files: copilot_participant_steps, dependency_tracker,
  env_mirror, markdown_unfencing, prompt_step, safe_output_builder, sh.go
- Delete stringutil/paths.go (callers were in bundler)
- Rescue live constants/embeds from sh.go to prompt_constants.go
- Rescue SetupActionDestination const to setup_action_paths.go
- Rewrite script_registry.go to minimal 3-function form (removes RuntimeMode)
- Remove dead functions from add_labels.go, create_issue.go, create_pull_request.go
- Remove generateStaticPromptStep from unified_prompt_step.go
- Fix all test compilation errors (remove tests for deleted functionality)
- Restore compiler_string_api.go: used by WASM binary (build constraint hides from deadcode)
- Update DEADCODE.md: add WASM build constraint warning
TestReleaseModeCompilation and TestDevModeCompilation used deleted registry
methods (RegisterWithAction, RegisterWithMode, RuntimeModeGitHubScript, Get)
that were removed when script_registry.go was rewritten in batch 2.
- Delete safe_outputs_env_integration_test.go (all 3 tests used deleted job builders)
- Remove TestSafeOutputJobsIntegration, TestSafeOutputJobsWithCustomEnvVars,
  TestSafeOutputJobsMissingConfig from safe_outputs_integration_test.go
- Fix stale imports in compiler_action_mode_test.go
- Update DEADCODE.md: always vet with -tags=integration to catch integration tests
Remove 7 zero-caller functions from compiler_types.go:
- WithActionMode, WithRepositorySlug, WithGitRoot, WithInlinePrompt
- GetDefaultVersion
- (Compiler).GetWorkflowIdentifier, (Compiler).GetRepositorySlug

Remove 10 zero-caller functions from js.go:
- GetSafeOutputsMCPServerScript, GetSafeInputsMCPServerScript
- GetSafeInputsToolFactoryScript, GetSafeInputsBootstrapScript
- GetSafeOutputsConfigScript, GetSafeOutputsAppendScript
- GetSafeOutputsHandlersScript, GetSafeOutputsToolsLoaderScript
- GetSafeOutputsBootstrapScript
- WriteJavaScriptToYAMLPreservingComments
Copilot AI review requested due to automatic review settings February 28, 2026 03:52
Copy link
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 dead / unused workflow-related code paths to reduce maintenance surface area and eliminate unused APIs.

Changes:

  • Deleted unused JS script getter functions and removed WriteJavaScriptToYAMLPreservingComments from pkg/workflow/js.go.
  • Removed unused compiler functional options and getter methods from pkg/workflow/compiler_types.go.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pkg/workflow/js.go Removes unused exported script getters and a no-longer-used YAML writer helper.
pkg/workflow/compiler_types.go Removes dead functional options/getters from the compiler API.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 30 to 37
// WithVersion overrides the auto-detected version
func WithVersion(version string) CompilerOption {
return func(c *Compiler) { c.version = version }
}

// WithActionMode overrides the auto-detected action mode
func WithActionMode(mode ActionMode) CompilerOption {
return func(c *Compiler) { c.actionMode = mode }
}

// WithSkipValidation configures whether to skip schema validation
func WithSkipValidation(skip bool) CompilerOption {
return func(c *Compiler) { c.skipValidation = skip }
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

WithActionMode was removed, but the NewCompiler doc comment still lists it as a common option (see NewCompiler comment around line 121). Please update that comment (and any similar references) to avoid pointing readers to a non-existent option, or reintroduce the option if overriding action mode is still intended to be supported.

Copilot uses AI. Check for mistakes.
@dsyme dsyme merged commit 5c574cf into main Feb 28, 2026
48 checks passed
@dsyme dsyme deleted the ded3 branch February 28, 2026 04:00
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