fix(ci): green the test suite — pnpm 10 build scripts, libsodium ESM, stale time fixtures
CI has been red since the pnpm 10 migration. Four independent causes:
- better-sqlite3: pnpm 10 blocks dependency build scripts by default, so the
native binding was never compiled on CI. Allowlist it via
onlyBuiltDependencies in pnpm-workspace.yaml.
- libsodium-wrappers-sumo 0.7.16: the published ESM wrapper does
`import "./libsodium-sumo.mjs"` but the tarball does not ship that file
(it lives in the libsodium-sumo package). Patch the import to the bare
specifier; local runs only worked because of a hand-copied file in
node_modules.
- tx-accept/claim [live] tests: the live path checks deadlines against
Date.now(), and the fixed fixture timestamps expired in June. Freeze the
clock inside the fixture windows with vi.useFakeTimers.
- CML set_exunits panic ("RuntimeError: unreachable"): with
localUPLCEval: false the provider asks Ogmios for ex-units; the test mocks
answered `{}`, so the provider fell back to a spend redeemer at index 0
while the escrow input sorts to index 1 — CML panics on the unknown
redeemer key. Mock evaluateTransaction with the true index like real
Ogmios.
Also regenerate the advert-datum golden: the fixture builders passed plain JS
numbers to cbor-x (minimal ints, float64 for the timestamp) while the
production codec — whose output is live on mainnet — emits full-width uint64.
Builders now encode integer fields as BigInt so builders, codec, and golden
agree byte-for-byte.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
9
pnpm-lock.yaml
generated
9
pnpm-lock.yaml
generated
@@ -4,6 +4,11 @@ settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
patchedDependencies:
|
||||
libsodium-wrappers-sumo@0.7.16:
|
||||
hash: 761a204004f889b65fdf148159f4bd90733703d63a0ff00eb0671c92ea085096
|
||||
path: patches/libsodium-wrappers-sumo@0.7.16.patch
|
||||
|
||||
importers:
|
||||
|
||||
.:
|
||||
@@ -3166,7 +3171,7 @@ snapshots:
|
||||
'@cardano-sdk/util': 0.16.0
|
||||
blake2b: 2.1.4
|
||||
i: 0.3.7
|
||||
libsodium-wrappers-sumo: 0.7.16
|
||||
libsodium-wrappers-sumo: 0.7.16(patch_hash=761a204004f889b65fdf148159f4bd90733703d63a0ff00eb0671c92ea085096)
|
||||
lodash: 4.18.1
|
||||
npm: 9.9.4
|
||||
pbkdf2: 3.1.5
|
||||
@@ -4743,7 +4748,7 @@ snapshots:
|
||||
|
||||
libsodium-sumo@0.7.16: {}
|
||||
|
||||
libsodium-wrappers-sumo@0.7.16:
|
||||
libsodium-wrappers-sumo@0.7.16(patch_hash=761a204004f889b65fdf148159f4bd90733703d63a0ff00eb0671c92ea085096):
|
||||
dependencies:
|
||||
libsodium-sumo: 0.7.16
|
||||
|
||||
|
||||
Reference in New Issue
Block a user