fix: add 10-minute timeout to getSubscribedStoreData sync wait loop#1525
Merged
TheLastCicada merged 8 commits intoMar 11, 2026
Merged
Conversation
yao-pkg v6.13.1 has a compatibility issue with Node 24 where the runtime prelude throws ENOENT instead of allowing the bindings package to retry alternate paths for node_sqlite3.node. Upgrade to v6.14.1 which adds proper Node 24 support, add the native addon as a pkg asset as a fallback, and add a CI step that fails fast with a helpful message if the sqlite3 path changes in the future.
Update esbuild override from 0.25.12 to 0.27.3 to match the requirement of @yao-pkg/pkg@6.14.1, which requires esbuild@^0.27.3. The previous override caused a forced downgrade that risked runtime failures during the binary packaging step. Also fix the Windows sqlite-path matrix value to use forward slashes so the bash-based verification step correctly resolves the path, and add shell: bash to the Copy sqlite3 step for consistency.
Start the built binary after copy sqlite3 step, poll /health for up to 60 seconds, and fail the build if the binary crashes or never responds. Catches missing or mispathed node_sqlite3.node and other native addon issues before artifacts are signed and uploaded.
pkg 6.14.1's prelude resolves native addons at node_modules/sqlite3/build/node_sqlite3.node (without Release/) but the file only exists at build/Release/. Add a prepare-pkg-assets step to all build scripts that copies the .node file to the expected path and include both paths in pkg.assets so the snapshot contains the addon where the prelude looks for it. Also remove deprecated Vercel pkg from global install since the build scripts use the local @yao-pkg/pkg from node_modules/.bin.
wait PID || true always sets $? to 0 because true succeeds. Use wait PID || EXIT_CODE=$? instead so the actual process exit code is reported when the binary crashes during startup.
fix(CI): upgrade yao-pkg and fix Node 24 native addon resolution
The waitForSync loop in getSubscribedStoreData() could block indefinitely if a store never finishes syncing. Add a 10-minute deadline (matching the timeout used in the v2 getRegistryStoreIdFromSingleton) so a stuck store throws instead of causing an infinite blocking loop.
ef06f60
into
fix/parallel-store-creation-retry
30 of 32 checks passed
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
SYNC_TIMEOUT_MS = 600000) to thewaitForSyncloop ingetSubscribedStoreData()(src/datalayer/syncService.js), consistent with the timeout pattern already used in the v2getRegistryStoreIdFromSingleton.SYNC_POLL_INTERVAL_MS) and exportsSYNC_TIMEOUT_MSfor callers that may want to reference it.Test plan
USE_SIMULATOR=false), so simulator-based tests are unaffectedNote
Medium Risk
Changes the production
waitForSynccontrol flow to throw after 10 minutes instead of waiting indefinitely, which could surface new errors in slow-sync environments but prevents hangs.Overview
Adds a bounded timeout to
getSubscribedStoreData()’swaitForSyncloop so a store that never reaches a synced state no longer blocks forever; it now throws afterSYNC_TIMEOUT_MS(10 minutes).Extracts the sync polling sleep into
SYNC_POLL_INTERVAL_MSand exportsSYNC_TIMEOUT_MSfromsyncServicefor reuse by callers.Written by Cursor Bugbot for commit 7351d52. This will update automatically on new commits. Configure here.