From 663eb3aa71786db988a6638fce9c411de0af13ee Mon Sep 17 00:00:00 2001 From: dcccrypto Date: Tue, 21 Jul 2026 02:33:37 +0100 Subject: [PATCH 1/2] fix(deps): resolve @percolatorct/sdk from a pinned git tarball, not a local sibling path (#232) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit package.json declared `@percolatorct/sdk` as `file:../../percolator-sdk`, which only resolves on a machine that happens to have the SDK checked out two levels up. Every clean checkout — GitHub Actions, Vercel, and the Docker build context — fails at install: ENOENT: no such file or directory, scandir '/percolator-sdk' exit 254 Pin it to the same commit the SDK's origin/main ships (673bc47, v3.0.0), using the git-tarball form already used for @percolator/shared on the line above. The SDK repo is public and commits its dist/, so no npm publish and no extra checkout step is required. This also drops the transitive file: path that @percolatorct/shared carried, so the lockfile now has zero local-path references. Co-Authored-By: Claude Opus 4.8 --- package.json | 2 +- pnpm-lock.yaml | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index f80158d..d58d9db 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "dependencies": { "@hono/node-server": "^1.19.11", "@percolator/shared": "github:dcccrypto/percolator-shared#489f5b48b6d7826ce62bae6734bb3d078c392730", - "@percolatorct/sdk": "file:../../percolator-sdk", + "@percolatorct/sdk": "github:dcccrypto/percolator-sdk#673bc4717480f54f678c0f07246b26b84d703212", "@sentry/node": "^10.39.0", "@solana/web3.js": "^1.98.0", "@supabase/supabase-js": "^2.49.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b11a85b..cae5c34 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,10 +13,10 @@ importers: version: 1.19.11(hono@4.12.9) '@percolator/shared': specifier: github:dcccrypto/percolator-shared#489f5b48b6d7826ce62bae6734bb3d078c392730 - version: '@percolatorct/shared@https://codeload.github.com/dcccrypto/percolator-shared/tar.gz/489f5b48b6d7826ce62bae6734bb3d078c392730(@percolatorct/sdk@file:../../percolator-sdk(bufferutil@4.1.0)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10))(bufferutil@4.1.0)(typescript@5.9.3)(utf-8-validate@5.0.10)' + version: '@percolatorct/shared@https://codeload.github.com/dcccrypto/percolator-shared/tar.gz/489f5b48b6d7826ce62bae6734bb3d078c392730(@percolatorct/sdk@https://codeload.github.com/dcccrypto/percolator-sdk/tar.gz/673bc4717480f54f678c0f07246b26b84d703212(bufferutil@4.1.0)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10))(bufferutil@4.1.0)(typescript@5.9.3)(utf-8-validate@5.0.10)' '@percolatorct/sdk': - specifier: file:../../percolator-sdk - version: file:../../percolator-sdk(bufferutil@4.1.0)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10) + specifier: github:dcccrypto/percolator-sdk#673bc4717480f54f678c0f07246b26b84d703212 + version: https://codeload.github.com/dcccrypto/percolator-sdk/tar.gz/673bc4717480f54f678c0f07246b26b84d703212(bufferutil@4.1.0)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10) '@sentry/node': specifier: ^10.39.0 version: 10.40.0 @@ -446,8 +446,9 @@ packages: peerDependencies: '@opentelemetry/api': ^1.1.0 - '@percolatorct/sdk@file:../../percolator-sdk': - resolution: {directory: ../../percolator-sdk, type: directory} + '@percolatorct/sdk@https://codeload.github.com/dcccrypto/percolator-sdk/tar.gz/673bc4717480f54f678c0f07246b26b84d703212': + resolution: {tarball: https://codeload.github.com/dcccrypto/percolator-sdk/tar.gz/673bc4717480f54f678c0f07246b26b84d703212} + version: 3.0.0 engines: {node: '>=20.0.0'} '@percolatorct/shared@https://codeload.github.com/dcccrypto/percolator-shared/tar.gz/489f5b48b6d7826ce62bae6734bb3d078c392730': @@ -1684,7 +1685,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 2.5.1(@opentelemetry/api@1.9.0) - '@percolatorct/sdk@file:../../percolator-sdk(bufferutil@4.1.0)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10)': + '@percolatorct/sdk@https://codeload.github.com/dcccrypto/percolator-sdk/tar.gz/673bc4717480f54f678c0f07246b26b84d703212(bufferutil@4.1.0)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10)': dependencies: '@solana/spl-token': 0.4.14(@solana/web3.js@1.98.4(bufferutil@4.1.0)(typescript@5.9.3)(utf-8-validate@5.0.10))(bufferutil@4.1.0)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10) '@solana/web3.js': 1.98.4(bufferutil@4.1.0)(typescript@5.9.3)(utf-8-validate@5.0.10) @@ -1695,9 +1696,9 @@ snapshots: - typescript - utf-8-validate - '@percolatorct/shared@https://codeload.github.com/dcccrypto/percolator-shared/tar.gz/489f5b48b6d7826ce62bae6734bb3d078c392730(@percolatorct/sdk@file:../../percolator-sdk(bufferutil@4.1.0)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10))(bufferutil@4.1.0)(typescript@5.9.3)(utf-8-validate@5.0.10)': + '@percolatorct/shared@https://codeload.github.com/dcccrypto/percolator-shared/tar.gz/489f5b48b6d7826ce62bae6734bb3d078c392730(@percolatorct/sdk@https://codeload.github.com/dcccrypto/percolator-sdk/tar.gz/673bc4717480f54f678c0f07246b26b84d703212(bufferutil@4.1.0)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10))(bufferutil@4.1.0)(typescript@5.9.3)(utf-8-validate@5.0.10)': dependencies: - '@percolatorct/sdk': file:../../percolator-sdk(bufferutil@4.1.0)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10) + '@percolatorct/sdk': https://codeload.github.com/dcccrypto/percolator-sdk/tar.gz/673bc4717480f54f678c0f07246b26b84d703212(bufferutil@4.1.0)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10) '@sentry/node': 10.40.0 '@solana/web3.js': 1.98.4(bufferutil@4.1.0)(typescript@5.9.3)(utf-8-validate@5.0.10) '@supabase/supabase-js': 2.97.0(bufferutil@4.1.0)(utf-8-validate@5.0.10) From c41fb5288d1f436bba0c75c937f75b0cf8e55292 Mon Sep 17 00:00:00 2001 From: dcccrypto Date: Tue, 21 Jul 2026 13:33:39 +0100 Subject: [PATCH 2/2] test(sdk-smoke): assert the v17 deployment gate instead of a live program ID Pinning @percolatorct/sdk to a git tarball (this PR) fixed `pnpm install`, but surfaced two real test failures: the v17 SDK fails closed and *throws* from getProgramId()/getMatcherProgramId() while V17_PROGRAMS_DEPLOYED === false, rather than handing back a legacy address that cannot decode v17 instruction payloads. Assert whichever half of that contract is live so the smoke test stays honest across the Phase 7 cutover. Ported from #233, which fixed the same two tests behind a CI sibling-checkout workaround that the tarball pin makes unnecessary. Co-Authored-By: Claude Opus 4.8 --- tests/sdk-smoke.test.ts | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/tests/sdk-smoke.test.ts b/tests/sdk-smoke.test.ts index 5c464ff..9fe7c6a 100644 --- a/tests/sdk-smoke.test.ts +++ b/tests/sdk-smoke.test.ts @@ -54,6 +54,7 @@ import { getMatcherProgramId, getCurrentNetwork, PROGRAM_IDS, + V17_PROGRAMS_DEPLOYED, // oracle/price-router.ts (used by oracle-router.ts route) resolvePrice, // v17 crank encoder @@ -262,13 +263,31 @@ describe("@percolatorct/sdk exports — PDA derivation", () => { // ── 7. Program IDs ──────────────────────────────────────────────────────────── describe("@percolatorct/sdk exports — program IDs", () => { - it("getProgramId returns a valid PublicKey for devnet", () => { + // The v17 SDK fails closed until the converged v17 programs are deployed + // (Phase 7 cutover gate): rather than hand back a legacy address that cannot + // decode v17 instruction payloads, getProgramId()/getMatcherProgramId() throw + // while V17_PROGRAMS_DEPLOYED === false. Assert whichever half of that + // contract is live so this smoke test stays honest across the cutover. + // Widened to boolean — the SDK types the constant as the literal `false`. + const v17Deployed: boolean = V17_PROGRAMS_DEPLOYED; + + it("getProgramId honours the v17 deployment gate for devnet", () => { + if (!v17Deployed) { + expect(() => getProgramId("devnet")).toThrow(/v17 program is not deployed/); + return; + } const id = getProgramId("devnet"); expect(id).toBeInstanceOf(PublicKey); expect(id.toBase58().length).toBeGreaterThan(0); }); - it("getMatcherProgramId returns a valid PublicKey for devnet", () => { + it("getMatcherProgramId honours the v17 deployment gate for devnet", () => { + if (!v17Deployed) { + expect(() => getMatcherProgramId("devnet")).toThrow( + /v17 matcher program is not deployed/, + ); + return; + } const id = getMatcherProgramId("devnet"); expect(id).toBeInstanceOf(PublicKey); });