Skip to content

Install diffr from its npm platform package - #945

Open
thesiti92 wants to merge 4 commits into
remote/10-gateway-transportfrom
remote/10-diffr-npm-packages
Open

thesiti92 wants to merge 4 commits into
remote/10-gateway-transportfrom
remote/10-diffr-npm-packages

Conversation

@thesiti92

@thesiti92 thesiti92 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #942. diffr now reaches each machine through npm instead of a GitHub download at attach time, and there is one diffr binary (the full edition) everywhere.

@dev.fast/diffr 0.1.11 (devdotfast/diffr#88, released from release/0.1.x) lists @dev.fast/diffr-{darwin-arm64,darwin-x64,linux-x64,linux-arm64,win32-x64} as optional dependencies, and diffrBinaryPath() finds the installed one. It is the 0.1.10 code; diffr main's wire changes are not in it.

  • diffrExecutable() is REVIEW_DIFFR_BINARY, then diffrBinaryPath(), then diffr on PATH.
  • Removed: ensureDiffr, whiteboard remote diffr ensure, diffr in remote attach output (nothing read it), the fetched copy under ~/.dev/review-tools/diffr-fetch, diffr-languages.ts, POST /diffr-languages/install, the Install extra diffr languages command and its journey, and ensure:diffr in packaging, run.sh and CI.
  • Desktop: pnpm deploy --prod already puts the platform package in review-runtime/node_modules, so the runtime no longer copies bin/diffr. sign.ts gives the binary its entitlements at the new path; the closure check, lsp-e2e.mjs, smoke-windows.mjs and the NixOS probe point there too.
  • Remote installs keep --omit=optional (it leaves out ~650 MB of agent binaries), so the install names @dev.fast/diffr-<target>@<version>, with the version read from the package tarball. A host without registry access gets it through Desktop's relay.
  • Pins move to 0.1.11 in all three package.json files, and the six packages are in minimumReleaseAgeExclude.

Test plan

  • Root typecheck (including the Code OSS fork), pnpm lint, pnpm format, frozen install.
  • vitest: structural-diff, background-server, diffr-config, headless-host, remote-uninstall (114 pass).
  • bundled-diffr.integration.mjs (11 pass): a relocated runtime with the real 0.1.11 packages in node_modules; override, PATH fallback and host-binary cases.
  • runtime-bundler.test.mjs, root scripts/**/*.test.mjs.
  • WB_TEST_CONTAINERS=1 installer suite (9 pass): a Linux container gets @dev.fast/diffr-linux-* under --omit=optional, no agent binaries, and structural diff answers; the sealed host gets diffr through the relay.
  • linux/amd64 (emulated): the installer's npm command pulls diffr-linux-x64 0.1.11 and it runs.
  • reviewRemoteInstaller.test.ts: 12 tests fail on this machine with and without this change (local npm environment); CI decides.
  • Packaged macOS build: signing and notarization with diffr in node_modules.
  • remote-install journey (the sealed host now has diffr through the relay).

@thesiti92
thesiti92 force-pushed the remote/10-diffr-npm-packages branch 2 times, most recently from 1aeb32b to b9736dd Compare October 5, 2026 22:26
@thesiti92
thesiti92 force-pushed the remote/10-diffr-npm-packages branch from b9736dd to 0a501e8 Compare October 6, 2026 03:46
@thesiti92
thesiti92 changed the base branch from remote/9-source-windows to remote/10-gateway-transport October 6, 2026 13:09
@thesiti92
thesiti92 added this pull request to stack #943 October 6, 2026 13:09
@dev.fast/diffr 0.1.11 ships the binary as optional per-platform
packages, so the server finds diffr with diffrBinaryPath() instead of a
bundled bin/diffr or a fetched copy.

Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19
Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6
Agent-Session: a5134983-fbca-42d2-ac6c-fe14cf3ce20e
Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e
Agent-Session: 9c8a2d13-4198-4d4b-bf1d-4de6fccd0f19
Agent-Session: 99df4638-b570-4eeb-b115-0311294ee04d
Agent-Session: 2cfc4ef0-4d24-4442-8eb4-6d35cd498eeb
Agent-Session: d9b59ba5-fdb1-49e5-85d8-9ad33d77e66a
Agent-Session: 4d2db452-9ddb-42e0-ae76-22080016d1f8
Agent-Session: 095327a8-9eac-4f8f-9008-f88d1feb914e
Remote attach no longer fetches diffr from GitHub: `remote diffr
ensure`, attach's diffr field and the installer's fetch step go. The
installer omits optional dependencies, so it names
@dev.fast/diffr-<target> explicitly; a host without registry access
gets it through the relay.

Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19
Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6
Agent-Session: a5134983-fbca-42d2-ac6c-fe14cf3ce20e
Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e
Agent-Session: 9c8a2d13-4198-4d4b-bf1d-4de6fccd0f19
Agent-Session: 99df4638-b570-4eeb-b115-0311294ee04d
Agent-Session: 2cfc4ef0-4d24-4442-8eb4-6d35cd498eeb
Agent-Session: d9b59ba5-fdb1-49e5-85d8-9ad33d77e66a
Agent-Session: 4d2db452-9ddb-42e0-ae76-22080016d1f8
Agent-Session: 095327a8-9eac-4f8f-9008-f88d1feb914e
pnpm deploy already installs the platform package into the runtime, so
staging stops copying bin/diffr and ensure:diffr goes from packaging,
run.sh and CI. Signing, the closure check and the smoke scripts use the
new path.

Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19
Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6
Agent-Session: a5134983-fbca-42d2-ac6c-fe14cf3ce20e
Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e
Agent-Session: 9c8a2d13-4198-4d4b-bf1d-4de6fccd0f19
Agent-Session: 99df4638-b570-4eeb-b115-0311294ee04d
Agent-Session: 2cfc4ef0-4d24-4442-8eb4-6d35cd498eeb
Agent-Session: d9b59ba5-fdb1-49e5-85d8-9ad33d77e66a
Agent-Session: 4d2db452-9ddb-42e0-ae76-22080016d1f8
Agent-Session: 095327a8-9eac-4f8f-9008-f88d1feb914e
The platform package is the full edition, so the command, its endpoint
and journey, and the separate install under ~/.cache/diffr are no
longer needed.

Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19
Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6
Agent-Session: a5134983-fbca-42d2-ac6c-fe14cf3ce20e
Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e
Agent-Session: 9c8a2d13-4198-4d4b-bf1d-4de6fccd0f19
Agent-Session: 99df4638-b570-4eeb-b115-0311294ee04d
Agent-Session: 2cfc4ef0-4d24-4442-8eb4-6d35cd498eeb
Agent-Session: d9b59ba5-fdb1-49e5-85d8-9ad33d77e66a
Agent-Session: 4d2db452-9ddb-42e0-ae76-22080016d1f8
Agent-Session: 095327a8-9eac-4f8f-9008-f88d1feb914e
@thesiti92
thesiti92 force-pushed the remote/10-diffr-npm-packages branch from 0a501e8 to ca62a03 Compare October 6, 2026 13:19

This branch has not been deployed

No deployments
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.

1 participant