Skip to content

fix: declare base64 and logger as gem dependencies#82

Merged
zhukaihan merged 2 commits intocodex/release-lockfilesfrom
cursor/base64-dependency-issue-f1ca
Mar 24, 2026
Merged

fix: declare base64 and logger as gem dependencies#82
zhukaihan merged 2 commits intocodex/release-lockfilesfrom
cursor/base64-dependency-issue-f1ca

Conversation

@zhukaihan
Copy link
Collaborator

@zhukaihan zhukaihan commented Mar 23, 2026

Summary

Ruby 3.4+ no longer includes base64 and logger in the default gem set. CI on JRuby failed with LoadError: cannot load such file -- base64 when loading lib/experiment/cookie.rb. This change adds both libraries as runtime dependencies in the gemspec.

The multithreaded storage spec compared two Set instances built from pushed vs pulled events. Set#add is not thread-safe; ten threads updating the expected set concurrently could corrupt it or drop entries, so the sets no longer matched even when storage was correct. The spec now uses a mutex when recording expected events in the threaded example.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: No
Open in Web Open in Cursor 

Ruby 3.4+ no longer bundles these in default gems; JRuby fails with
LoadError when requiring them without a declared dependency.

Co-authored-by: Peter Zhu <zhukaihan@users.noreply.github.com>
Ruby Set is not thread-safe; concurrent add from worker threads could
corrupt the expected set and fail equality with pull_all results.

Co-authored-by: Peter Zhu <zhukaihan@users.noreply.github.com>
@zhukaihan zhukaihan merged commit 5abb468 into codex/release-lockfiles Mar 24, 2026
7 checks passed
@zhukaihan zhukaihan deleted the cursor/base64-dependency-issue-f1ca branch March 24, 2026 22:33
zhukaihan added a commit that referenced this pull request Mar 24, 2026
* chore: use lockfiles for NPM dependencies

* ci: add setup-node@v4 with Node 22 before npm ci in release workflow (#81)

* Initial plan

* ci: add setup-node step with Node 22 before npm ci

Co-authored-by: zhukaihan <7332407+zhukaihan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/amplitude/experiment-ruby-server/sessions/9cea838f-75a4-4b8b-98d8-1e0f6017660c

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: zhukaihan <7332407+zhukaihan@users.noreply.github.com>

* fix: declare base64 and logger as gem dependencies (#82)

* Add base64 and logger as explicit gem dependencies

Ruby 3.4+ no longer bundles these in default gems; JRuby fails with
LoadError when requiring them without a declared dependency.

Co-authored-by: Peter Zhu <zhukaihan@users.noreply.github.com>

* fix(spec): synchronize Set updates in multithreaded storage test

Ruby Set is not thread-safe; concurrent add from worker threads could
corrupt the expected set and fail equality with pull_all results.

Co-authored-by: Peter Zhu <zhukaihan@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Peter Zhu <zhukaihan@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: zhukaihan <7332407+zhukaihan@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Peter Zhu <zhukaihan@users.noreply.github.com>
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