Skip to content

Fix packaged Node runtime loading and graceful shutdown#5

Merged
vicary merged 7 commits into
mainfrom
fix/node-plugin-build-shims
Apr 6, 2026
Merged

Fix packaged Node runtime loading and graceful shutdown#5
vicary merged 7 commits into
mainfrom
fix/node-plugin-build-shims

Conversation

@vicary
Copy link
Copy Markdown
Owner

@vicary vicary commented Apr 6, 2026

Summary

  • fix packaged Node runtime module resolution by anchoring createRequire(...) to cwd-backed runtime files and add a packaging assertion to catch DNT import-meta ponyfill regressions
  • fix graceful SIGINT shutdown in Node-style hosts by preserving signal listeners during graceful teardown and explicitly exiting the process once teardown completes
  • add unit, integration, and subprocess smoke coverage for first-press graceful shutdown behavior

Test Plan

  • deno test src/index.test.ts src/services/runtime-teardown.test.ts src/services/runtime-teardown.smoke.test.ts src/services/session-mcp-runtime.test.ts
  • deno test --allow-run --allow-read=\"src/services/runtime-teardown.smoke-fixture.ts\" src/services/runtime-teardown.smoke.test.ts
  • deno task check
  • deno task lint
  • deno task fmt --check

@vicary vicary force-pushed the fix/node-plugin-build-shims branch from 5d19355 to c44aab0 Compare April 6, 2026 07:57
@vicary vicary requested a review from Copilot April 6, 2026 07:58

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

@vicary vicary merged commit ff7f08a into main Apr 6, 2026
1 check passed
@vicary vicary deleted the fix/node-plugin-build-shims branch April 6, 2026 09:26
vicary added a commit that referenced this pull request Apr 6, 2026
- fix packaged Node runtime module resolution by anchoring
`createRequire(...)` to cwd-backed runtime files and add a packaging
assertion to catch DNT import-meta ponyfill regressions
- fix graceful `SIGINT` shutdown in Node-style hosts by preserving
signal listeners during graceful teardown and explicitly exiting the
process once teardown completes
- add unit, integration, and subprocess smoke coverage for first-press
graceful shutdown behavior

- [x] `deno test src/index.test.ts src/services/runtime-teardown.test.ts
src/services/runtime-teardown.smoke.test.ts
src/services/session-mcp-runtime.test.ts`
- [x] `deno test --allow-run
--allow-read=\"src/services/runtime-teardown.smoke-fixture.ts\"
src/services/runtime-teardown.smoke.test.ts`
- [x] `deno task check`
- [x] `deno task lint`
- [x] `deno task fmt --check`
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