Skip to content

perf: node-native benchmark runner (+ BMF output)#388

Open
charliecreates[bot] wants to merge 10 commits intomainfrom
chore/337-node-native-bench
Open

perf: node-native benchmark runner (+ BMF output)#388
charliecreates[bot] wants to merge 10 commits intomainfrom
chore/337-node-native-bench

Conversation

@charliecreates
Copy link
Contributor

@charliecreates charliecreates bot commented Feb 12, 2026

Closes #337

Summary

  • Implement perf-analysis contract v1 parse/validate/normalize
  • Add fixture resolution (supports $FIXTURES in paths)
  • Add node-native benchmark runner with warmup + measured phases
  • Emit both raw.json and bmf.json outputs
  • Wire CLI + docs: pnpm bench --backend node-native --suite micro

BMF mapping note

We emit latency_p50 and latency_p95 as separate measures (instead of using BMF upper_value) because upper_value is just a generic bound, while distinct measures are first-class for alerting/thresholding.

Output directory / overwrite behavior

  • Default output dir is ./benchmarks/results/<YYYYMMDD-HHmmss>/ (timestamped per run to avoid clobbering).
  • --outDir writes directly to the chosen directory.
  • If raw.json / bmf.json already exist in the output dir, they are replaced (via atomic tmp→rename).

Native prerequisite

The node-native backend requires the native addon to be built/available; if it's missing, the runner exits with a clear prerequisite/failure message.

@github-actions
Copy link

orrery preview: https://pr-388.orrery-c4f.pages.dev/

@rybosome
Copy link
Owner

@CharlieHelps please review this PR

Copy link
Contributor Author

@charliecreates charliecreates bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Key issues: the CLI and built-in suite resolution are currently process.cwd()-dependent and will break when run outside the repo root, and fixture resolution also uses process.cwd() which can lead to non-deterministic or unsafe kernel loading. normalizeFixtureRefs() uses an unsafe cast that makes it brittle when validate() is bypassed. The node-native runner’s timing conversion can lose precision for long durations, and meta-kernel symbol/value mismatches are silently truncated, which will produce confusing resolution behavior.

Summary of changes

What changed

New benchmark CLI entrypoint

  • Added a root-level bench script that builds @rybosome/tspice-perf-analysis and runs packages/perf-analysis/dist/cli/bench.js.
  • Introduced packages/perf-analysis/src/cli/bench.ts implementing a minimal argument parser for --backend, --suite, and --outDir, with built-in suite resolution under packages/perf-analysis/src/suites/yaml/v1/.

v1 contract implementation (parse/validate/normalize)

  • Implemented YAML parsing via yaml package (parseYaml.ts).
  • Added runtime validation for the v1 benchmark contract (validate.ts), including fixture reference shorthands.
  • Added structural normalization of fixture references (normalizeFixtureRefs.ts) to canonical FixtureRef shapes.
  • Expanded FixtureRefV1 to be YAML-friendly (types.ts).

