Repository navigation
fix(browser): skip Windows Electron signals without verified lineage - #1588
Merged
Merged
Conversation
capture_electron_scenario called taskkill on the recorded leader PID before lineage could be verified. On Windows the process table is empty, so that proof never arrives and the signal still ran. Refuse the cleanup without signaling. A verified lineage still terminates the leader and its descendants.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
2 tasks done
Owner
|
Thanks for this contribution as well, @Adolanium. Checking lineage before signaling the Windows Electron tree preserves the ownership boundary when cleanup cannot be verified. I reconciled the tests with main and kept its partial-capture regression alongside your cases. All four source tests passed locally; native Windows remains unverified. Squash-merged. |
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.
Summary
Fixes #1589.
capture_electron_scenarioon Windows force-kills the recorded Electron PID and then reportscleanup_failed. Related context: #288 tracks Job Object ownership for Ghidra and does not cover this Electron path.Problem and expected behavior
On Windows,
createSystemProcessOwnershipHostreturns an empty process list, so Electron lineage staysunavailable.cleanupElectronProcessesstill rantaskkill.exe /pid <leader> /t /f, then returnedcleaned: falsebecause lineage was not verified.docs/electron-observation.mdsays cleanup uncertainty does not authorize signaling unrelated processes. A PID alone is not ownership after exit or reuse. POSIX cleanup revalidates the run before signaling. Windows should refuse the signal when lineage is unverified, and signal the leader and descendants only after lineage is verified.An unverified Windows capture still ends as
cleanup_failedwithpartial_observation. This change does not make that lane succeed, and it does not implement Job Object ownership.Change and scope
The Windows branch now returns the existing unverified-cleanup failure before calling
taskkill. Verified lineage still terminates the leader and each descendant. POSIX cleanup is unchanged.Contract and boundary impact
application.close().capture_electron_scenariostill returnscleanup_failedwhen Windows lineage cannot be verified.partial_observation.taskkillthat ran without lineage proof.docs/public/product-catalog.json), package, or installation impact: none.Evidence and regression coverage
src/browser/PlaywrightElectronActiveProvider.test.tscovers unavailable lineage (no terminate call) and verified lineage (leader then descendant).observeOwnedProcessLineagereturns unavailable before any signal. The previous branch calledcleanupWindowsProcessTreefirst.cleanup_failed. It no longer runstaskkillfirst.For evidence-bearing changes:
Validation performed
npm run test:focused -- src/browser/PlaywrightElectronActiveProvider.test.ts— 3 tests passed.npx tsc --noEmit --pretty false— no errors.Compatibility, safety, and release
Review checklist
type(scope): outcome.