Skip to content

Smoke v2 - #1283

Merged
Olmo Maldonado (ibolmo) merged 35 commits into
caitlin/externalizefrom
smoke-v2
Jan 20, 2026
Merged

Smoke v2#1283
Olmo Maldonado (ibolmo) merged 35 commits into
caitlin/externalizefrom
smoke-v2

Conversation

@ibolmo

@ibolmo Olmo Maldonado (ibolmo) commented Jan 18, 2026

Copy link
Copy Markdown
Contributor

Braintrust JS SDK Smoke Tests v2

Design Principles

  1. Well-Known Tarball Paths: Uses version-agnostic paths like braintrust-latest.tgz so package.json never changes
  2. Build Before Install: Ensures artifacts exist before npm tries to install them
  3. Track Lock Files: Commits lock files to catch transitive dependency issues
  4. Makefile as Source of Truth: Single clear interface (make test) for every scenario
  5. Expected Failures Support: Uses xfail status to document known platform limitations without failing tests

Quick Start

# Run all scenarios
make test

# Run specific scenario
make test otel-v1

# List available scenarios
make list

What's Improved from v1

  • ✅ No version-specific tarballs (eliminates package.json churn)
  • ✅ Peer dependencies fully specified (no --legacy-peer-deps workaround)
  • ✅ Auto-discovery (no manual registration)
  • ✅ Shared test package for DRY test logic
  • ✅ Lock files tracked (surfaces packaging issues early)

This infrastructure ensures the Braintrust SDK "just works" across the JavaScript ecosystem's diverse runtime landscape.

the previous generation had a lot of good things going for it. the shared tests and having each scenario/test to adapt/replace implementation was solid.

i'm trying in v2 to make each scenario/test completely reproducible and with minmimal use of abstractions. the idea is that code is cheap but getting the scenario wrong is not (false positives). i also want each scenario to determine what is passing and/or known limitation and that should be codified in each scenario.

finally, each scenario should be literally what the user would do. this way we avoid any runtime flags, etc., to force the same code behave differently. at rest, the scenario should already behave differently.
i'm attempting avoiding using the build and copy over the dist etc.

we should be using deno add ../../.. (etc.) because deno needs to analyze the package.json and automatically update its deno.lock.

in my experience the ai seems to manually edit the deno.json and that is not how the user would use deno with braintrust
looks like most deno users are always on the latest version 🤷

not too happy i had to ndoeModulesDir + links, but well known problem getting deno to point to a local directory

https://im.salty.fish/index.php/archives/deno-links.html
https://stackoverflow.com/questions/79110738/deno-2-0-install-local-npm-package-from-folder
unexpectedly i'm seeing that browser no-compat all passed but browser compat did not all pass. with the typical nunjucks error
probably ai decided to revert back to previous state grr
not sure how it was missed 🤷
Comment thread .github/workflows/js.yaml
Comment thread js/smoke-v2/README.md Outdated

```toml
[tools]
node = "22"

@cpinn Caitlin Pinn (cpinn) Jan 19, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe we run with the node 22 build instead of 20? if we only want one node version

@ibolmo Olmo Maldonado (ibolmo) Jan 20, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah i think that should depend on each scenario/example. we might try node 20 and then node 22 explicitly. deno, for example, seems peculiar depending on the compat date and/or the version installed

@cpinn Caitlin Pinn (cpinn) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

adding my approval here for when the time comes.

I think once the smoke-v2 tests pass we can just remove the older smoke tests and call this just smoke-test

@ibolmo
Olmo Maldonado (ibolmo) merged commit 9ec8e9d into caitlin/externalize Jan 20, 2026
57 checks passed
@ibolmo
Olmo Maldonado (ibolmo) deleted the smoke-v2 branch January 20, 2026 23:43
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.

2 participants