mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
The three fail-closed cases cleared IMPECCABLE_BIN and pointed IMPECCABLE_HOME at a temp dir, but locate() prefers an installed @impeccable/cli-<os>-<arch> before the cache or a download. Those platform packages ship with every engine release and are a merge prerequisite, so as soon as one is installed under the repo the cases would resolve it and go green without fetching anything. Confirmed by hand: with a platform package staged in node_modules, running the shim against an unreachable download base still exits 0 from the package. The shim now runs from a throwaway copy at <tmp>/cli/bin/cli.js beside a copy of the repo's package.json, with no node_modules on the lookup path above it, so require.resolve of the platform package fails the way it does on a machine without the optional dependency. Production code is unchanged; there is no test-only branch in the shim. The fixture server also records every request now, and each download case asserts the asset and sidecar URLs were actually requested, so a future lookup shortcut fails loudly instead of passing on an untested path. A sixth case installs a fake platform package next to the staged shim and asserts the shim prefers it with the server untouched, which pins the precedence the other cases depend on being absent. Co-Authored-By: Claude Code <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vau2X53xGTjjTCXWMVBoNY