Skip to content

Revert "Fix dev server build concurrency deadlock"#44

Merged
seveibar merged 1 commit intomainfrom
revert-42-codex/fix-sigtrap-error-in-winterspec-codebase
Sep 25, 2025
Merged

Revert "Fix dev server build concurrency deadlock"#44
seveibar merged 1 commit intomainfrom
revert-42-codex/fix-sigtrap-error-in-winterspec-codebase

Conversation

@seveibar
Copy link
Contributor

Reverts #42

@seveibar seveibar merged commit aba9542 into main Sep 25, 2025
1 check passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 211 to +215
const handleFileChange = async (isManifestChange: boolean = false) => {
await buildMutex.runExclusive(async () => {
if (isManifestChange) {
await updateManifest()
}
await build()
})
if (isManifestChange) {
await updateManifest()
}
await build()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Protect dev builds from concurrent rebuilds

Removing the Mutex from handleFileChange allows multiple file-change events to call build() in parallel. When two files are saved in quick succession, build() will call buildContext.rebuild() twice concurrently, which esbuild rejects with errors like Cannot start rebuild while another rebuild is running, leaving the dev server in a failed state until manually restarted. The reverted change serialized these operations; without it, normal editing can intermittently break the dev server.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant