Apply bundler to noop.cjs to resolve load_agent_output dependency#4311
Merged
Apply bundler to noop.cjs to resolve load_agent_output dependency#4311
Conversation
- Add noopScriptSource embedding in scripts.go - Add noopScriptBundled variable with sync.Once pattern - Create getNoOpScript function with bundling logic in scripts.go - Remove old getNoOpScript function from noop.go - Keep noopScript variable in js.go for potential future use - Bundler successfully inlines load_agent_output.cjs dependency - All tests pass including JavaScript noop tests - Compiled workflow confirms require statement removed and code inlined Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Add noop_bundling_test.go to verify bundling works correctly - Test checks require statement is removed - Test verifies loadAgentOutput function is inlined - Test confirms noop logic and staged mode are present - All tests pass (Go and JavaScript) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Collaborator
|
@copilot lint and fix tests |
The noopScript variable in js.go is no longer needed since the bundled version is now in scripts.go. Removing it to satisfy linter. - Remove embedded noopScript variable from js.go - Bundling is now handled entirely in scripts.go - All tests pass - Linter passes Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Apply bundler to no_op JavaScript
Apply bundler to noop.cjs to resolve load_agent_output dependency
Nov 19, 2025
Copilot stopped work on behalf of
pelikhan due to an error
November 19, 2025 06:33
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a runtime dependency issue where noop.cjs required load_agent_output.cjs but was embedded without bundling. The fix applies the existing JavaScript bundler pattern to inline the dependency.
Key changes:
- Applied bundler to
noop.cjsto inlineload_agent_output.cjsdependency - Added test to verify bundling removes require statements
- Cleaned up duplicate/unused code references
Reviewed Changes
Copilot reviewed 74 out of 74 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/scripts.go |
Added bundled getNoOpScript() with lazy bundling via sync.Once |
pkg/workflow/noop_bundling_test.go |
Added test verifying require removal and function inlining |
pkg/workflow/noop.go |
Removed unbundled getNoOpScript() (now in scripts.go) |
pkg/workflow/js.go |
Removed unused noopScript variable |
.github/workflows/*.lock.yml (64 files) |
Compiled workflows now contain inlined loadAgentOutput function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The
noop.cjsscript requiresload_agent_output.cjsbut was embedded directly without bundling, causing unresolved dependencies at runtime.Changes
scripts.go: Added bundled
getNoOpScript()following pattern used bynotify_comment_errorand log parsersnoopScriptSourcenoopScriptBundledOnce sync.Oncefor lazy bundlingload_agent_output.cjsviaBundleJavaScriptFromSources()noop.go: Removed unbundled
getNoOpScript(), now calls bundled version from scripts.gojs.go: Removed unused
noopScriptvariablenoop_bundling_test.go: Added test verifying require statements removed and
loadAgentOutputinlinedPattern
Follows existing bundler pattern:
Compiled workflows now contain inlined
loadAgentOutputfunction with no require statements.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/usergh api user --jq .login(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.