fix: declare base64 and logger as gem dependencies#82
Merged
zhukaihan merged 2 commits intocodex/release-lockfilesfrom Mar 24, 2026
Merged
fix: declare base64 and logger as gem dependencies#82zhukaihan merged 2 commits intocodex/release-lockfilesfrom
zhukaihan merged 2 commits intocodex/release-lockfilesfrom
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ruby 3.4+ no longer includes
base64andloggerin the default gem set. CI on JRuby failed withLoadError: cannot load such file -- base64when loadinglib/experiment/cookie.rb. This change adds both libraries as runtime dependencies in the gemspec.The multithreaded storage spec compared two
Setinstances built from pushed vs pulled events.Set#addis 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