Repository navigation
fix(ci): prevent native filesystem pause deadlocks - #2
Merged
Merged
Conversation
nocoo
marked this pull request as ready for review
September 18, 2026 23:54
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.
Native pause and startup interrupts could freeze the browser: the emulator pthread waited for an asynchronous IDBFS
fd_syncPromise on the main thread, while the main thread synchronously waited for the pthread to pause. The failing main CI runs are 35280585691 and 35223115650. The latest failure was unresolved for over 24 hours when repair began; one unchanged-main diagnostic attempt reproduced it. A local stalled pthread stack subsequently identified the filesystem proxy wait.The build now adapts the pinned mGBA 2.5.1 JavaScript only after verifying its exact SHA-256. Before emulation starts, it reads the legacy SDK caches and imports every file into a memory filesystem. Native
fd_syncthen uses a synchronous numeric proxy, rejects asynchronous backing stores, and propagates errors. The application retains its existing awaited IndexedDB battery/snapshot persistence, and the old SDK databases remain untouched. Initial callback and configuration changes also stay paused until setup succeeds.The temporary diagnostic fixture is removed. The required browser gate increases from 30 to 31 cases to cover real legacy IndexedDB import and prove that native working-copy writes do not rewrite the old databases. Existing GB/GBC/GBA SRAM, battery-byte, restore, authorization, isolation, timeout and security assertions are retained.
Validation: pre-commit G1 and 670/670 unit tests passed; full guarded, uninstrumented production-browser L3 passed 31/31 with zero skips/flaky results; pre-push L2 passed 40/40 and G2 passed with pinned OSV 2.5.1 and gitleaks 8.30.1. Typecheck, formatting, lint, actionlint and distribution checks passed. Both independent reviews approved exact commit
094da6816bd60c530021f7a4d9c7bcd99105df12.The adapter deliberately fails the build if the SDK version or JavaScript changes; a future SDK update must review the adapter again. WebAssembly, dependencies, workflow permissions, deployment settings and secrets are unchanged.