diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..3f3dd7a --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,6 @@ +# Agent notes + +- The pinned vitest (4.1.10) is the baseline of the 4.1 vs 5.0 comparison in the README. It is not a reference for current work. Don't measure against it or treat a run on it as validation. +- To measure a change, compare two local builds: vitest `main` and your branch, both linked as in "Benchmarking a local vitest build" in the README. A run that passes on those builds is the check that matters. +- New apps keep the repo-wide pin, only so that they match the other apps. CI's smoke job only checks that every app generates and passes on it. +- The overrides and the `node_modules/vitest` link from that section are local only. Remove them and reinstall when you're done, so the checkout is left on the pinned release. diff --git a/README.md b/README.md index 8599480..850cf11 100644 --- a/README.md +++ b/README.md @@ -15,15 +15,16 @@ pnpm bench # default matrix, every app, 3 reps pnpm bench --apps react-spa,barrel-hell --runs 5 pnpm bench --matrix quick --runs 1 # one representative cell per app -# A/B a local vitest build against the pinned release -pnpm bench --label main # 1. measure the pinned release first -# 2. link the local build (see below), then -pnpm bench --label branch +# A/B a vitest branch against vitest main, both as local builds (see below) +pnpm bench --label main # 1. with the main build linked +pnpm bench --label branch # 2. with the branch build linked pnpm compare results/main.json results/branch.json ``` ### Benchmarking a local vitest build +The pinned release is the baseline of the 4.1 vs 5.0 tables below, not a reference for new changes. To measure a change, compare a build of vitest `main` with a build of your branch. + Link the local build into the workspace instead of pointing `--vitest` at its binary. Dependencies such as `@testing-library/jest-dom/vitest` import `vitest` themselves, and Node resolves that import to the pinned install. With `--vitest` alone the tests use one `expect` and the matchers register on another, so every jsdom cell fails with `Invalid Chai property`. The browser cells also need the matching `@vitest/browser-playwright`. Add overrides to `pnpm-workspace.yaml` (do not commit them):