Repository navigation
Conversation
Running as the image CMD has two problems: the Actor's real start command is lost (the entrypoint is guessed from package.json/conventional paths), and an ENTRYPOINT defined in the Actor's own Dockerfile silently swallows our CMD, so the Actor runs with no debugger and no error. As ENTRYPOINT, Docker appends the image's own CMD to our arguments. Everything after --brk is now treated as that start command and resolved into a Node.js launch spec, keeping the original node flags and script arguments: node [flags] <script> [args] -> that script, flags and args preserved npm|pnpm|yarn [run] <script> -> the package.json script, parsed again sh -c "<command>" -> the inner command, parsed again <path> -> that file (the explicit-path form) Chained scripts are resolved from the last segment back, so `npm run build && node dist/main.js` debugs the Actor, not the build step. With no command passed, the previous auto-detection still applies, so the existing CMD forms keep working unchanged. When a command is passed but no Node.js entrypoint can be derived from it, the debugger fails fast with the reason instead of starting the Actor undebuggable. Adds a node:test suite for the resolver (no new dependencies) and runs it, plus a syntax check of the new module, in the release workflow. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UTxccb4QARxDG34guZbeFG
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.
Running as the image CMD has two problems: the Actor's real start command is lost (the entrypoint is guessed from package.json/conventional paths), and an ENTRYPOINT defined in the Actor's own Dockerfile silently swallows our CMD, so the Actor runs with no debugger and no error.
As ENTRYPOINT, Docker appends the image's own CMD to our arguments. Everything after --brk is now treated as that start command and resolved into a Node.js launch spec, keeping the original node flags and script arguments:
node [flags] <script> [args] -> that script, flags and args preserved
npm|pnpm|yarn [run] <script> -> the package.json script, parsed again
sh -c "" -> the inner command, parsed again
-> that file (the explicit-path form)
Chained scripts are resolved from the last segment back, so
npm run build && node dist/main.jsdebugs the Actor, not the build step. With no command passed, the previous auto-detection still applies, so the existing CMD forms keep working unchanged. When a command is passed but no Node.js entrypoint can be derived from it, the debugger fails fast with the reason instead of starting the Actor undebuggable.Adds a node:test suite for the resolver (no new dependencies) and runs it, plus a syntax check of the new module, in the release workflow.
Claude-Session: https://claude.ai/code/session_01UTxccb4QARxDG34guZbeFG