You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 323dc05
Browse filesBrowse the repository at this point in the historyBrowse files
fix(docker): ship the JavaScript exit-code shim in the image and test exit codes end to end (#796, #735) (#809)
JavaScript programs ran fine in the Docker image but their sessions ended stopped with no exitCode. js-debug never sends a DAP exited event; the code comes from a preload the adapter injects (assets/exitcode-shim.cjs, #247) and the adapter degraded silently without it. The Dockerfile re-materialised the adapter from dist, vendor and package.json only, so assets/ never reached the image (measured: the local images hold dist package.json vendor and nothing else).
The image now copies the adapter's assets and fails to build if the shim is missing (the same guard the CodeLLDB engine has, #387); the npm bundle build fails without it too (bundle-cli.js throws instead of warning); a JavaScript launch that cannot find the preload says so in its start_debugging warning through a new launch-scoped diagnostic (LaunchConfigDiagnostic.scope 'launch', rendered as-is by the launcher, whose existing rendering matches diagnostics against caller keys only); a Docker smoke case waits for the exit code itself (7) in debug mode and under noDebug on the new examples/javascript/exit_code_test.js; and the CI-run JavaScript integration file gains a debugger-on run-to-completion case asserting exitCode 7 in list_debug_sessions (and on the summary when the fixture beats launch readiness) — #735 item 4, where #794's case covered noDebug only.
Closes#796
Refs #735
Review and verification:
- Multi-agent code review: no correctness defects, 5 altitude findings; 4 fixed (the bundle gate moved from the never-run test-bundle.cjs into bundle-cli.js; the missing-shim launch notice; pollUntil in the Docker test; a race-honest description of the summary assertion), 1 deferred to #811 (re-materialise adapter packages from their package.json files field). The notice change surfaced three #709 diagnostics tests whose harness had no file system; they now model the preload as present.
- Local: the rebuilt image contains the shim and passes the guard; Docker JS smoke 8/8 including both new cases; JS integration file 11/11 on the merged tree; unit and launcher suites green; pre-push (6402 unit, 92 integration) and CI green on both OSes including Container Tests.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
**Docker JavaScript launches report `exitCode` again** — the image copied the JavaScript adapter's `dist`, `vendor` and `package.json` but not its `assets/`, so `exitcode-shim.cjs` (the preload that records the debuggee's exit code, since js-debug never sends `exited`) was missing and every JavaScript session in the container ended `stopped` with no `exitCode`. The image now ships the asset and fails to build without it (the same guard the CodeLLDB engine has), the npm bundle build fails without it too, a JavaScript launch that cannot find the preload says so in its `warning` instead of only in the server log, and the Docker smoke test waits for the non-zero exit code itself, in debug and noDebug mode (#796)
0 commit comments