fix(spawn): harden abort/reset race handling, bump Pi to 0.84.1, clear security allowlist - #23
Open
ofriw wants to merge 4 commits into
Open
fix(spawn): harden abort/reset race handling, bump Pi to 0.84.1, clear security allowlist#23ofriw wants to merge 4 commits into
ofriw wants to merge 4 commits into
Conversation
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.
Note: This PR was generated by an AI agent. If you'd like to talk with other humans, drop by our Discord!
What Changed
Spawn lifecycle hardening — Race conditions between signal aborts, reset invalidation, and prompt rejections are now handled deterministically via a shared abort-promise pattern (
abortChildSessioninstate.ts). Previously, concurrent abort + reset could double-firesession.abort()or swallow real prompt errors; now the sharedWeakMap<AgentSession, Promise<void>>ensures one abort per session, and non-AbortErrorprompt failures propagate even during abort races.CI / compat testing overhaul —
runNpmWithRetry()with exponential backoff for transient registry failures.compat-fixture.mjsextracts shared compat utilities (createCompatCopy,prepareCompatCopy,resolveLatestPi, diagnostics).workflow_dispatchtrigger.Security audit cleanup — Emptied the
audit-ciallowlist entirely. All previously suppressed advisories forbrace-expansionandundici(pinned by Pi 0.82.0) are resolved by bumping to Pi 0.84.1 / TypeBox 1.3.7.Renovate config added —
.github/renovate.jsonpins Pi packages and TypeBox to exact versions.Breaking Changes
None user-facing. The
test-compat-floor.mjsscript andtest:compat:floornpm script are removed.Why
/resetor signal cancellation — important for correctness of child session lifecycle management.Testing
abort-child-session.test.ts+ 4 new race-condition tests inspawn.test.tscover abort dedup, sync/async abort throws, and signal-vs-reset priority.runNpmWithRetrytested with fixture npm CLI simulating transient failures.Attached is an agent optimized description of the changes in this PR - AGENT_REVIEW.md