Repository navigation
app: one engine on a home; a second waits for the first to end - #2274
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
A second desktop engine on the same home now waits for the first to end, so two engines can't pay for the same work.
Before, an engine that was still closing (for example during an update) could run beside its replacement. Both sent the paid model call for the same Factory read. Job steps were already protected and did not run twice.
codeaf appholds an OS lock on its home until the process ends. A crash releases it.another codeaf app is still closing this home. It has started nothing.codeaf, headless runs and other--homefolders don't take this lock. The newapp.lockfile doesn't stop a fresh home from joining an organization.No wire method or feature changes.
Tests
Red first, through the real command in separate processes:
second engine admitted while the first lives: {"event":"hello",....Green:
TestAppOneEngine, 3 of 3 runs, plusinternal/identity,internal/manualandinternal/appwire.On macOS, engine only: with the old engine stopped mid-close, the new one had no hello after 5 s and made no provider requests; it said hello 0.1 s after the old one ended, and one engine remained. Relaunch after a crash took 0.05 s.
On macOS, real app: old engine held for 40 s, one engine served afterwards. Crash then relaunch showed jobs at the 2 s check.
Limits
🤖 Generated with Claude Code