You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bc99616
Browse filesBrowse the repository at this point in the historyBrowse files
test(parity): run the ts-oracle in the pinned node image
The goldens recorded what the host's Node.js answered, so the same
reference functions gave other answers on another machine (URL parsing,
IDNA and Node.js error messages change between releases). The oracle
now bundles and runs in node:24-bookworm-slim, pinned by digest in
versions.yaml and handed in by the Taskfile, with no network: Node.js 24
is what CI installs and runs the reference on, and the newest release
the reference's lockfile builds on (its nan 2.25.0 does not compile
node-pty against Node.js 26). A bump that changes an answer fails the
oracle gate until the goldens are refreshed. The readLockfile oracle
writes its temporary folder as <dir>, so a message naming the file
stays the same from run to run. TestTSOracleGoldensMatchTheReference
skips without Docker or without TS_ORACLE_IMAGE, which task
parity:contract sets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: Taskfile.yml
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -249,16 +249,16 @@ tasks:
249
249
- 'echo "Schema refreshed. Run ''task spec:compliance'' — any new spec property fails until modeled in internal/config/types.go."'
250
250
251
251
testdata:ts-oracle:
252
-
desc: Rewrite every internal/**/testdata/ts-oracle/*.json with the results of the reference TypeScript functions (tools/tsoracle)
252
+
desc: Rewrite every internal/**/testdata/ts-oracle/*.json with the results of the reference TypeScript functions (tools/tsoracle), run in the node image versions.yaml pins (needs Docker)
253
253
deps: [reference:compile]
254
254
cmds:
255
-
- go run ./cmd/devtool ts-oracle
255
+
- go run ./cmd/devtool ts-oracle "$(go tool versions ref node)"
256
256
257
257
testdata:ts-oracle:check:
258
258
desc: Fail when a testdata/ts-oracle golden differs from what the reference TypeScript functions return
259
259
deps: [reference:compile]
260
260
cmds:
261
-
- go test ./internal/devtools -run '^TestTSOracleGoldensMatchTheReference$' -count=1 -v
261
+
- TS_ORACLE_IMAGE="$(go tool versions ref node)" go test ./internal/devtools -run '^TestTSOracleGoldensMatchTheReference$' -count=1 -v
262
262
263
263
reference:
264
264
desc: Install and compile the TypeScript parity oracle
@@ -280,7 +280,7 @@ tasks:
280
280
# must be in the inventory (needs reference/ checked out, so it lives here).
281
281
- go test ./internal/cli -run TestOracleFlagCoverage -count=1
282
282
# The ts-oracle goldens must be what the reference's functions return.
283
-
- go test ./internal/devtools -run '^TestTSOracleGoldensMatchTheReference$' -count=1
283
+
- TS_ORACLE_IMAGE="$(go tool versions ref node)" go test ./internal/devtools -run '^TestTSOracleGoldensMatchTheReference$' -count=1
284
284
- PARITY_REPORT_FILE={{.ROOT_DIR}}/artifacts/parity-contract.json PARITY_STRICT=true PARITY_LANE=contract PARITY_SKIP_DOCKER=true PARITY_SKIP_NETWORK=true go test ./internal/cli -run TestParityMatrix -count=1 -timeout 10m -v {{.CLI_ARGS}}
0 commit comments