Skip to content

ci: guard against split effect version in lockfile - #360

Closed
jack-champagne wants to merge 1 commit into
local/amicodefrom
chore/ci-guard-effect-single-version
Closed

jack-champagne wants to merge 1 commit into
local/amicodefrom
chore/ci-guard-effect-single-version

Conversation

@jack-champagne

Copy link
Copy Markdown
Member

What

Adds a fast lockfile assertion to the unit job in test.yml: fail CI if bun.lock resolves more than one effect@ version.

Why

effect and @effect/* are lockstep-versioned. A second, unpinned effect pulled transitively (e.g. hono-openapi@standard-community/standard-json/standard-openapi, whose effect: ^3.x peer floats to a different beta) silently coexists in bun.lock. Whichever copy the bundler wires into Schema.toJsonSchemaDocument (tool params → JSON schema) then decides whether a given build crashes on every prompt with:

TypeError: undefined is not an object (evaluating 'a.name')

This is invisible to install/typecheck and nondeterministic by build — exactly what shipped broken in a recent dev binary. This guard makes the split fail loudly in CI.

Dependency / ordering

⚠️ Depends on the effect-dedupe fix (#359) landing first. This guard fails on the current split lock by design — that's the point. Merge #359 (which forces a single effect@4.0.0-beta.83 via overrides) before/with this, or CI here will be red until the lock is deduped.

Follow-up considered, not included

  • Could extend to assert all @effect/* match effect exactly (stronger, more code) — deferred.
  • upstream-sync.yml auto-merges 'bun.lock theirs + bun install' weekly, which is the real recurrence vector; the overrides pin survives that (it's in package.json), and this guard will catch any regression it introduces.

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.
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1a00d3a4-4d78-4ea7-be35-a44c882f83a7

📥 Commits

Reviewing files that changed from the base of the PR and between 4e72a5f and 2b3f8d1.

📒 Files selected for processing (1)
  • .github/workflows/test.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jack-champagne

Copy link
Copy Markdown
Member Author

Closing alongside #359 — targets the deprecated harmoniqs/opencode. The single-effect-version CI guard will be re-proposed in harmoniqs/amicode if wanted.

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