Conversation
…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
Contributor
There was a problem hiding this comment.
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
WriteJavaScriptToYAMLPreservingCommentsfrompkg/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 } |
There was a problem hiding this comment.
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.
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.
More dead code removal