Title: fix(store): snapshot subscribers before notifying by JosunLP · Pull Request #185 · bQuery/bQuery · GitHub
Open Graph Title: fix(store): snapshot subscribers before notifying by JosunLP · Pull Request #185 · bQuery/bQuery
X Title: fix(store): snapshot subscribers before notifying by JosunLP · Pull Request #185 · bQuery/bQuery
Description: Summary Fixes #165 (High). notifySubscribers iterated the live subscribers array while unsubscribe splices it, so a self-detaching watcher caused the next subscriber to be silently skipped for that notification cycle. Fix Iterate a snapshot ([...subscribers]), mirroring the existing $onAction listener-snapshot guard in the same file. Verification Regression test with the exact issue repro (subscriber A self-unsubscribes, subscriber B must still fire); fails without the fix, passes with it. bun test tests/store.test.ts: 95 pass / 0 fail. tsc --noEmit clean. 🤖 Generated with Claude Code
Open Graph Description: Summary Fixes #165 (High). notifySubscribers iterated the live subscribers array while unsubscribe splices it, so a self-detaching watcher caused the next subscriber to be silently skipped for that...
X Description: Summary Fixes #165 (High). notifySubscribers iterated the live subscribers array while unsubscribe splices it, so a self-detaching watcher caused the next subscriber to be silently skipped for that...
Opengraph URL: https://github.com/bQuery/bQuery/pull/185
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b53438a6-8a8b-50a7-7141-278a716c16be |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E304:2F8084:E43792:1492F74:6A4E5041 |
| html-safe-nonce | b19be11df336747b8c9f120c1af924060d56621be242f1af53666cc56709f2eb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzA0OjJGODA4NDpFNDM3OTI6MTQ5MkY3NDo2QTRFNTA0MSIsInZpc2l0b3JfaWQiOiI3MzQyMzI5OTgxMDg1NTY5MDg5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3614b8d3653cd62e8d0ed18105f0df73e5190f4ee5e279c763a4f50a5be4a2b5 |
| hovercard-subject-tag | pull_request:4000913840 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/bQuery/bQuery/pull/185/files |
| twitter:image | https://avatars.githubusercontent.com/u/20913954?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/20913954?s=400&v=4 |
| og:image:alt | Summary Fixes #165 (High). notifySubscribers iterated the live subscribers array while unsubscribe splices it, so a self-detaching watcher caused the next subscriber to be silently skipped for that... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/bQuery/bQuery git https://github.com/bQuery/bQuery.git |
| octolytics-dimension-user_id | 256381806 |
| octolytics-dimension-user_login | bQuery |
| octolytics-dimension-repository_id | 1139284244 |
| octolytics-dimension-repository_nwo | bQuery/bQuery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1139284244 |
| octolytics-dimension-repository_network_root_nwo | bQuery/bQuery |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f344f1eab54fc7dfc02d0d018cda7e158c3db65c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width