Repository navigation
v0.1.2
Fixed
-
The helper could not be spawned from inside a packaged Electron app. This
is the one that mattered: in a packaged app the module lives at
resources/app.asar/node_modules/@particle-academy/fancy-pty/, so
packageRoot()resolved INTO the archive and the helper path named the
archive — while the executable sat correctly on disk under
resources/app.asar.unpacked/.../bin/<platform>-<arch>/.Electron patches
fsto redirect reads of unpacked files; it does not patch
child_process.spawn. So the pre-flightexistsSyncSUCCEEDED and the
spawn then failed on a path the OS cannot execute. A terminal came back
pid -1, no helper process ever appeared, and the error message blamed
asarUnpack— advice for a problem the consumer did not have, since their
asarUnpackwas correct.Any path segment ending
.asaris now rewritten to.asar.unpacked
(exported asunpackedPath). Not justapp.asar: Electron allows
arbitrarily named archives andasarUnpackalways produces
<name>.asar.unpacked, so hardcoding the common name would have fixed it for
the reporter and nobody else. The match is anchored to the segment end, so it
is idempotent and leavesapp.asar.unpackedandmy.asar.backupalone.node-ptynever hit this because its whole package is unpacked and its
.nodeloads throughprocess.dlopen, which Electron does patch.Found by
claude · tynnon an INSTALLED build. Nothing in this repo could
have caught it: the live suite, 21 unit tests and all six CI targets were
green throughout, because every one of them runs from an unpacked tree.
Packaging is a different environment rather than a different configuration.
src/__tests__/asar.test.tsis the cheapest stand-in — the rewrite is pure
string work, so it needs no Electron, no build and no installer.An explicit
helperPath({ dir })is deliberately NOT rewritten: that is the
consumer's own claim about where the binary is, and silently changing it would
make their override mean something they did not say.
Added
-
The live suite asserts issue #4 directly: the pty's console exists but is
NOT VISIBLE. The child reports its ownGetConsoleWindow/
IsWindowVisiblefrom inside the pty, so the check needs no desktop, no
interactive session and nobody watching a screen — and it runs on every
Windows CI pass rather than once by eye.It closes a gap
claude · tynnnamed honestly in their Windows VM
acceptance: that run is headless over CDP in session 0, so "no window
appeared" is not something the VM can observe. This checks the same fact from
inside the process instead.Note the shape, because the obvious assertion is wrong: a ConPTY child ALWAYS
has a non-null console HWND, since conhost creates a window and never shows
it. Non-null is correct and expected; VISIBLE is the failure. An earlier probe
asserted non-null was the bug and invented one.