Stacked on #155 (based on fix/tsconnect-late-wasm-resume). Refs #147, #152.
Removes the three workarounds the late-_resume bug forced, now that it is fixed at the source:
packages/tsconnect/src/shutdown.probe.ts — deleted; the shutdown test runs in-process again, on its own initIPN runtime (and starts a second one afterwards, as before)
packages/tsconnect/src/ipn.test.ts — the shared integration suite shuts its runtime down in after() again
packages/tsconnect-worker — connect.shutdown.probe.ts deleted and connect.test.ts restored to the in-process form (revert of ad0d525), with its stale "uncaughtException noise" comment replaced by the real reason the suite shares one runtime (wasm compile cost)
both packages' *.probe.ts tsconfig excludes are gone, so probe-shaped helpers would be typechecked again
The restored in-process shutdowns are the regression test for #147: with the workarounds removed but the fix absent, this suite produces 63 late "Go program has already exited" errors and a failing test.
tsconnect-workertest:coverage (no --test-force-exit) still exits on its own
soak of both suites, sequential and parallel: no late _resume errors
Unrelated note: tsconnect-worker's transfers.test.ts holds the process ~60 s after its tests finish on a TTL timer; that predates this branch (it reproduces on main) and only shows up in the non-force-exit coverage run.
Stacked on #155 (based on `fix/tsconnect-late-wasm-resume`). Refs #147, #152.
Removes the three workarounds the late-`_resume` bug forced, now that it is fixed at the source:
- `packages/tsconnect/src/shutdown.probe.ts` — deleted; the shutdown test runs in-process again, on its own `initIPN` runtime (and starts a second one afterwards, as before)
- `packages/tsconnect/src/ipn.test.ts` — the shared integration suite shuts its runtime down in `after()` again
- `packages/tsconnect-worker` — `connect.shutdown.probe.ts` deleted and `connect.test.ts` restored to the in-process form (revert of ad0d525), with its stale "uncaughtException noise" comment replaced by the real reason the suite shares one runtime (wasm compile cost)
- both packages' `*.probe.ts` tsconfig excludes are gone, so probe-shaped helpers would be typechecked again
The restored in-process shutdowns are the regression test for #147: with the workarounds removed but the fix absent, this suite produces 63 late `"Go program has already exited"` errors and a failing test.
## Verification
- `@webnet/tsconnect` 78 passed / 1 skipped, `@webnet/tsconnect-worker` 71 passed
- `tsconnect-worker` `test:coverage` (no `--test-force-exit`) still exits on its own
- soak of both suites, sequential and parallel: no late `_resume` errors
Unrelated note: `tsconnect-worker`'s `transfers.test.ts` holds the process ~60 s after its tests finish on a TTL timer; that predates this branch (it reproduces on `main`) and only shows up in the non-force-exit coverage run.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Autonomous review finding: AI_CHANGES.md now contains two entries with the identical '@webnet/tsconnect — no late Go program has already exited after shutdown()' heading. The second is an older, incomplete version that omits the dead-handle behavior added by 342b996, so the append-only disclosure log is both duplicated and internally inconsistent. Please remove the stale duplicate added by 279733f and keep the new workaround-removal entry plus #155's complete existing entry. The restored tests and tsconfig changes otherwise look good; targeted typechecks pass and all CI checks are green. (Gitea does not allow this authenticated account to formally request changes on its own PR.)
Autonomous review finding: AI_CHANGES.md now contains two entries with the identical '@webnet/tsconnect — no late Go program has already exited after shutdown()' heading. The second is an older, incomplete version that omits the dead-handle behavior added by 342b996, so the append-only disclosure log is both duplicated and internally inconsistent. Please remove the stale duplicate added by 279733f and keep the new workaround-removal entry plus #155's complete existing entry. The restored tests and tsconfig changes otherwise look good; targeted typechecks pass and all CI checks are green. (Gitea does not allow this authenticated account to formally request changes on its own PR.)
Fixed in 962ed20: removed the stale duplicate. It came from the union merge driver on AI_CHANGES.md during the rebase onto #155 - both the pre- and post-342b996 versions of the entry were kept. The remaining #147 entry is the complete one (dead-handle behaviour included), alongside this branch's workaround-removal entry.
Fixed in 962ed20: removed the stale duplicate. It came from the union merge driver on `AI_CHANGES.md` during the rebase onto #155 - both the pre- and post-342b996 versions of the entry were kept. The remaining #147 entry is the complete one (dead-handle behaviour included), alongside this branch's workaround-removal entry.
codinget
marked the pull request as ready for review 2026-07-31 22:08:20 +02:00
codinget
changed target branch from fix/tsconnect-late-wasm-resume to main2026-07-31 22:30:26 +02:00
The child-process probes, the missing shutdown() in the tsconnect
integration teardown, and the *.probe.ts tsconfig excludes all existed
only to keep the late "Go program has already exited" errors away from
node:test. That bug is fixed, so drop the workarounds; the restored
in-process shutdowns are the regression test for it.
Refs #147, #152
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The union merge driver kept both the pre- and post-rebase versions of the
tsconnect shutdown entry; the older one predates the dead-handle change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Stacked on #155 (based on
fix/tsconnect-late-wasm-resume). Refs #147, #152.Removes the three workarounds the late-
_resumebug forced, now that it is fixed at the source:packages/tsconnect/src/shutdown.probe.ts— deleted; the shutdown test runs in-process again, on its owninitIPNruntime (and starts a second one afterwards, as before)packages/tsconnect/src/ipn.test.ts— the shared integration suite shuts its runtime down inafter()againpackages/tsconnect-worker—connect.shutdown.probe.tsdeleted andconnect.test.tsrestored to the in-process form (revert ofad0d525), with its stale "uncaughtException noise" comment replaced by the real reason the suite shares one runtime (wasm compile cost)*.probe.tstsconfig excludes are gone, so probe-shaped helpers would be typechecked againThe restored in-process shutdowns are the regression test for #147: with the workarounds removed but the fix absent, this suite produces 63 late
"Go program has already exited"errors and a failing test.Verification
@webnet/tsconnect78 passed / 1 skipped,@webnet/tsconnect-worker71 passedtsconnect-workertest:coverage(no--test-force-exit) still exits on its own_resumeerrorsUnrelated note:
tsconnect-worker'stransfers.test.tsholds the process ~60 s after its tests finish on a TTL timer; that predates this branch (it reproduces onmain) and only shows up in the non-force-exit coverage run.🤖 Generated with Claude Code
Autonomous review finding: AI_CHANGES.md now contains two entries with the identical '@webnet/tsconnect — no late Go program has already exited after shutdown()' heading. The second is an older, incomplete version that omits the dead-handle behavior added by
342b996, so the append-only disclosure log is both duplicated and internally inconsistent. Please remove the stale duplicate added by279733fand keep the new workaround-removal entry plus #155's complete existing entry. The restored tests and tsconfig changes otherwise look good; targeted typechecks pass and all CI checks are green. (Gitea does not allow this authenticated account to formally request changes on its own PR.)Fixed in
962ed20: removed the stale duplicate. It came from the union merge driver onAI_CHANGES.mdduring the rebase onto #155 - both the pre- and post-342b996 versions of the entry were kept. The remaining #147 entry is the complete one (dead-handle behaviour included), alongside this branch's workaround-removal entry.