From 2b3f8d1d726ea417f960d49615b654e1935a4dc6 Mon Sep 17 00:00:00 2001 From: Jack Champagne Date: Wed, 16 Sep 2026 17:49:20 -0400 Subject: [PATCH] ci: guard against split effect version in lockfile effect + @effect/* are lockstep-versioned; a second, unpinned effect pulled transitively (hono-openapi -> @standard-community/*) can silently coexist in bun.lock and crash at runtime in Schema.toJsonSchemaDocument with 'undefined is not an object (evaluating a.name)', nondeterministically by build. Add a fast lockfile assertion in the unit job that fails when bun.lock resolves more than one effect version. Depends on the effect-dedupe fix (single effect@4.0.0-beta.83) landing first; this guard fails on the current split lock by design. --- .github/workflows/test.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dfef0703f..1b629645f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,6 +63,26 @@ jobs: - name: Setup Bun uses: ./.github/actions/setup-bun + # Guard against a split effect install. effect + @effect/* are lockstep + # versioned; a second, unpinned effect (e.g. pulled transitively via + # hono-openapi -> @standard-community/*) silently coexists in bun.lock and + # crashes at runtime in Schema.toJsonSchemaDocument with + # "undefined is not an object (evaluating 'a.name')" — nondeterministically + # by build. See the effect override in package.json. This asserts the lock + # resolves exactly one effect version. + - name: Guard single effect version in lockfile + if: runner.os == 'Linux' + run: | + versions=$(grep -oE '"effect@[^"]+"' bun.lock | sort -u) + count=$(printf '%s\n' "$versions" | grep -c . || true) + if [ "$count" -ne 1 ]; then + echo "::error::bun.lock resolves $count effect versions; expected exactly 1. A split effect install causes runtime tool-schema crashes." + printf '%s\n' "$versions" + echo "Fix: ensure the \"effect\" override in package.json pins the single supported version, then re-run bun install." + exit 1 + fi + echo "OK: single effect version -> $versions" + - name: Configure git identity run: | git config --global user.email "bot@opencode.ai"