Skip to content

Fix benchmark environment lookup in ESM#1337

Open
Gujiassh wants to merge 1 commit intoruvnet:mainfrom
Gujiassh:fix/benchmark-esm-os-import
Open

Fix benchmark environment lookup in ESM#1337
Gujiassh wants to merge 1 commit intoruvnet:mainfrom
Gujiassh:fix/benchmark-esm-os-import

Conversation

@Gujiassh
Copy link

Summary

  • replace the CommonJS-only require('os') call in the benchmark framework with an ESM-safe node:os import
  • add a focused benchmark runner test that proves runAll() can collect environment info under the package's ESM test runtime
  • keep the patch scoped to the performance benchmark framework, independent from the already-open PluginManager PR line

Validation

  • cd v3 && npx vitest run @claude-flow/performance/__tests__/benchmark.test.ts
  • lsp_diagnostics clean on v3/@claude-flow/performance/src/framework/benchmark.ts
  • lsp_diagnostics clean on v3/@claude-flow/performance/__tests__/benchmark.test.ts

Notes

  • cd v3/@claude-flow/performance && npm run build still fails because of pre-existing @ruvector/attention export mismatches in src/attention-benchmarks.ts / src/attention-integration.ts; this PR does not touch that existing build breakage

Use a real ESM-safe os import so benchmark suites can report environment metadata without crashing in pure module runtimes.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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.

1 participant