Repository navigation
fix: preserve block callbacks in asynchronous history - #182
Closed
pcbeingused333 wants to merge 1 commit into
Closed
pcbeingused333 wants to merge 1 commit into
pcbeingused333 wants to merge 1 commit into
Conversation
pcbeingused333
requested review from
jguz-pubnub,
mohitpubnub and
parfeon
as code owners
November 15, 2026 21:58
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
|
@pcbeingused333 this issue is addressed in v6.2.1 |
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.
Preserve block callbacks in asynchronous history pagination.
paged_historyandall_history_messagesresolve their callback from either thecallback:option or the supplied block. Their asynchronous paths pass only the original options into a future, then re-enter the public method without the block, silently losing block callbacks.Pass the resolved callback in a merged options hash to each asynchronous helper. This preserves explicit callback precedence (including explicit
nil) and leaves the caller's options unchanged.Tests
Added eight offline RSpec examples using real
Concurrent::Futureexecution and stubbed history responses. Both asynchronous block cases fail before the fix; all eight examples pass afterward. The cases cover synchronous and asynchronous blocks, explicit callback precedence, explicit nil callbacks, and frozen caller options.Run
rspec spec/lib/paged_history_spec.rbwith RSpec and concurrent-ruby installed.This change and its tests were prepared with AI assistance (Codex).
Internal notes
No linked issue exists for this independently reproduced bug; no issue-closing keyword is included.
Base: master 8e31712.
Eligibility from scout at the same revision: README.md §Support and contributions requires behavioral tests; no prior issue, assignment, approval, CLA/DCO, alternate target branch or changelog requirement was found.