Repository navigation
fix: prune orphan stopped.json temps and wait for Xvfb exit in rollback - #319
Merged
Merged
Conversation
A teardown killed between the marker temp write and its rename left a .stopped.json.tmp file that blocked pruning forever. Retaining logs now removes those temps next to the lease staging files. Other unknown entries still block pruning. Closes #315
stopProcessGroupVerified treats a zombie group leader as gone even while the process's other threads still exit. Xvfb startup rollback then reported cleanup as confirmed and returned while the spawned process was a zombie with a live thread. An aborted browser create could return with the Xvfb pid still present. Rollback now also waits for the owned child's exit event before it confirms cleanup. If the exit does not arrive in time, cleanup stays unconfirmed. Closes #318
4 tasks done
An overlapping retain for the same session deleted the other retain's marker temp before its rename. Delete a marker temp only when its pid is not this process and is not alive.
2 tasks done
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.
Closes #315
Closes #318
Session retention now removes orphan
stopped.jsontemp files. Other unknown files still block pruning. Xvfb startup rollback now waits for the spawned Xvfb's exit event before it reports cleanup as confirmed.#318 is a product bug. The verified group stop treats a zombie leader as gone, but a multi-threaded process can still have a live thread at that point. The fake Xvfb is a Node process, so rollback could return while it still existed.
stopped.jsontemps on retainpackages/core/test/session-retention.test.ts, worker report.stopped.json.tmp-notesand a directory with a temp-like name stay and block pruning; the existing unknown-data test is unchanged/proc/<pid>/statshowedZwith 2 threads at each failed assertion. Fix indisplay.tscleanupPartialStartpackages/browser/test/session.test.tsis unchangedsession-retention.test.ts, Astra recheckdisplay-identity.test.ts, Fable recheckPICKFORGE_REQUIRE_BROWSER=1coverage: 3077 passed, 6 skipped at b3fcd8b--base origin/main --fail-on new,worsened,unmatchedpickcheck.txtEvidence is in
~/Artifacts/pickforge-batch6-2026-10-09/on the build host.No device pass: both changes are internal cleanup paths with nothing to drive, and the automated tests cover them.
Follow-ups: #320 (verified group stop accepts a zombie leader with live threads) and #321 (serialize Android teardown per session).