Repository navigation
fix: clean up owned children after ownership persistence fails - #900
Closed
Evanlau1798 wants to merge 3 commits into
Closed
Evanlau1798 wants to merge 3 commits into
Evanlau1798 wants to merge 3 commits into
Conversation
Share verified runtime installation with startup, overlap source checksum reads in a bounded trusted child, and allocate CDP ports before Electron can become ready. Preserve fail-closed validation, rollback, and fatal verifier errors. Add startup ordering and error-boundary regressions. Pin patched Electron and ip-address versions so required audits pass.
Evanlau1798
marked this pull request as ready for review
October 23, 2026 06:08
Evanlau1798
marked this pull request as draft
October 23, 2026 06:12
14 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.
What this changes
When persisting Launcher ownership fails, stop the children already owned by that supervisor generation. Previously the failure path could stop monitoring while leaving the daemon or managed tunnel alive.
Cleanup uses the existing owned-child and native tunnel-manager stop paths, coalesces repeated failures, and joins outstanding cleanup before restart. Captured references protect replacement generations; marker PID contents alone never authorize termination. Native stop failures retain ownership evidence and remain observable.
Packaged acceptance also exposed repeated runtime verification costs and a startup ordering race: yielding during verification or CDP port allocation could let Electron become ready before its debugging switches were applied. Startup now shares the verified installation, hashes source files in a bounded trusted Node-mode child, and obtains the loopback port before yielding to Electron readiness. Source, temporary and published runtime integrity checks, rollback and fail-closed errors remain enforced. Patched Electron 42.11.9 and ip-address 10.7.4 pins resolve the audit failures encountered during qualification.
Evidence
runtimeVerified: true. Its packaged CJS files match the reviewed source byte for byte.chatgpt-web/gpt-5.6-solat High, Full MCP mode, read-only MXC sandbox and approvals never: exactly one realGet-Date -Format yyyycommand completed with exit 0/output2026, followed by the expected final answer.runtime.state_write_failed, stopped the owned daemon and native managed tunnel, and changed native inventory from ready to stopped. No cleanup-failure event occurred. The marker was restored, the test launcher closed normally, and the separate live service stayed healthy with the same PID throughout that test.Earlier cold-launch timeouts, the localized effort-verification failure and denied tool attempts remain recorded as failures. The last failed final-artifact copy occurred during disk exhaustion; after space was restored the identical artifact passed. No claim about an underlying OS/driver defect is made.
Scope and invariants
CONTRIBUTING.md; no unrelated provider, feature or broad refactor.Verification
Candidate:
d3917b00cef27dbce30c98679788751ff2450940(verified/reviewed working inputs matched before committing).bun install --frozen-lockfilein root andlauncher/, pinned Bun 1.4.0 / 34cbb9a40; both report no changes.bun run verify: exit 0, including both audits, root/launcher typechecks, renderer build, runtime bundle, third-party notices andRELOCATABLE_RUNTIME_SMOKE_OK.Platform or account validation
Actually exercised: Windows x64 unpacked native package, official Electron 42.11.9, Node 22.17.0, pinned Bun 1.4.0; isolated authenticated ChatGPT and Codex homes, dedicated tunnel/connector and separate tunnel registry. Final
app.asarSHA-256:47891d51cde8a1a5adc66fe472d4d041c3762f2c9f1d564003b194a2368f9b15.Not run: macOS/Linux native packages, NSIS installer/install-over-existing smoke, or hosted CI jobs. No existing installation was replaced. The previous upstream workflow required maintainer approval (
action_required, zero jobs executed); the new head's hosted result must be assessed separately. Local qualification passes; no hosted or cross-platform green is claimed.