Repository navigation
fix: viewer stop signals zombie leaders with live threads; share the presence rule - #336
Merged
Merged
Conversation
…ainment Export statCountsAsPresent from proc.ts and use it in containment.ts instead of the copied zombieIsGone and num_threads checks. Closes #335
The viewer stop checked identities with processIdentityMatches and readProcessIdentity, which treat every zombie as dead. A Chrome leader that is a zombie with live threads was never signalled, so the stop timed out. Add readPresentProcessIdentity and presentProcessIdentityMatches to core with the group stop rule and use them for the viewer signals. The identity recheck stays the last read before each signal. Closes #329
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.
The viewer stop now signals a zombie Chrome leader or member that still has live threads, using the same presence rule as the verified group stop. Before this change it sent no signal and failed with "Viewer processes are still alive". Two new core helpers,
readPresentProcessIdentityandpresentProcessIdentityMatches, apply that rule. An orphaned zombie member shows an empty cmdline, so its viewer profile is now read through a live thread. Containment now uses the sharedstatCountsAsPresentrule fromproc.tsinstead of its own copy. The ownership checks (processIdentityMatches,readProcessIdentity,identityIsAlive) still treat every zombie as dead.Closes #329
Closes #335
pthread_exitwhile another thread runs (State Z, Threads 2). ThenstopSessionViewerruns.viewer-state.test.ts. It fails on main with "Viewer processes are still alive".proc.test.ts"reads a present identity for %s". Both reviewers confirmed the invariant.containment.tsnow callsstatCountsAsPresentPICKFORGE_REQUIRE_BROWSER=1 vitest run --coverageat 94dfe9cQA pass skipped: this changes internal viewer teardown, with no UI or CLI output to drive. The real-kernel tests run the stop end to end.
@pickforge/coregains two exports, used bydesktop-linux. Onlypackages/cliis published, so no public API changes.Reviews: Astra (xhigh) and Fable (xhigh). Both found that an orphaned zombie member was still skipped. Fable also asked for direct helper tests. Both were fixed in 94dfe9c, and both reviewers confirmed the fixes with no new findings.