Skip to content

MEC-82: Restore the deterministic non-browser test gate - #373

Open
mdgriffith wants to merge 2 commits into
2.0from
mec-82-deterministic-test-gate
Open

mdgriffith wants to merge 2 commits into
2.0from
mec-82-deterministic-test-gate

Conversation

@mdgriffith

@mdgriffith mdgriffith commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Restore the non-browser test gate for 2.0, replacing the obsolete Node 10/Sauce workflow with Node 22, Bun 1.4.2, a root Bun lockfile, and secret-free CI running artifact checks and tests. Existing browser and benchmark infrastructure is preserved.

Replace test-local bitfield encoders with production Internal.BitField tests. Class and flag tests consume generated references to all production definitions rather than handwritten inventories. Generation rejects class collisions, unsupported class definitions, invalid COPY markers, and flag overflow; stylesheet:check detects stale tracked artifacts, including the test inventories. bun run stylesheet remains the explicit artifact writer. README is unchanged as requested.

Testing

  • bun install --frozen-lockfile passed in the existing checkout.
  • bun run stylesheet and bun run stylesheet:check passed.
  • bun run test: 6 Node generator tests and 48 Elm tests passed.
  • Deliberate generated-inventory drift caused stylesheet:check to exit 1 and name the stale artifact; restored metadata passes.
  • git diff --check passed.

Fresh-checkout installation and absence of ignored-workspace writes have not been established by these checks. The earlier unchanged git diff comparison covered tracked changes only.

exe.dev user added 2 commits September 7, 2026 11:23
- Toolchain: standardize on Node 22 + Bun 1.4.2; add engines/packageManager to
  package.json; remove stale yarn.lock and pnpm-lock.yaml; add bun.lock; pin
  elm-review and puppeteer to exact resolved versions.

- Stylesheet generation: refactor stylesheets/build.js around a single
  deterministic generate() function; add bun run stylesheet:check (non-mutating,
  validates tracked artifacts only, hard-fails on stale or missing files, flag
  overflow, and class-value collisions); keep bun run stylesheet as the explicit
  writer; update generated comments to reference bun.

- Tests: replace Tests.elm test-local encoder replicas with direct tests of
  production Internal.BitField (known-value, isolation, clamping, clear, copy,
  boolean/flag, boundary, and percentage round-trip - 48 tests total); drop
  ClassNames.elm reference to textUnitalicized which is absent from Generated.elm.

- CI: replace obsolete master/Node10/Sauce workflow with a secret-free
  deterministic gate on 2.0 using actions/checkout@v4, actions/setup-node@v4
  (Node 22), oven-sh/setup-bun@v2 (Bun 1.4.2), frozen-lockfile install,
  bun run stylesheet:check, and bun run test. Browser infrastructure preserved.
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