Skip to content

Fix agent name collisions and shell startup shutdown race - #2

Merged
adagora merged 1 commit into
mainfrom
fix-spawn-shutdown-races
Oct 22, 2026
Merged

adagora merged 1 commit into
mainfrom
fix-spawn-shutdown-races

Conversation

@adagora

@adagora adagora commented Oct 22, 2026

Copy link
Copy Markdown
Owner

CI exposed two races: a spawn batch generated all names before reserving any, so a random collision could abort the batch; shutdown could also run while subprocess creation was yielding and miss the new shell.

Reserve each agent name as the batch is started. Track shutdown generations so a shell that finishes starting after close is killed immediately using the existing ownership checks.

Regression coverage forces a duplicate random name and closes the machine before subprocess creation returns. Agent/process tests pass; the full suite passes 284 tests with optional push dependencies installed.

@adagora
adagora merged commit 669754c into main Oct 22, 2026
8 checks passed
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