Node-native benchmark runner + outputs

  • Added packages/perf-analysis/src/runners/node-native/*:
    • runNodeNativeBench.ts: warmup + measured iterations, per-op latency sampling, p50/p95 + throughput, writes raw.json and bmf.json.
    • dispatch.ts: maps suite call strings to backend invocations.
    • metaKernel.ts: expands .tm meta-kernels safely with optional directory restriction and sanitization.
    • stats.ts: quantile helper.
  • Re-exported node-native runner types and runNodeNativeBench from packages/perf-analysis/src/runners/index.ts.

Fixture resolution

  • Implemented $FIXTURES path resolution, fixture id resolution under fixtureRoots, and fixture-pack directory aliasing (dir -> <dir>/<basename>.tm) in resolveFixtureRef.ts.
  • Extended ResolvedFixtureRef with optional restrictToDir to constrain meta-kernel expansion.

Docs + suite

  • Updated packages/perf-analysis/README.md with instructions for pnpm bench --backend node-native --suite micro and output locations.
  • Added suite file packages/perf-analysis/src/suites/yaml/v1/micro.yml.

Package dependencies

  • Added dependencies to packages/perf-analysis/package.json: @rybosome/tspice and yaml (and corresponding lockfile updates).

@charliecreates charliecreates bot removed the request for review from CharlieHelps February 12, 2026 20:44
@rybosome
Copy link
Owner

@CharlieHelps I need your help preparing this PR to merge. You should read the diff, related issues/docs, and PR reviews closely and then ensure ALL of the following is true:

  • All checks are passing
  • The branch is up to date with the HEAD of the base branch
  • There are no merge conflicts
  • All PR review feedback has been addressed:
    • Fixes have been pushed for feedback that needs to be addressed before merging (blocking feedback)
    • All non-blocking feedback that hasn't been addressed has been acknowledged with a comment explaining why it's not considered blocking
    • All addressed feedback comments have been marked as resolved

It's your job to push commits to the PR to complete all of these tasks. You MUST wait to confirm that ALL of the above is true before stopping. I expect to be able to merge the PR after you are done.

@charliecreates
Copy link
Contributor Author

charliecreates bot commented Feb 12, 2026

@rybosome Pushed the 4 local merge-readiness commits to :\n- 8fdaceb\n- bceaa58\n- 112c4ac\n- 1f1f1cc (HEAD)\n\nAll CI checks are green (Deploy production is skipped as expected). Branch is up-to-date and GitHub reports no merge conflicts (mergeable: MERGEABLE).\n\nResolved all 9 review threads listed in the task. Ready to merge once review requirement is satisfied.

Remaining blocker: an approving review from a human reviewer (I can’t approve my own PR).

@charliecreates charliecreates bot requested a review from rybosome February 12, 2026 21:29
@rybosome
Copy link
Owner

@CharlieHelps please conduct a thorough PR review

@charliecreates
Copy link
Contributor Author

Pulled down PR #388 locally and ran pnpm -w check:js (lint + typecheck + tests + JS build). ✅ All passing on linux/arm64.

High-level

This is a nice chunk of functionality:

  • v1 benchmark-suite contract parse/validate/normalize
  • fixture resolution (incl $FIXTURES/... + fixture-pack dir aliasing via <dir>/<dir>.tm)
  • node-native runner with warmup + measured phases, hrtime-based sampling + p50/p95 + throughput
  • emits both raw.json and Bencher Metric Format bmf.json
  • CLI wiring: pnpm bench --backend node-native --suite micro

What looks strong

  • Strict contract validation + helpful parse errors.
  • Fixture-root restriction checks are a good safety baseline.
  • Runner ergonomics are solid: clear native-addon remediation message, and the warmup/measured split is exactly what you want for microbench.
  • BMF mapping: using separate latency_p50/latency_p95 measures is reasonable (and { value: number } is a minimal valid BMF metric entry per Bencher’s schema).

Suggestions / nits (mostly non-blocking)

  1. Path restriction helper in metaKernel.ts

    • ensureWithinDirOrThrow() currently only checks .. prefixes from path.relative(...). On Windows, path.relative can return an absolute path when drives differ, which won’t start with ...
    • Suggest: also treat path.isAbsolute(rel) as an escape, or reuse the slightly stricter pattern used in shared/fixtures.
  2. Tests for the tricky parsers/resolvers

    • resolveFixtureRef() and the meta-kernel parsing/sanitization are the two most “sharp edge” areas (path traversal + regex parsing).
    • Even a small unit-test suite covering $FIXTURES expansion, directory fixture-pack aliasing, KERNELS_TO_LOAD parsing (incl +=), and restriction enforcement would help a lot.
  3. Document units / semantics

    • Since BMF doesn’t encode units, it may be worth an explicit README note that:
      • latency_* values are ns/op
      • throughput is ops/sec
    • (So downstream Bencher measure config/thresholding matches expectations.)
  4. Output overwrite behavior

    • You already call this out in the PR description; consider a small CLI log line or optional --overwrite/--no-overwrite guard so it’s harder to accidentally clobber prior runs.
  5. Dispatch extensibility

    • dispatch.ts currently supports time.str2et only. The runtime type-checking is good; could be worth making the unsupported-call error include the list of supported calls to guide contributors.

Overall: this looks close to merge-ready to me — the only thing I’d strongly consider tightening before shipping is the Windows/absolute-path edge case in the meta-kernel restriction helper.

@rybosome
Copy link
Owner

Pulled down PR #388 locally and ran pnpm -w check:js (lint + typecheck + tests + JS build). ✅ All passing on linux/arm64.

High-level

This is a nice chunk of functionality:

  • v1 benchmark-suite contract parse/validate/normalize
  • fixture resolution (incl $FIXTURES/... + fixture-pack dir aliasing via <dir>/<dir>.tm)
  • node-native runner with warmup + measured phases, hrtime-based sampling + p50/p95 + throughput
  • emits both raw.json and Bencher Metric Format bmf.json
  • CLI wiring: pnpm bench --backend node-native --suite micro

What looks strong

  • Strict contract validation + helpful parse errors.
  • Fixture-root restriction checks are a good safety baseline.
  • Runner ergonomics are solid: clear native-addon remediation message, and the warmup/measured split is exactly what you want for microbench.
  • BMF mapping: using separate latency_p50/latency_p95 measures is reasonable (and { value: number } is a minimal valid BMF metric entry per Bencher’s schema).

Suggestions / nits (mostly non-blocking)

  1. Path restriction helper in metaKernel.ts

    • ensureWithinDirOrThrow() currently only checks .. prefixes from path.relative(...). On Windows, path.relative can return an absolute path when drives differ, which won’t start with ...
    • Suggest: also treat path.isAbsolute(rel) as an escape, or reuse the slightly stricter pattern used in shared/fixtures.
  2. Tests for the tricky parsers/resolvers

    • resolveFixtureRef() and the meta-kernel parsing/sanitization are the two most “sharp edge” areas (path traversal + regex parsing).
    • Even a small unit-test suite covering $FIXTURES expansion, directory fixture-pack aliasing, KERNELS_TO_LOAD parsing (incl +=), and restriction enforcement would help a lot.
  3. Document units / semantics

    • Since BMF doesn’t encode units, it may be worth an explicit README note that:

      • latency_* values are ns/op
      • throughput is ops/sec
    • (So downstream Bencher measure config/thresholding matches expectations.)

  4. Output overwrite behavior

    • You already call this out in the PR description; consider a small CLI log line or optional --overwrite/--no-overwrite guard so it’s harder to accidentally clobber prior runs.
  5. Dispatch extensibility

    • dispatch.ts currently supports time.str2et only. The runtime type-checking is good; could be worth making the unsupported-call error include the list of supported calls to guide contributors.

Overall: this looks close to merge-ready to me — the only thing I’d strongly consider tightening before shipping is the Windows/absolute-path edge case in the meta-kernel restriction helper.

@CharlieHelps sounds good, please fix the pathin edge case in the meta-kernel restriction helper so that we can merge this.

@charliecreates
Copy link
Contributor Author

charliecreates bot commented Feb 12, 2026

(Edited) Formatting issue in previous comment — please ignore. See follow-up: #388 (comment)

@charliecreates
Copy link
Contributor Author

Pushed a fix for the Windows cross-drive escape case.

ensureWithinDirOrThrow() now treats path.relative(baseDir, resolved) returning an absolute path (Windows different-drive behavior when the inputs are on different drives) as an escape and throws, in addition to the existing ..-based checks.

@rybosome
Copy link
Owner

@CharlieHelps please conduct a thorough review of this PR

@charliecreates
Copy link
Contributor Author

Thanks for the ping — I pulled PR #388 and did a pass over the contract/fixture/runner pieces.

Verification

  • pnpm run check: ✅
  • pnpm run build: ✅
  • pnpm bench --backend node-native --suite micro: fails fast with the intended prerequisite guidance on linux/arm64 (native addon missing + CSPICE note). ✅ UX looks good.

What looks good

  • Contract v1: strict unknown-key rejection + clear error messages.
  • Fixture resolution: $FIXTURES/... support + escape protection via ensureWithinDirOrThrow(); the “directory alias -> <dir>/<dir>.tm” behavior is a nice usability touch.
  • Runner: warmup/measured phases, per-iteration isolation, and process.hrtime.bigint() timing with sanity checks.
  • Outputs: emitting both raw.json and bmf.json is useful; treating latency_p50/latency_p95 as first-class measures makes sense.

One fix I’d like before merge (Windows cross-drive escape)

You patched packages/backend-verify/src/kernels/metaKernel.ts to guard against the Windows drive-letter path.relative() case (path.isAbsolute(rel)), but there’s a near-identical ensureWithinDirOrThrow() in packages/perf-analysis/src/runners/node-native/metaKernel.ts that doesn’t include that guard.

On Windows, path.relative() can return an absolute path when the two inputs are on different drives, which bypasses the rel.startsWith("..") checks.

Suggested fix is to mirror the backend-verify logic:

const rel = path.relative(allowedDirReal, resolvedReal)
if (rel === ".." || rel.startsWith(".." + path.sep) || path.isAbsolute(rel)) {
  throw new Error(...)
}

Nits / follow-ups

  • Metric units: latency_p50/p95 look like ns/op while throughput is ops/sec. Since BMF has no units field, I’d document this explicitly in the README (and/or include a units map in raw.json).
  • Artifact clobbering: default ./benchmarks/results overwrites raw.json / bmf.json. Consider --overwrite or a timestamped subdir default to avoid accidental clobbers.
  • Schema drift risk: validate() and normalizeFixtureRefs() both enforce unknown-key checks; might be worth consolidating to avoid divergence as the contract evolves.

@rybosome
Copy link
Owner

@CharlieHelps thank you for the additional review, my replies inline.

Thanks for the ping — I pulled PR #388 and did a pass over the contract/fixture/runner pieces.

Verification

  • pnpm run check: ✅
  • pnpm run build: ✅
  • pnpm bench --backend node-native --suite micro: fails fast with the intended prerequisite guidance on linux/arm64 (native addon missing + CSPICE note). ✅ UX looks good.

What looks good

  • Contract v1: strict unknown-key rejection + clear error messages.
  • Fixture resolution: $FIXTURES/... support + escape protection via ensureWithinDirOrThrow(); the “directory alias -> <dir>/<dir>.tm” behavior is a nice usability touch.
  • Runner: warmup/measured phases, per-iteration isolation, and process.hrtime.bigint() timing with sanity checks.
  • Outputs: emitting both raw.json and bmf.json is useful; treating latency_p50/latency_p95 as first-class measures makes sense.

One fix I’d like before merge (Windows cross-drive escape)

You patched packages/backend-verify/src/kernels/metaKernel.ts to guard against the Windows drive-letter path.relative() case (path.isAbsolute(rel)), but there’s a near-identical ensureWithinDirOrThrow() in packages/perf-analysis/src/runners/node-native/metaKernel.ts that doesn’t include that guard.

On Windows, path.relative() can return an absolute path when the two inputs are on different drives, which bypasses the rel.startsWith("..") checks.

Suggested fix is to mirror the backend-verify logic:

const rel = path.relative(allowedDirReal, resolvedReal)
if (rel === ".." || rel.startsWith(".." + path.sep) || path.isAbsolute(rel)) {
  throw new Error(...)
}

Agreed, please add this to the PR

Nits / follow-ups

  • Metric units: latency_p50/p95 look like ns/op while throughput is ops/sec. Since BMF has no units field, I’d document this explicitly in the README (and/or include a units map in raw.json).

good suggestion, please add this

  • Artifact clobbering: default ./benchmarks/results overwrites raw.json / bmf.json. Consider --overwrite or a timestamped subdir default to avoid accidental clobbers.

please go with timestamped subdir default

@charliecreates
Copy link
Contributor Author

✅ Pushed the requested updates in commit cef0db644b4a68f0e15e0b3516dad0cd68323cb0:\n\n- Hardened to also reject cross-drive Windows returning absolute paths (), matching backend-verify.\n- Documented metric units: are , is (BMF has no units field). Updated and bench CLI help.\n- Default output dir now uses a timestamped subdir to avoid clobbering; still uses the exact provided directory.\n- Verified

tspice@ check /home/user/tspice
pnpm run check:js

tspice@ check:js /home/user/tspice
pnpm run check:compliance && pnpm run check:versions && pnpm run format:check && pnpm run lint && pnpm run build:js && pnpm run check:bench-contract && pnpm run typecheck && pnpm run test:js

tspice@ check:compliance /home/user/tspice
node scripts/check-compliance-files.mjs

Compliance file check passed.

tspice@ check:versions /home/user/tspice
node scripts/verify-native-package-versions.mjs

tspice@ format:check /home/user/tspice
pnpm -C apps/orrery run format:check

@rybosome/orrery@0.0.7 format:check /home/user/tspice/apps/orrery
prettier --check .

Checking formatting...
All matched files use Prettier code style!

tspice@ lint /home/user/tspice
pnpm -r --if-present lint

packages/tspice-native-darwin-arm64 |  WARN  Unsupported platform: wanted: {"cpu":["arm64"],"os":["darwin"],"libc":["any"]} (current: {"os":"linux","cpu":"arm64","libc":"glibc"})
packages/tspice-native-darwin-x64 |  WARN  Unsupported platform: wanted: {"cpu":["x64"],"os":["darwin"],"libc":["any"]} (current: {"os":"linux","cpu":"arm64","libc":"glibc"})
packages/tspice-native-linux-x64-gnu |  WARN  Unsupported platform: wanted: {"cpu":["x64"],"os":["linux"],"libc":["glibc"]} (current: {"os":"linux","cpu":"arm64","libc":"glibc"})
Scope: 15 of 16 workspace projects
apps/orrery lint$ eslint "src//*.{ts,tsx}" "e2e//*.ts" vite.config.ts playwright.config.ts --max-warnings 0
apps/orrery lint: Done

tspice@ build:js /home/user/tspice
turbo run build --filter=!@rybosome/tspice-backend-node

• Packages in scope: @rybosome/orrery, @rybosome/tspice, @rybosome/tspice-backend-contract, @rybosome/tspice-backend-fake, @rybosome/tspice-backend-shim-c, @rybosome/tspice-backend-verify, @rybosome/tspice-backend-wasm, @rybosome/tspice-bench-contract, @rybosome/tspice-core, @rybosome/tspice-native-darwin-arm64, @rybosome/tspice-native-darwin-x64, @rybosome/tspice-native-linux-x64-gnu, @rybosome/tspice-perf-analysis, @rybosome/tspice-web-components
• Running build in 14 packages
• Remote caching disabled
@rybosome/tspice-perf-analysis:build: cache miss, executing 3c778aa9ff3eb981
@rybosome/tspice-backend-contract:build: cache miss, executing f43d01e3844c3b0a
@rybosome/tspice-bench-contract:build: cache miss, executing d3d37539415de389
@rybosome/tspice-core:build: cache miss, executing 650b8227a4a8ab1f
@rybosome/tspice-backend-contract:build:
@rybosome/tspice-backend-contract:build: > @rybosome/tspice-backend-contract@0.0.7 build /home/user/tspice/packages/backend-contract
@rybosome/tspice-backend-contract:build: > tsc -p tsconfig.json
@rybosome/tspice-backend-contract:build:
@rybosome/tspice-core:build:
@rybosome/tspice-core:build: > @rybosome/tspice-core@0.0.7 build /home/user/tspice/packages/core
@rybosome/tspice-core:build: > tsc -p tsconfig.json
@rybosome/tspice-core:build:
@rybosome/tspice-perf-analysis:build:
@rybosome/tspice-perf-analysis:build: > @rybosome/tspice-perf-analysis@0.0.7 build /home/user/tspice/packages/perf-analysis
@rybosome/tspice-perf-analysis:build: > tsc -p tsconfig.json
@rybosome/tspice-perf-analysis:build:
@rybosome/tspice-bench-contract:build:
@rybosome/tspice-bench-contract:build: > @rybosome/tspice-bench-contract@0.0.7 build /home/user/tspice/packages/bench-contract
@rybosome/tspice-bench-contract:build: > tsc -p tsconfig.json
@rybosome/tspice-bench-contract:build:
@rybosome/tspice-backend-fake:build: cache miss, executing 45702897f543ea24
@rybosome/tspice-backend-wasm:build: cache miss, executing fa5c68d84b0b759f
@rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-wasm:build: > @rybosome/tspice-backend-wasm@0.0.7 build /home/user/tspice/packages/backend-wasm
@rybosome/tspice-backend-wasm:build: > tsc -b tsconfig.json && pnpm run stage:assets
@rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-fake:build:
@rybosome/tspice-backend-fake:build: > @rybosome/tspice-backend-fake@0.0.7 build /home/user/tspice/packages/backend-fake
@rybosome/tspice-backend-fake:build: > tsc -p tsconfig.json
@rybosome/tspice-backend-fake:build:
@rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-wasm:build: > @rybosome/tspice-backend-wasm@0.0.7 stage:assets /home/user/tspice/packages/backend-wasm
@rybosome/tspice-backend-wasm:build: > node ../../scripts/copy-backend-wasm-assets.mjs
@rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-node:build: cache miss, executing 1ef5b7f184361475
@rybosome/tspice-backend-node:build:
@rybosome/tspice-backend-node:build: > @rybosome/tspice-backend-node@0.0.7 build /home/user/tspice/packages/backend-node
@rybosome/tspice-backend-node:build: > tsc -b tsconfig.json
@rybosome/tspice-backend-node:build:
@rybosome/tspice:build: cache miss, executing 15fc8849f7bee3be
@rybosome/tspice:build:
@rybosome/tspice:build: > @rybosome/tspice@0.0.7 build /home/user/tspice/packages/tspice
@rybosome/tspice:build: > tsc -p tsconfig.json
@rybosome/tspice:build:
@rybosome/orrery:build: cache miss, executing 5e47a9f7c9e62e6b
@rybosome/tspice-backend-verify:build: cache miss, executing 4fd63a13a9bf191e
@rybosome/tspice-web-components:build: cache miss, executing c279bc83c6923967
@rybosome/tspice-backend-verify:build:
@rybosome/tspice-backend-verify:build: > @rybosome/tspice-backend-verify@0.0.0 build /home/user/tspice/packages/backend-verify
@rybosome/tspice-backend-verify:build: > tsc -b tsconfig.json
@rybosome/tspice-backend-verify:build:
@rybosome/orrery:build:
@rybosome/orrery:build: > @rybosome/orrery@0.0.7 build /home/user/tspice/apps/orrery
@rybosome/orrery:build: > vite build
@rybosome/orrery:build:
@rybosome/tspice-web-components:build:
@rybosome/tspice-web-components:build: > @rybosome/tspice-web-components@0.0.7 build /home/user/tspice/packages/tspice-web-components
@rybosome/tspice-web-components:build: > tsc -p tsconfig.json
@rybosome/tspice-web-components:build:
@rybosome/orrery:build: vite v7.3.1 building client environment for production...
@rybosome/orrery:build: transforming...
@rybosome/orrery:build: ✓ 150 modules transformed.
@rybosome/orrery:build: rendering chunks...
@rybosome/orrery:build: computing gzip size...
@rybosome/orrery:build: dist/index.html 1.49 kB │ gzip: 0.54 kB
@rybosome/orrery:build: dist/assets/tspice_backend_wasm-NTTg95KN.wasm 1,286.92 kB │ gzip: 410.28 kB
@rybosome/orrery:build: dist/assets/index-5MPhzSw2.css 25.49 kB │ gzip: 4.32 kB
@rybosome/orrery:build: dist/assets/index.web-B-QCxftA.js 49.29 kB │ gzip: 12.34 kB
@rybosome/orrery:build: dist/assets/tspice_backend_wasm.web-CmbIi1Jm.js 51.98 kB │ gzip: 15.86 kB
@rybosome/orrery:build: dist/assets/index-ULgzYLDm.js 870.23 kB │ gzip: 239.82 kB
@rybosome/orrery:build:
@rybosome/orrery:build: (!) Some chunks are larger than 500 kB after minification. Consider:
@rybosome/orrery:build: - Using dynamic import() to code-split the application
@rybosome/orrery:build: - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
@rybosome/orrery:build: - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
@rybosome/orrery:build: ✓ built in 4.36s

Tasks: 11 successful, 11 total
Cached: 0 cached, 11 total
Time: 15.114s

tspice@ check:bench-contract /home/user/tspice
pnpm bench:contract validate benchmarks/contracts/v1/example.yml

tspice@ bench:contract /home/user/tspice
node scripts/bench-contract.mjs validate benchmarks/contracts/v1/example.yml

OK

tspice@ typecheck /home/user/tspice
turbo run build --filter=@rybosome/tspice-backend-contract && turbo run typecheck

• Packages in scope: @rybosome/tspice-backend-contract
• Running build in 1 packages
• Remote caching disabled
@rybosome/tspice-backend-contract:build: cache hit, replaying logs f43d01e3844c3b0a
@rybosome/tspice-backend-contract:build:
@rybosome/tspice-backend-contract:build: > @rybosome/tspice-backend-contract@0.0.7 build /home/user/tspice/packages/backend-contract
@rybosome/tspice-backend-contract:build: > tsc -p tsconfig.json
@rybosome/tspice-backend-contract:build:

Tasks: 1 successful, 1 total
Cached: 1 cached, 1 total
Time: 47ms >>> FULL TURBO

• Packages in scope: @rybosome/orrery, @rybosome/tspice, @rybosome/tspice-backend-contract, @rybosome/tspice-backend-fake, @rybosome/tspice-backend-node, @rybosome/tspice-backend-shim-c, @rybosome/tspice-backend-verify, @rybosome/tspice-backend-wasm, @rybosome/tspice-bench-contract, @rybosome/tspice-core, @rybosome/tspice-native-darwin-arm64, @rybosome/tspice-native-darwin-x64, @rybosome/tspice-native-linux-x64-gnu, @rybosome/tspice-perf-analysis, @rybosome/tspice-web-components
• Running typecheck in 15 packages
• Remote caching disabled
@rybosome/tspice-backend-contract:typecheck: cache miss, executing e0cca6a7db725a2b
@rybosome/tspice-bench-contract:typecheck: cache miss, executing 8b949c61207b850c
@rybosome/tspice-core:typecheck: cache miss, executing c4097ec7da171383
@rybosome/tspice-perf-analysis:typecheck: cache miss, executing a483d74038d88e8b
@rybosome/tspice-backend-contract:typecheck:
@rybosome/tspice-backend-contract:typecheck: > @rybosome/tspice-backend-contract@0.0.7 typecheck /home/user/tspice/packages/backend-contract
@rybosome/tspice-backend-contract:typecheck: > tsc -p tsconfig.json --noEmit
@rybosome/tspice-backend-contract:typecheck:
@rybosome/tspice-bench-contract:typecheck:
@rybosome/tspice-bench-contract:typecheck: > @rybosome/tspice-bench-contract@0.0.7 typecheck /home/user/tspice/packages/bench-contract
@rybosome/tspice-bench-contract:typecheck: > tsc -p tsconfig.json --noEmit
@rybosome/tspice-bench-contract:typecheck:
@rybosome/tspice-perf-analysis:typecheck:
@rybosome/tspice-perf-analysis:typecheck: > @rybosome/tspice-perf-analysis@0.0.7 typecheck /home/user/tspice/packages/perf-analysis
@rybosome/tspice-perf-analysis:typecheck: > tsc -p tsconfig.json --noEmit
@rybosome/tspice-perf-analysis:typecheck:
@rybosome/tspice-core:typecheck:
@rybosome/tspice-core:typecheck: > @rybosome/tspice-core@0.0.7 typecheck /home/user/tspice/packages/core
@rybosome/tspice-core:typecheck: > tsc -p tsconfig.json --emitDeclarationOnly
@rybosome/tspice-core:typecheck:
@rybosome/tspice-backend-wasm:typecheck: cache miss, executing cdaa1107497b34fb
@rybosome/tspice-backend-fake:typecheck: cache miss, executing bb8d0a7c488ece75
@rybosome/tspice-backend-fake:typecheck:
@rybosome/tspice-backend-fake:typecheck: > @rybosome/tspice-backend-fake@0.0.7 typecheck /home/user/tspice/packages/backend-fake
@rybosome/tspice-backend-fake:typecheck: > tsc -p tsconfig.json --emitDeclarationOnly
@rybosome/tspice-backend-fake:typecheck:
@rybosome/tspice-backend-wasm:typecheck:
@rybosome/tspice-backend-wasm:typecheck: > @rybosome/tspice-backend-wasm@0.0.7 typecheck /home/user/tspice/packages/backend-wasm
@rybosome/tspice-backend-wasm:typecheck: > tsc -b tsconfig.json --emitDeclarationOnly
@rybosome/tspice-backend-wasm:typecheck:
@rybosome/tspice-backend-node:typecheck: cache miss, executing c15fcc24ebb1dac9
@rybosome/tspice-backend-node:typecheck:
@rybosome/tspice-backend-node:typecheck: > @rybosome/tspice-backend-node@0.0.7 typecheck /home/user/tspice/packages/backend-node
@rybosome/tspice-backend-node:typecheck: > tsc -p tsconfig.json --emitDeclarationOnly
@rybosome/tspice-backend-node:typecheck:
@rybosome/tspice:typecheck: cache miss, executing 79518f40c3f12ffe
@rybosome/tspice:typecheck:
@rybosome/tspice:typecheck: > @rybosome/tspice@0.0.7 typecheck /home/user/tspice/packages/tspice
@rybosome/tspice:typecheck: > tsc -p tsconfig.json --emitDeclarationOnly && tsc -p tsconfig.test.json --noEmit
@rybosome/tspice:typecheck:
@rybosome/tspice-web-components:typecheck: cache miss, executing 8c71e91fbb038ea9
@rybosome/orrery:typecheck: cache miss, executing 21724e085dfacc8e
@rybosome/tspice-backend-verify:typecheck: cache miss, executing d58fa90bac702b5b
@rybosome/orrery:typecheck:
@rybosome/orrery:typecheck: > @rybosome/orrery@0.0.7 typecheck /home/user/tspice/apps/orrery
@rybosome/orrery:typecheck: > node -e "require('node:fs').mkdirSync('dist',{recursive:true})" && tsc -p tsconfig.typecheck.json --noEmit --incremental --tsBuildInfoFile dist/.tsbuildinfo
@rybosome/orrery:typecheck:
@rybosome/tspice-web-components:typecheck:
@rybosome/tspice-web-components:typecheck: > @rybosome/tspice-web-components@0.0.7 typecheck /home/user/tspice/packages/tspice-web-components
@rybosome/tspice-web-components:typecheck: > tsc -p tsconfig.json --emitDeclarationOnly
@rybosome/tspice-web-components:typecheck:
@rybosome/tspice-backend-verify:typecheck:
@rybosome/tspice-backend-verify:typecheck: > @rybosome/tspice-backend-verify@0.0.0 typecheck /home/user/tspice/packages/backend-verify
@rybosome/tspice-backend-verify:typecheck: > tsc -p tsconfig.json --noEmit
@rybosome/tspice-backend-verify:typecheck:

Tasks: 11 successful, 11 total
Cached: 0 cached, 11 total
Time: 13.421s

tspice@ test:js /home/user/tspice
turbo run test --filter=!@rybosome/tspice-backend-node

• Packages in scope: @rybosome/orrery, @rybosome/tspice, @rybosome/tspice-backend-contract, @rybosome/tspice-backend-fake, @rybosome/tspice-backend-shim-c, @rybosome/tspice-backend-verify, @rybosome/tspice-backend-wasm, @rybosome/tspice-bench-contract, @rybosome/tspice-core, @rybosome/tspice-native-darwin-arm64, @rybosome/tspice-native-darwin-x64, @rybosome/tspice-native-linux-x64-gnu, @rybosome/tspice-perf-analysis, @rybosome/tspice-web-components
• Running test in 14 packages
• Remote caching disabled
@rybosome/tspice-core:build: cache hit, replaying logs 650b8227a4a8ab1f
@rybosome/tspice-core:build:
@rybosome/tspice-core:build: > @rybosome/tspice-core@0.0.7 build /home/user/tspice/packages/core
@rybosome/tspice-core:build: > tsc -p tsconfig.json
@rybosome/tspice-core:build:
@rybosome/tspice-bench-contract:build: cache hit, replaying logs d3d37539415de389
@rybosome/tspice-bench-contract:build:
@rybosome/tspice-bench-contract:build: > @rybosome/tspice-bench-contract@0.0.7 build /home/user/tspice/packages/bench-contract
@rybosome/tspice-bench-contract:build: > tsc -p tsconfig.json
@rybosome/tspice-bench-contract:build:
@rybosome/tspice-backend-contract:build: cache hit, replaying logs f43d01e3844c3b0a
@rybosome/tspice-backend-contract:build:
@rybosome/tspice-backend-contract:build: > @rybosome/tspice-backend-contract@0.0.7 build /home/user/tspice/packages/backend-contract
@rybosome/tspice-backend-contract:build: > tsc -p tsconfig.json
@rybosome/tspice-backend-contract:build:
@rybosome/tspice-core:test: cache miss, executing fa2173ad9e4efa6a
@rybosome/tspice-perf-analysis:build: cache hit, replaying logs 3c778aa9ff3eb981
@rybosome/tspice-perf-analysis:build:
@rybosome/tspice-perf-analysis:build: > @rybosome/tspice-perf-analysis@0.0.7 build /home/user/tspice/packages/perf-analysis
@rybosome/tspice-perf-analysis:build: > tsc -p tsconfig.json
@rybosome/tspice-perf-analysis:build:
@rybosome/tspice-bench-contract:test: cache miss, executing d182b5006660bad0
@rybosome/tspice-backend-fake:build: cache hit, replaying logs 45702897f543ea24
@rybosome/tspice-backend-fake:build:
@rybosome/tspice-backend-fake:build: > @rybosome/tspice-backend-fake@0.0.7 build /home/user/tspice/packages/backend-fake
@rybosome/tspice-backend-fake:build: > tsc -p tsconfig.json
@rybosome/tspice-backend-fake:build:
@rybosome/tspice-backend-contract:test: cache miss, executing 060cbf3e8b18071c
@rybosome/tspice-backend-fake:test: cache miss, executing b2eac7a084152c0b
@rybosome/tspice-backend-wasm:build: cache hit, replaying logs fa5c68d84b0b759f
@rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-wasm:build: > @rybosome/tspice-backend-wasm@0.0.7 build /home/user/tspice/packages/backend-wasm
@rybosome/tspice-backend-wasm:build: > tsc -b tsconfig.json && pnpm run stage:assets
@rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-wasm:build: > @rybosome/tspice-backend-wasm@0.0.7 stage:assets /home/user/tspice/packages/backend-wasm
@rybosome/tspice-backend-wasm:build: > node ../../scripts/copy-backend-wasm-assets.mjs
@rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-wasm:test: cache miss, executing 46912dfac9fe9a9a
@rybosome/tspice-backend-node:build: cache hit, replaying logs 1ef5b7f184361475
@rybosome/tspice-backend-node:build:
@rybosome/tspice-backend-node:build: > @rybosome/tspice-backend-node@0.0.7 build /home/user/tspice/packages/backend-node
@rybosome/tspice-backend-node:build: > tsc -b tsconfig.json
@rybosome/tspice-backend-node:build:
@rybosome/tspice:build: cache hit, replaying logs 15fc8849f7bee3be
@rybosome/tspice:build:
@rybosome/tspice:build: > @rybosome/tspice@0.0.7 build /home/user/tspice/packages/tspice
@rybosome/tspice:build: > tsc -p tsconfig.json
@rybosome/tspice:build:
@rybosome/tspice-web-components:build: cache hit, replaying logs c279bc83c6923967
@rybosome/tspice-web-components:build:
@rybosome/tspice-web-components:build: > @rybosome/tspice-web-components@0.0.7 build /home/user/tspice/packages/tspice-web-components
@rybosome/tspice-web-components:build: > tsc -p tsconfig.json
@rybosome/tspice-web-components:build:
@rybosome/tspice:test: cache miss, executing 3ab063b9207a39a3
@rybosome/tspice-backend-verify:build: cache hit, replaying logs 4fd63a13a9bf191e
@rybosome/tspice-backend-verify:build:
@rybosome/tspice-backend-verify:build: > @rybosome/tspice-backend-verify@0.0.0 build /home/user/tspice/packages/backend-verify
@rybosome/tspice-backend-verify:build: > tsc -b tsconfig.json
@rybosome/tspice-backend-verify:build:
@rybosome/tspice-web-components:test: cache miss, executing 40b3570a8a315386
@rybosome/tspice-backend-verify:test: cache miss, executing 07098e2f152da45a
@rybosome/orrery:build: cache hit, replaying logs 5e47a9f7c9e62e6b
@rybosome/orrery:build:
@rybosome/orrery:build: > @rybosome/orrery@0.0.7 build /home/user/tspice/apps/orrery
@rybosome/orrery:build: > vite build
@rybosome/orrery:build:
@rybosome/orrery:build: vite v7.3.1 building client environment for production...
@rybosome/orrery:build: transforming...
@rybosome/orrery:build: ✓ 150 modules transformed.
@rybosome/orrery:build: rendering chunks...
@rybosome/orrery:build: computing gzip size...
@rybosome/orrery:build: dist/index.html 1.49 kB │ gzip: 0.54 kB
@rybosome/orrery:build: dist/assets/tspice_backend_wasm-NTTg95KN.wasm 1,286.92 kB │ gzip: 410.28 kB
@rybosome/orrery:build: dist/assets/index-5MPhzSw2.css 25.49 kB │ gzip: 4.32 kB
@rybosome/orrery:build: dist/assets/index.web-B-QCxftA.js 49.29 kB │ gzip: 12.34 kB
@rybosome/orrery:build: dist/assets/tspice_backend_wasm.web-CmbIi1Jm.js 51.98 kB │ gzip: 15.86 kB
@rybosome/orrery:build: dist/assets/index-ULgzYLDm.js 870.23 kB │ gzip: 239.82 kB
@rybosome/orrery:build:
@rybosome/orrery:build: (!) Some chunks are larger than 500 kB after minification. Consider:
@rybosome/orrery:build: - Using dynamic import() to code-split the application
@rybosome/orrery:build: - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
@rybosome/orrery:build: - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
@rybosome/orrery:build: ✓ built in 4.36s
@rybosome/orrery:test: cache miss, executing 92c216fd5ce42fd0
@rybosome/tspice-backend-fake:test:
@rybosome/tspice-backend-fake:test: > @rybosome/tspice-backend-fake@0.0.7 pretest /home/user/tspice/packages/backend-fake
@rybosome/tspice-backend-fake:test: > pnpm run build
@rybosome/tspice-backend-fake:test:
@rybosome/tspice-backend-contract:test:
@rybosome/tspice-backend-contract:test: > @rybosome/tspice-backend-contract@0.0.7 test /home/user/tspice/packages/backend-contract
@rybosome/tspice-backend-contract:test: > vitest run
@rybosome/tspice-backend-contract:test:
@rybosome/tspice-core:test:
@rybosome/tspice-core:test: > @rybosome/tspice-core@0.0.7 test /home/user/tspice/packages/core
@rybosome/tspice-core:test: > vitest run
@rybosome/tspice-core:test:
@rybosome/tspice-bench-contract:test:
@rybosome/tspice-bench-contract:test: > @rybosome/tspice-bench-contract@0.0.7 test /home/user/tspice/packages/bench-contract
@rybosome/tspice-bench-contract:test: > vitest run
@rybosome/tspice-bench-contract:test:
@rybosome/tspice-backend-wasm:test:
@rybosome/tspice-backend-wasm:test: > @rybosome/tspice-backend-wasm@0.0.7 pretest /home/user/tspice/packages/backend-wasm
@rybosome/tspice-backend-wasm:test: > pnpm run stage:assets
@rybosome/tspice-backend-wasm:test:
@rybosome/tspice-web-components:test:
@rybosome/tspice-web-components:test: > @rybosome/tspice-web-components@0.0.7 test /home/user/tspice/packages/tspice-web-components
@rybosome/tspice-web-components:test: > vitest run
@rybosome/tspice-web-components:test:
@rybosome/tspice-backend-verify:test:
@rybosome/tspice-backend-verify:test: > @rybosome/tspice-backend-verify@0.0.0 pretest /home/user/tspice/packages/backend-verify
@rybosome/tspice-backend-verify:test: > pnpm -w turbo run build --filter=@rybosome/tspice && node ./scripts/pretest-cspice-runner.mjs
@rybosome/tspice-backend-verify:test:
@rybosome/tspice:test:
@rybosome/tspice:test: > @rybosome/tspice@0.0.7 pretest /home/user/tspice/packages/tspice
@rybosome/tspice:test: > pnpm run build
@rybosome/tspice:test:
@rybosome/orrery:test:
@rybosome/orrery:test: > @rybosome/orrery@0.0.7 test /home/user/tspice/apps/orrery
@rybosome/orrery:test: > vitest run
@rybosome/orrery:test:
@rybosome/tspice-backend-fake:test:
@rybosome/tspice-backend-fake:test: > @rybosome/tspice-backend-fake@0.0.7 build /home/user/tspice/packages/backend-fake
@rybosome/tspice-backend-fake:test: > tsc -p tsconfig.json
@rybosome/tspice-backend-fake:test:
@rybosome/tspice-core:test:
@rybosome/tspice-core:test: RUN v2.1.9 /home/user/tspice/packages/core
@rybosome/tspice-backend-wasm:test:
@rybosome/tspice-backend-wasm:test: > @rybosome/tspice-backend-wasm@0.0.7 stage:assets /home/user/tspice/packages/backend-wasm
@rybosome/tspice-backend-wasm:test: > node ../../scripts/copy-backend-wasm-assets.mjs
@rybosome/tspice-backend-wasm:test:
@rybosome/tspice-core:test:
@rybosome/tspice-web-components:test:
@rybosome/tspice-web-components:test: RUN v2.1.9 /home/user/tspice/packages/tspice-web-components
@rybosome/tspice-web-components:test:
@rybosome/tspice-bench-contract:test:
@rybosome/tspice-bench-contract:test: RUN v2.1.9 /home/user/tspice/packages/bench-contract
@rybosome/tspice-bench-contract:test:
@rybosome/tspice-backend-contract:test:
@rybosome/tspice-backend-contract:test: RUN v2.1.9 /home/user/tspice/packages/backend-contract
@rybosome/tspice-backend-contract:test:
@rybosome/tspice:test:
@rybosome/tspice:test: > @rybosome/tspice@0.0.7 build /home/user/tspice/packages/tspice
@rybosome/tspice:test: > tsc -p tsconfig.json
@rybosome/tspice:test:
@rybosome/tspice-backend-wasm:test:
@rybosome/tspice-backend-wasm:test: > @rybosome/tspice-backend-wasm@0.0.7 test /home/user/tspice/packages/backend-wasm
@rybosome/tspice-backend-wasm:test: > vitest run
@rybosome/tspice-backend-wasm:test:
@rybosome/tspice-backend-verify:test:
@rybosome/tspice-backend-verify:test: Attention:
@rybosome/tspice-backend-verify:test: Turborepo now collects completely anonymous telemetry regarding usage.
@rybosome/tspice-backend-verify:test: This information is used to shape the Turborepo roadmap and prioritize features.
@rybosome/tspice-backend-verify:test: You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
@rybosome/tspice-backend-verify:test: https://turborepo.com/docs/telemetry
@rybosome/tspice-backend-verify:test:
@rybosome/tspice-backend-verify:test: • turbo 2.7.4
@rybosome/tspice-backend-verify:test: • Packages in scope: @rybosome/tspice
@rybosome/tspice-backend-verify:test: • Running build in 1 packages
@rybosome/tspice-backend-verify:test: • Remote caching disabled
@rybosome/tspice-backend-verify:test: @rybosome/tspice-core:build: cache hit, replaying logs 650b8227a4a8ab1f
@rybosome/tspice-backend-verify:test: @rybosome/tspice-core:build:
@rybosome/tspice-backend-verify:test: @rybosome/tspice-core:build: > @rybosome/tspice-core@0.0.7 build /home/user/tspice/packages/core
@rybosome/tspice-backend-verify:test: @rybosome/tspice-core:build: > tsc -p tsconfig.json
@rybosome/tspice-backend-verify:test: @rybosome/tspice-core:build:
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-contract:build: cache hit, replaying logs f43d01e3844c3b0a
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-contract:build:
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-contract:build: > @rybosome/tspice-backend-contract@0.0.7 build /home/user/tspice/packages/backend-contract
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-contract:build: > tsc -p tsconfig.json
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-contract:build:
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-fake:build: cache hit, replaying logs 45702897f543ea24
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-fake:build:
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-fake:build: > @rybosome/tspice-backend-fake@0.0.7 build /home/user/tspice/packages/backend-fake
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-fake:build: > tsc -p tsconfig.json
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-fake:build:
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-wasm:build: cache hit, replaying logs fa5c68d84b0b759f
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-wasm:build: > @rybosome/tspice-backend-wasm@0.0.7 build /home/user/tspice/packages/backend-wasm
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-wasm:build: > tsc -b tsconfig.json && pnpm run stage:assets
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-wasm:build: > @rybosome/tspice-backend-wasm@0.0.7 stage:assets /home/user/tspice/packages/backend-wasm
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-wasm:build: > node ../../scripts/copy-backend-wasm-assets.mjs
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-node:build: cache hit, replaying logs 1ef5b7f184361475
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-node:build:
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-node:build: > @rybosome/tspice-backend-node@0.0.7 build /home/user/tspice/packages/backend-node
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-node:build: > tsc -b tsconfig.json
@rybosome/tspice-backend-verify:test: @rybosome/tspice-backend-node:build:
@rybosome/tspice-backend-verify:test: @rybosome/tspice:build: cache hit, replaying logs 15fc8849f7bee3be
@rybosome/tspice-backend-verify:test: @rybosome/tspice:build:
@rybosome/tspice-backend-verify:test: @rybosome/tspice:build: > @rybosome/tspice@0.0.7 build /home/user/tspice/packages/tspice
@rybosome/tspice-backend-verify:test: @rybosome/tspice:build: > tsc -p tsconfig.json
@rybosome/tspice-backend-verify:test: @rybosome/tspice:build:
@rybosome/tspice-backend-verify:test:
@rybosome/tspice-backend-verify:test: Tasks: 6 successful, 6 total
@rybosome/tspice-backend-verify:test: Cached: 6 cached, 6 total
@rybosome/tspice-backend-verify:test: Time: 453ms >>> FULL TURBO
@rybosome/tspice-backend-verify:test:
@rybosome/orrery:test:
@rybosome/orrery:test: RUN v3.2.4 /home/user/tspice/apps/orrery
@rybosome/orrery:test:
@rybosome/tspice-backend-verify:test:
@rybosome/tspice-backend-verify:test: > @rybosome/tspice-backend-verify@0.0.0 test /home/user/tspice/packages/backend-verify
@rybosome/tspice-backend-verify:test: > vitest run
@rybosome/tspice-backend-verify:test:
@rybosome/tspice-backend-wasm:test:
@rybosome/tspice-backend-wasm:test: RUN v2.1.9 /home/user/tspice/packages/backend-wasm
@rybosome/tspice-backend-wasm:test:
@rybosome/tspice-core:test: ✓ test/index.test.ts (3 tests) 36ms
@rybosome/tspice-core:test:
@rybosome/tspice-core:test: Test Files 1 passed (1)
@rybosome/tspice-core:test: Tests 3 passed (3)
@rybosome/tspice-core:test: Start at 22:33:30
@rybosome/tspice-core:test: Duration 2.04s (transform 236ms, setup 0ms, collect 211ms, tests 36ms, environment 0ms, prepare 525ms)
@rybosome/tspice-core:test:
@rybosome/tspice-bench-contract:test: ✓ test/fixtures.test.ts (6 tests) 110ms
@rybosome/tspice-bench-contract:test: ✓ test/validate.test.ts (6 tests) 74ms
@rybosome/tspice-bench-contract:test:
@rybosome/tspice-bench-contract:test: Test Files 2 passed (2)
@rybosome/tspice-bench-contract:test: Tests 12 passed (12)
@rybosome/tspice-bench-contract:test: Start at 22:33:30
@rybosome/tspice-bench-contract:test: Duration 2.67s (transform 1.39s, setup 0ms, collect 1.82s, tests 185ms, environment 9ms, prepare 1.05s)
@rybosome/tspice-bench-contract:test:
@rybosome/tspice-backend-contract:test: ✓ test/index.test.ts (3 tests) 982ms
@rybosome/tspice-backend-contract:test: ✓ @rybosome/tspice-backend-contract > exports Mat3 branding + validation helpers at runtime 928ms
@rybosome/tspice-backend-verify:test:
@rybosome/tspice-backend-verify:test: RUN v2.1.9 /home/user/tspice/packages/backend-verify
@rybosome/tspice-backend-verify:test:
@rybosome/tspice-backend-contract:test: ✓ test/kernels-utils.test.ts (14 tests) 72ms
@rybosome/orrery:test: ✓ src/scene/BodyRegistry.test.ts (5 tests) 19ms
@rybosome/orrery:test: ✓ src/time/timeStore.test.ts (5 tests) 22ms
@rybosome/tspice-backend-contract:test:
@rybosome/tspice-backend-contract:test: Test Files 2 passed (2)
@rybosome/tspice-backend-contract:test: Tests 17 passed (17)
@rybosome/tspice-backend-contract:test: Start at 22:33:30
@rybosome/tspice-backend-contract:test: Duration 3.36s (transform 1.39s, setup 0ms, collect 1.92s, tests 1.05s, environment 1ms, prepare 1.21s)
@rybosome/tspice-backend-contract:test:
@rybosome/orrery:test: ✓ src/time/defaultPlaybackRate.test.ts (5 tests) 22ms
@rybosome/tspice-backend-wasm:test: ✓ test/strings.test.ts (5 tests) 33ms
@rybosome/tspice-web-components:test: ✓ test/kernels.test.ts (14 tests) 1266ms
@rybosome/tspice-web-components:test: ✓ publicKernels > builds a canonical NAIF kernel pack (order-insensitive builder) 1104ms
@rybosome/tspice-web-components:test: ✓ test/createWorkerTransport.test.ts (17 tests) 1270ms
@rybosome/tspice-web-components:test: ✓ createWorkerTransport() > resolves requests via postMessage round-trip 1086ms
@rybosome/tspice-web-components:test: ✓ test/withCaching.test.ts (22 tests) 1304ms
@rybosome/tspice-web-components:test: ✓ withCaching() > caches forever when ttlMs is undefined (LRU-bounded) 1098ms
@rybosome/tspice-backend-fake:test:
@rybosome/tspice-backend-fake:test: > @rybosome/tspice-backend-fake@0.0.7 test /home/user/tspice/packages/backend-fake
@rybosome/tspice-backend-fake:test: > vitest run
@rybosome/tspice-backend-fake:test:
@rybosome/orrery:test: ✓ src/scene/runtime/focusAutoZoom.test.ts (4 tests) 24ms
@rybosome/orrery:test: ✓ src/controls/sunFocus.test.ts (1 test) 10ms
@rybosome/tspice:test:
@rybosome/tspice:test: > @rybosome/tspice@0.0.7 test /home/user/tspice/packages/tspice
@rybosome/tspice:test: > vitest run
@rybosome/tspice:test:
@rybosome/tspice-backend-wasm:test: ✓ test/codec-alloc.test.ts (12 tests) 41ms
@rybosome/tspice-backend-verify:test: ✓ test/metaKernel.test.ts (8 tests) 52ms
@rybosome/orrery:test: ✓ src/scene/SelectionOverlay.test.ts (2 tests) 4ms
@rybosome/tspice-web-components:test: ✓ test/rpcValueCodec.test.ts (8 tests) 28ms
@rybosome/tspice-web-components:test: ✓ test/createSpiceAsyncFromTransport.test.ts (3 tests) 494ms
@rybosome/tspice-web-components:test: ✓ createSpiceAsyncFromTransport() > blocks introspection/dangerous keys and caches method fns 331ms
@rybosome/tspice-backend-verify:test: ✓ test/cspiceRunner.strictJsonNumbers.test.ts (1 test) 3ms
@rybosome/tspice-backend-verify:test: stderr | test/cspiceRunner.strictJsonNumbers.test.ts > cspice-runner strict JSON number/int literal grammar > cspice-runner unavailable (skipping strict JSON literal tests)
@rybosome/tspice-backend-verify:test: [backend-verify] cspice-runner unavailable; skipping strict JSON literal tests (TSPICE_BACKEND_VERIFY_REQUIRED=false): Automatic CSPICE fetch is not supported on linux-arm64 (set TSPICE_CSPICE_DIR to a prebuilt CSPICE install)
@rybosome/tspice-backend-verify:test:
@rybosome/tspice-web-components:test: ✓ test/exposeTransportToWorker.test.ts (8 tests) 566ms
@rybosome/tspice-web-components:test: ✓ exposeTransportToWorker() > throws for invalid maxConcurrentRequests values 461ms
@rybosome/orrery:test: ✓ src/controls/useKeyboardControls.test.ts (5 tests) 10ms
@rybosome/orrery:test: ✓ src/time/viewerTimeBounds.test.ts (3 tests) 17ms
@rybosome/tspice-backend-fake:test:
@rybosome/tspice-backend-fake:test: RUN v2.1.9 /home/user/tspice/packages/backend-fake
@rybosome/tspice-backend-fake:test:
@rybosome/tspice:test:
@rybosome/tspice:test: RUN v2.1.9 /home/user/tspice/packages/tspice
@rybosome/tspice:test:
@rybosome/tspice-backend-wasm:test: ✓ test/errors.test.ts (5 tests) 993ms
@rybosome/tspice-backend-verify:test: ↓ test/cspiceRunner.escapes.test.ts (3 tests | 3 skipped)
@rybosome/tspice-backend-verify:test: stderr | test/cspiceRunner.escapes.test.ts
@rybosome/tspice-backend-verify:test: [backend-verify] skipping cspice escape test: Automatic CSPICE fetch is not supported on linux-arm64 (set TSPICE_CSPICE_DIR to a prebuilt CSPICE install)
@rybosome/tspice-backend-verify:test:
@rybosome/orrery:test: ✓ src/smoke.test.ts (1 test) 20ms
@rybosome/tspice-backend-verify:test: stderr | test/parity.e2e.test.ts > backend-verify (tspice vs raw CSPICE parity) > cspice-runner unavailable (skipping parity scenarios)
@rybosome/tspice-backend-verify:test: [backend-verify] cspice-runner unavailable; skipping parity scenarios (TSPICE_BACKEND_VERIFY_REQUIRED=false): Automatic CSPICE fetch is not supported on linux-arm64 (set TSPICE_CSPICE_DIR to a prebuilt CSPICE install)
@rybosome/tspice-backend-verify:test:
@rybosome/tspice-backend-verify:test: ✓ test/parity.e2e.test.ts (1 test) 3ms
@rybosome/tspice-web-components:test: ✓ test/createSpiceWorkerClient.test.ts (1 test) 197ms
@rybosome/tspice-backend-verify:test: ✓ test/normalize.test.ts (3 tests) 23ms
@rybosome/orrery:test:
@rybosome/orrery:test: Test Files 9 passed (9)
@rybosome/orrery:test: Tests 31 passed (31)
@rybosome/orrery:test: Start at 22:33:32
@rybosome/orrery:test: Duration 5.35s (transform 870ms, setup 0ms, collect 2.02s, tests 148ms, environment 2ms, prepare 4.42s)
@rybosome/orrery:test:
@rybosome/tspice-web-components:test:
@rybosome/tspice-web-components:test: Test Files 7 passed (7)
@rybosome/tspice-web-components:test: Tests 73 passed (73)
@rybosome/tspice-web-components:test: Start at 22:33:30
@rybosome/tspice-web-components:test: Duration 6.68s (transform 2.94s, setup 0ms, collect 3.38s, tests 5.13s, environment 18ms, prepare 3.14s)
@rybosome/tspice-web-components:test:
@rybosome/tspice-backend-wasm:test: ✓ test/wasm-url-parsing.test.ts (6 tests) 530ms
@rybosome/tspice-backend-wasm:test: ✓ wasmUrl parsing (web runtime) > accepts blob: URLs 428ms
@rybosome/tspice-backend-verify:test: ✓ test/compare.angleWrapPi.test.ts (7 tests) 16ms
@rybosome/tspice-backend-verify:test: ✓ test/parse.test.ts (4 tests) 12ms
@rybosome/tspice-backend-verify:test: ✓ test/invokeRunner.bounded.test.ts (3 tests) 260ms
@rybosome/tspice-backend-wasm:test: ✓ test/file-io.test.ts (9 tests) 2329ms
@rybosome/tspice-backend-wasm:test: ✓ @rybosome/tspice-backend-wasm file-io > can traverse DLA segments in a DSK via dlafns 1323ms
@rybosome/tspice-backend-fake:test: ✓ test/ids-names-normalization.test.ts (1 test) 11ms
@rybosome/tspice-backend-wasm:test: ✓ test/tpictr.test.ts (3 tests) 369ms
@rybosome/tspice-backend-fake:test: ✓ test/index.test.ts (16 tests) 99ms
@rybosome/tspice-backend-fake:test:
@rybosome/tspice-backend-fake:test: Test Files 2 passed (2)
@rybosome/tspice-backend-fake:test: Tests 17 passed (17)
@rybosome/tspice-backend-fake:test: Start at 22:33:36
@rybosome/tspice-backend-fake:test: Duration 2.18s (transform 890ms, setup 0ms, collect 1.67s, tests 110ms, environment 0ms, prepare 686ms)
@rybosome/tspice-backend-fake:test:
@rybosome/tspice-backend-verify:test: ✓ test/compare.determinism.test.ts (2 tests) 12ms
@rybosome/tspice-backend-wasm:test: ✓ test/kernels.test.ts (3 tests) 414ms
@rybosome/tspice-backend-verify:test: ✓ test/cspiceRunner.test.ts (1 test) 84ms
@rybosome/tspice-backend-verify:test: ✓ test/spiceShortSymbol.test.ts (3 tests) 6ms
@rybosome/tspice-backend-wasm:test: ✓ test/kernel-pool.test.ts (2 tests) 204ms
@rybosome/tspice-backend-wasm:test: ✓ test/cells-windows.test.ts (3 tests) 291ms
@rybosome/tspice:test: ✓ test/kernel-pool.test.ts (2 tests | 1 skipped) 951ms
@rybosome/tspice:test: ✓ Kernel pool > wasm backend: read + write + watch 949ms
@rybosome/tspice:test: ✓ test/sclk-ck.test.ts (12 tests | 6 skipped) 1314ms
@rybosome/tspice:test: ✓ SCLK conversions + CK attitude > wasm backend: scs2e/sce2s 887ms
@rybosome/tspice-backend-wasm:test: ✓ test/assert-emscripten-module.test.ts (2 tests) 6ms
@rybosome/tspice:test: ✓ test/id-name.test.ts (2 tests | 1 skipped) 1616ms
@rybosome/tspice:test: ✓ IDs / names > wasm backend: bodn2c/bodc2n/bodc2s/bods2c/boddef/bodfnd/bodvar + frame utils 1614ms
@rybosome/tspice-backend-verify:test: ✓ test/tspice.e2e.test.ts (1 test) 1460ms
@rybosome/tspice-backend-verify:test: ✓ backend-verify (tspice runner) > runs time.str2et basic scenario 1458ms
@rybosome/tspice-backend-wasm:test: ✓ test/wasm-binary.test.ts (2 tests) 71ms
@rybosome/tspice-backend-verify:test:
@rybosome/tspice-backend-verify:test: Test Files 11 passed | 1 skipped (12)
@rybosome/tspice-backend-verify:test: Tests 34 passed | 3 skipped (37)
@rybosome/tspice-backend-verify:test: Start at 22:33:34
@rybosome/tspice-backend-verify:test: Duration 6.64s (transform 2.50s, setup 0ms, collect 3.89s, tests 1.93s, environment 19ms, prepare 4.45s)
@rybosome/tspice-backend-verify:test:
@rybosome/tspice-backend-wasm:test: ✓ test/index.test.ts (2 tests) 203ms
@rybosome/tspice-backend-wasm:test:
@rybosome/tspice-backend-wasm:test: Test Files 12 passed (12)
@rybosome/tspice-backend-wasm:test: Tests 54 passed (54)
@rybosome/tspice-backend-wasm:test: Start at 22:33:32
@rybosome/tspice-backend-wasm:test: Duration 8.24s (transform 3.03s, setup 0ms, collect 7.68s, tests 5.48s, environment 3ms, prepare 3.65s)
@rybosome/tspice-backend-wasm:test:
@rybosome/tspice:test: ✓ test/types.test.ts (1 test) 3ms
@rybosome/tspice:test: ✓ test/kernels.test.ts (4 tests | 2 skipped) 373ms
@rybosome/tspice:test: ✓ kernel management > wasm backend: furnsh({ path, bytes }) + kernel APIs 319ms
@rybosome/tspice:test: ✓ test/coords-vectors.test.ts (2 tests | 1 skipped) 76ms
@rybosome/tspice:test: ✓ test/api.test.ts (2 tests) 136ms
@rybosome/tspice:test: ↓ test/auto-native.test.ts (1 test | 1 skipped)
@rybosome/tspice:test: ✓ test/spice-async.test.ts (1 test) 119ms
@rybosome/tspice:test: ✓ test/spice.namespaced.test.ts (2 tests) 133ms
@rybosome/tspice:test: ✓ test/backend-kind.test.ts (2 tests) 5ms
@rybosome/tspice:test: ✓ test/index.test.ts (2 tests) 73ms
@rybosome/tspice:test: ✓ test/frames-spk.test.ts (2 tests | 1 skipped) 2226ms
@rybosome/tspice:test: ✓ frames + SPK ephemerides > wasm backend: pxform/sxform/spkezr/spkpos 2224ms
@rybosome/tspice:test:
@rybosome/tspice:test: Test Files 12 passed | 1 skipped (13)
@rybosome/tspice:test: Tests 22 passed | 13 skipped (35)
@rybosome/tspice:test: Start at 22:33:37
@rybosome/tspice:test: Duration 6.40s (transform 1.54s, setup 0ms, collect 3.40s, tests 7.02s, environment 3ms, prepare 2.28s)
@rybosome/tspice:test:

Tasks: 20 successful, 20 total
Cached: 11 cached, 20 total
Time: 14.86s and

tspice@ build /home/user/tspice
turbo run build && pnpm -C packages/tspice run build:dist-publish

• Packages in scope: @rybosome/orrery, @rybosome/tspice, @rybosome/tspice-backend-contract, @rybosome/tspice-backend-fake, @rybosome/tspice-backend-node, @rybosome/tspice-backend-shim-c, @rybosome/tspice-backend-verify, @rybosome/tspice-backend-wasm, @rybosome/tspice-bench-contract, @rybosome/tspice-core, @rybosome/tspice-native-darwin-arm64, @rybosome/tspice-native-darwin-x64, @rybosome/tspice-native-linux-x64-gnu, @rybosome/tspice-perf-analysis, @rybosome/tspice-web-components
• Running build in 15 packages
• Remote caching disabled
@rybosome/tspice-bench-contract:build: cache hit, replaying logs d3d37539415de389
@rybosome/tspice-bench-contract:build:
@rybosome/tspice-bench-contract:build: > @rybosome/tspice-bench-contract@0.0.7 build /home/user/tspice/packages/bench-contract
@rybosome/tspice-bench-contract:build: > tsc -p tsconfig.json
@rybosome/tspice-bench-contract:build:
@rybosome/tspice-perf-analysis:build: cache hit, replaying logs 3c778aa9ff3eb981
@rybosome/tspice-perf-analysis:build:
@rybosome/tspice-perf-analysis:build: > @rybosome/tspice-perf-analysis@0.0.7 build /home/user/tspice/packages/perf-analysis
@rybosome/tspice-perf-analysis:build: > tsc -p tsconfig.json
@rybosome/tspice-perf-analysis:build:
@rybosome/tspice-core:build: cache hit, replaying logs 650b8227a4a8ab1f
@rybosome/tspice-core:build:
@rybosome/tspice-core:build: > @rybosome/tspice-core@0.0.7 build /home/user/tspice/packages/core
@rybosome/tspice-core:build: > tsc -p tsconfig.json
@rybosome/tspice-core:build:
@rybosome/tspice-backend-contract:build: cache hit, replaying logs f43d01e3844c3b0a
@rybosome/tspice-backend-contract:build:
@rybosome/tspice-backend-contract:build: > @rybosome/tspice-backend-contract@0.0.7 build /home/user/tspice/packages/backend-contract
@rybosome/tspice-backend-contract:build: > tsc -p tsconfig.json
@rybosome/tspice-backend-contract:build:
@rybosome/tspice-backend-fake:build: cache hit, replaying logs 45702897f543ea24
@rybosome/tspice-backend-fake:build:
@rybosome/tspice-backend-fake:build: > @rybosome/tspice-backend-fake@0.0.7 build /home/user/tspice/packages/backend-fake
@rybosome/tspice-backend-fake:build: > tsc -p tsconfig.json
@rybosome/tspice-backend-fake:build:
@rybosome/tspice-backend-wasm:build: cache hit, replaying logs fa5c68d84b0b759f
@rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-wasm:build: > @rybosome/tspice-backend-wasm@0.0.7 build /home/user/tspice/packages/backend-wasm
@rybosome/tspice-backend-wasm:build: > tsc -b tsconfig.json && pnpm run stage:assets
@rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-wasm:build: > @rybosome/tspice-backend-wasm@0.0.7 stage:assets /home/user/tspice/packages/backend-wasm
@rybosome/tspice-backend-wasm:build: > node ../../scripts/copy-backend-wasm-assets.mjs
@rybosome/tspice-backend-wasm:build:
@rybosome/tspice-backend-node:build: cache hit, replaying logs 1ef5b7f184361475
@rybosome/tspice-backend-node:build:
@rybosome/tspice-backend-node:build: > @rybosome/tspice-backend-node@0.0.7 build /home/user/tspice/packages/backend-node
@rybosome/tspice-backend-node:build: > tsc -b tsconfig.json
@rybosome/tspice-backend-node:build:
@rybosome/tspice:build: cache hit, replaying logs 15fc8849f7bee3be
@rybosome/tspice:build:
@rybosome/tspice:build: > @rybosome/tspice@0.0.7 build /home/user/tspice/packages/tspice
@rybosome/tspice:build: > tsc -p tsconfig.json
@rybosome/tspice:build:
@rybosome/tspice-backend-verify:build: cache hit, replaying logs 4fd63a13a9bf191e
@rybosome/tspice-backend-verify:build:
@rybosome/tspice-backend-verify:build: > @rybosome/tspice-backend-verify@0.0.0 build /home/user/tspice/packages/backend-verify
@rybosome/tspice-backend-verify:build: > tsc -b tsconfig.json
@rybosome/tspice-backend-verify:build:
@rybosome/tspice-web-components:build: cache hit, replaying logs c279bc83c6923967
@rybosome/tspice-web-components:build:
@rybosome/tspice-web-components:build: > @rybosome/tspice-web-components@0.0.7 build /home/user/tspice/packages/tspice-web-components
@rybosome/tspice-web-components:build: > tsc -p tsconfig.json
@rybosome/tspice-web-components:build:
@rybosome/orrery:build: cache hit, replaying logs 5e47a9f7c9e62e6b
@rybosome/orrery:build:
@rybosome/orrery:build: > @rybosome/orrery@0.0.7 build /home/user/tspice/apps/orrery
@rybosome/orrery:build: > vite build
@rybosome/orrery:build:
@rybosome/orrery:build: vite v7.3.1 building client environment for production...
@rybosome/orrery:build: transforming...
@rybosome/orrery:build: ✓ 150 modules transformed.
@rybosome/orrery:build: rendering chunks...
@rybosome/orrery:build: computing gzip size...
@rybosome/orrery:build: dist/index.html 1.49 kB │ gzip: 0.54 kB
@rybosome/orrery:build: dist/assets/tspice_backend_wasm-NTTg95KN.wasm 1,286.92 kB │ gzip: 410.28 kB
@rybosome/orrery:build: dist/assets/index-5MPhzSw2.css 25.49 kB │ gzip: 4.32 kB
@rybosome/orrery:build: dist/assets/index.web-B-QCxftA.js 49.29 kB │ gzip: 12.34 kB
@rybosome/orrery:build: dist/assets/tspice_backend_wasm.web-CmbIi1Jm.js 51.98 kB │ gzip: 15.86 kB
@rybosome/orrery:build: dist/assets/index-ULgzYLDm.js 870.23 kB │ gzip: 239.82 kB
@rybosome/orrery:build:
@rybosome/orrery:build: (!) Some chunks are larger than 500 kB after minification. Consider:
@rybosome/orrery:build: - Using dynamic import() to code-split the application
@rybosome/orrery:build: - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
@rybosome/orrery:build: - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
@rybosome/orrery:build: ✓ built in 4.36s

Tasks: 11 successful, 11 total
Cached: 11 cached, 11 total
Time: 145ms >>> FULL TURBO

@rybosome/tspice@0.0.7 build:dist-publish /home/user/tspice/packages/tspice
node ./scripts/build-dist-publish.mjs pass.

@charliecreates
Copy link
Contributor Author

✅ Added the requested updates in commit:
cef0db6

  • Hardened ensureWithinDirOrThrow() (packages/perf-analysis/src/runners/node-native/metaKernel.ts) to also reject cross-drive Windows path.relative() returning absolute paths (path.isAbsolute(rel)), matching backend-verify.
  • Documented metric units: latency_p50/p95 are ns/op, throughput is ops/sec (BMF has no units field). Updated packages/perf-analysis/README.md and bench CLI help.
  • Default output dir now uses a timestamped subdir ./benchmarks/results/<YYYYMMDD-HHmmss>/ to avoid clobbering; --outDir still uses the exact provided directory.
  • Confirmed pnpm run check and pnpm run build pass.

@rybosome
Copy link
Owner

@CharlieHelps please conduct a thorough review of this PR

Copy link
Contributor Author

@charliecreates charliecreates bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — this is a big step toward reproducible perf runs and the contract-v1 pipeline reads nicely.

What looks solid

  • parse → validate → normalize separation under packages/perf-analysis/src/contracts/benchmark-contract/v1/ is clean and makes runner logic much simpler.
  • Fixture resolution ($FIXTURES + escape protection + the “fixture-pack dir alias” meta-kernel restriction) feels thoughtfully designed (packages/perf-analysis/src/shared/fixtures/resolveFixtureRef.ts).
  • Runner structure (warmup vs measured, isolate between iterations) is clear, and the missing-native-addon remediation message is excellent (.../runners/node-native/runNodeNativeBench.ts).
  • Emitting both raw.json and bmf.json is a great debugging + pipeline combo.

Things to double-check / consider tightening

  1. Docs/description vs behavior on output dir + overwrite

    • PR text mentions default ./benchmarks/results + overwrite, but bench.ts appears to default to a timestamped subdir (benchmarks/results/<timestamp>).
    • Either way, writeFile() will silently clobber existing files in a chosen --outDir.
    • Suggestion: align README/PR text with actual default, and consider an explicit --overwrite/--no-clobber choice (or at least warn when outputs already exist).
  2. Atomic writes

    • Current writeFile(raw.json) / writeFile(bmf.json) isn’t atomic. A crash mid-write can leave truncated JSON.
    • Consider write tmp → rename for each output.
  3. BMF semantics / units

    • Metrics are implicitly ns/op for latency and ops/sec for throughput. That’s fine, but worth making very explicit since BMF has no unit field.
    • Throughput uses mean while latency uses quantiles — also fine, but I’d document that as a deliberate choice.
  4. Suite YAML extensibility

    • validate() rejecting unknown top-level keys is great for catching typos, but may make forward-compat painful. If you expect extension, maybe allow x-... keys (or similar) rather than hard erroring.
  5. Timing + warmup semantics

    • Timer excludes kernel loading (furnshAll() happens before hrtime), which seems intentional — but I’d call it out in docs so consumers know what’s being measured.
    • Warmup isolates per warmup-iteration (not per op). Probably fine; just confirming intent.
  6. Native addon detection brittleness

    • If any logic relies on regex-ing error messages for “addon missing”, that can be brittle across Node/platforms. If you see flakes, a more structured detection (expected path checks / typed error) might be worth it.

Tests / hardening follow-ups

I didn’t see new unit coverage for the highest-risk bits:

  • contract v1 validate/normalize (unknown keys, fixture ref forms, null handling)
  • $FIXTURES resolution (multi-root selection, escape attempts, Windows drive-letter behavior)
  • fixture-pack dir alias + meta-kernel restriction behavior
  • stats.ts quantiles + BMF mapping shape

Local verification

  • pnpm check passed for me.
  • pnpm bench --backend node-native ... fails on linux-arm64 due to missing native addon (expected), and the error message is clear + actionable.

@charliecreates
Copy link
Contributor Author

Done — I left a thorough PR review here: #388 (review)

@rybosome
Copy link
Owner

@CharlieHelps thank you for the review, replies inline

Thanks — this is a big step toward reproducible perf runs and the contract-v1 pipeline reads nicely.

What looks solid

  • parse → validate → normalize separation under packages/perf-analysis/src/contracts/benchmark-contract/v1/ is clean and makes runner logic much simpler.
  • Fixture resolution ($FIXTURES + escape protection + the “fixture-pack dir alias” meta-kernel restriction) feels thoughtfully designed (packages/perf-analysis/src/shared/fixtures/resolveFixtureRef.ts).
  • Runner structure (warmup vs measured, isolate between iterations) is clear, and the missing-native-addon remediation message is excellent (.../runners/node-native/runNodeNativeBench.ts).
  • Emitting both raw.json and bmf.json is a great debugging + pipeline combo.

Things to double-check / consider tightening

  1. Docs/description vs behavior on output dir + overwrite

    • PR text mentions default ./benchmarks/results + overwrite, but bench.ts appears to default to a timestamped subdir (benchmarks/results/<timestamp>).
    • Either way, writeFile() will silently clobber existing files in a chosen --outDir.
    • Suggestion: align README/PR text with actual default, and consider an explicit --overwrite/--no-clobber choice (or at least warn when outputs already exist).

Please update the README/PR text with reality (the code behavior)

  1. Atomic writes

    • Current writeFile(raw.json) / writeFile(bmf.json) isn’t atomic. A crash mid-write can leave truncated JSON.
    • Consider write tmp → rename for each output.

Sounds good, please do this

  1. BMF semantics / units

    • Metrics are implicitly ns/op for latency and ops/sec for throughput. That’s fine, but worth making very explicit since BMF has no unit field.
    • Throughput uses mean while latency uses quantiles — also fine, but I’d document that as a deliberate choice.

Ok, please document this thoroughly.

  1. Suite YAML extensibility

    • validate() rejecting unknown top-level keys is great for catching typos, but may make forward-compat painful. If you expect extension, maybe allow x-... keys (or similar) rather than hard erroring.

No extension expected.

  1. Timing + warmup semantics

    • Timer excludes kernel loading (furnshAll() happens before hrtime), which seems intentional — but I’d call it out in docs so consumers know what’s being measured.
    • Warmup isolates per warmup-iteration (not per op). Probably fine; just confirming intent.

Can you explain this one more clearly? Not sure this is fine.

  1. Native addon detection brittleness

    • If any logic relies on regex-ing error messages for “addon missing”, that can be brittle across Node/platforms. If you see flakes, a more structured detection (expected path checks / typed error) might be worth it.

Tests / hardening follow-ups

I didn’t see new unit coverage for the highest-risk bits:

  • contract v1 validate/normalize (unknown keys, fixture ref forms, null handling)
  • $FIXTURES resolution (multi-root selection, escape attempts, Windows drive-letter behavior)
  • fixture-pack dir alias + meta-kernel restriction behavior
  • stats.ts quantiles + BMF mapping shape

ok, please add unit test coverage for these highest-risk bits.

Local verification

  • pnpm check passed for me.
  • pnpm bench --backend node-native ... fails on linux-arm64 due to missing native addon (expected), and the error message is clear + actionable.

@charliecreates
Copy link
Contributor Author

Re: #388 (comment)

Updates in the latest push:

  • Docs updated to match output behavior
    • packages/perf-analysis/README.md documents the timestamped default output dir + overwrite semantics.
    • CLI help (packages/perf-analysis/src/cli/bench.ts) now matches the same behavior.
  • Atomic writes implemented for raw.json + bmf.json (tmp file → rename), so a partially-written file shouldn’t be observed.

BMF units / semantics

BMF doesn’t have a unit field, so the docs are explicit about implied units:

  • latency_p50 / latency_p95: ns/op (quantiles of per-iteration durations)
  • throughput: ops/sec, derived from mean latency (i.e. 1e9 / mean_ns_per_op)

(See the “BMF semantics + units” section in packages/perf-analysis/README.md.)

Timing + warmup semantics

  • What’s timed: measurement excludes isolate setup + kernel loading. The timer covers only the benchmarked call loop with kernels already furnished.
  • Warmup granularity: warmup is isolated per warmup-iteration (same granularity as measured iterations) to warm JIT/caches without letting isolation overhead dominate. If we isolated per op, we’d mostly be benchmarking isolation overhead rather than the kernel calls.

Tests / verification

Added unit tests covering:

  • contract v1 validate/normalize
  • $FIXTURES resolution
  • fixture-pack/meta-kernel restriction
  • stats quantiles + BMF mapping

And pnpm check passes on the branch.

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.

perf: node-native benchmark runner (+ BMF output)

2 participants