Dashboard › cli › Distillation
59420a4e-d37f-4e0c-ace5-ae163a580252["lore_tm_v1_AuN2tx3m2KekVVbUB_b-7bxlxCbAUU49ynpCkY7P04k","lore_tm_v1_9pGOKy9eP9b3vAnpR929TiPWzO4GlFDt6kAYBuXYq0M","lore_tm_v1_9t11c7D1AhHCfwuqZCJkLgJ0CNDSNdIBk-V2tXGsHsU","lore_tm_v1_c5c6Ogf588bpPKWE2lBHEgO0hT8MKAvhy8dFrupkmKo","lore_tm_v1_6HQ0ziw-lBRA-w_YN-OminGt6SXtQi6av6TVOnpWqHs","lore_tm_v1_Eh1iBh_9SyG4h0-6NEBf57Tlm2reLd8rztQjVmG4vBE","lore_tm_v1_tCZ74p3s27Fw_5xRRIkwHiK_pSLzDqtaql6CqcimGDU"]
Date: Sep 9, 2026
packages/cli/test/lib/delta-upgrade.mocked.test.ts is a 500-line integration-test file that uses vi.mock("../../src/lib/constants.js", ...) to set CLI_VERSION: "0.13.0" before importing attemptDeltaUpgrade, resolveNightlyDelta, and resolveStableDelta; it is separate from delta-upgrade.test.ts because bun test --isolate gives each file a fresh module graph and prevents the non-dev mock from leaking into dev-mode tests.resolveStableDelta mocked integration tests cover: 1. a 0.13.0→0.14.0 single-hop chain whose valid TRDIFF10 header produces empty output and therefore throws "SHA-256 mismatch"; 2. GitHub release API HTTP 500 returning null.resolveNightlyDelta mocked integration tests cover target 0.0.0-dev.200: 1. GHCR token succeeds but the nightly manifest has no ${BINARY_NAME}.gz layer, returning null; 2. the manifest has a ${BINARY_NAME}.gz layer sized 30_000_000, but /tags/list returns no patch tags, so no chain exists and the result is null.attemptDeltaUpgrade mocked integration tests cover: 1. stable CLI_VERSION = "0.13.0" to nightly target 0.0.0-dev.100 returning null for a cross-channel upgrade; 2. stable target 0.14.0 returning null when all fetches return HTTP 500; 3. malformed patch bytes [0, 1, 2, 3] causing patch application failure that is caught and converted to null.attemptDeltaUpgrade("0.14.0", oldBinaryPath, destPath) integration testing uses fixtures packages/cli/test/fixtures/patches/small-old.bin, small-new.bin, and small.trdiff10; expected SHA-256 is 54d0dcd74478bc154b5b24393fdc6129518271baa36f446384d60e84021bb724, and the expected result has patchBytes: 89 and chainLength: 1, with destination bytes exactly matching small-new.bin.packages/cli/test/e2e/delta-upgrade.test.ts is a 159-line E2E test that downloads stable releases 0.12.0 and 0.13.0 from https://github.com/getsentry/cli/releases/download, generates a TRDIFF10 patch with ${BSDIFF_PATH} ${oldPath} ${newPath} ${patchPath} --use-zstd, applies it with applyPatch, and verifies both SHA-256 and byte-for-byte equality.ZIG_BSDIFF_PATH or defaults BSDIFF_PATH to /tmp/bsdiff; describe.skipIf(!canRun) skips when the binary is unavailable, and the test timeout is 120_000 ms.old --p1--> new --p2--> new, where p2 is generated as a near-identity new→new patch; applyPatchChainInMemory(oldPath, [p1, p2], chainOutputPath) must return the expected hash and produce bytes equal to the downloaded 0.13.0 binary.${chainOutputPath}.patching.a and ${chainOutputPath}.patching.b not to exist."githubReleaseSource" "binpatch" failed with HTTP 401, and querying the Git tree via tag ref v0.4.2 failed with HTTP 404; tag 0.4.2 resolves to commit 9ba6bbb8227fcbd2521852d2311c82afac5e9573.binpatch@0.4.2: repository https://github.com/BYK/binpatch, description “Reusable binary delta-update engine: apply TRDIFF10/bsdiff+zstd patch chains to a binary and discover chains from a pluggable source (OCI/GHCR or GitHub Releases). Pure Node, zero product coupling.”; MIT license; ESM; Node requirement >=22.15.0; entry point ./dist/index.js; types ./dist/index.d.ts; unpacked size 206575; 6 published files; package integrity sha512-aShVdFVzDrqVRlyhDQabzKV6b9suWegARr0IPTer58eNQoo1KqpuCr+VtbwwuirmfXqmWuuxsoZlXJN1tTZBcw==.binpatch@0.4.2 package keywords include bsdiff, bspatch, trdiff10, zstd, binary, delta, patch, update, self-update, oci, and ghcr; package scripts are test: vitest run, build: tsup, clean: rm -rf dist, typecheck: tsc --noEmit, and prepublishOnly: npm run clean && npm run build.binpatch 0.4.2 source tree includes core files src/bspatch.ts, src/contract.ts, src/discover.ts, src/errors.ts, src/events.ts, src/index.ts, and src/patch-cache.ts; source adapters are src/sources/ghcr.ts, src/sources/github-release.ts, and src/sources/oci.ts; tests are test/bspatch.test.ts, test/discover.test.ts, and test/sources.test.ts.binpatch tags observed were: 0.4.2 at commit 9ba6bbb8227fcbd2521852d2311c82afac5e9573, 0.4.1 at d0593cdd89eb720edddf9644e0753613e4a8e622, and 0.4.0 at 2446f4cbecca92eba775e8ef52dff01fd20a9326.