Skip to content

fix(quit): reap owned helpers before app exit - #18205

Open
joowon-jang wants to merge 10 commits into
stablyai:mainfrom
joowon-jang:fix/quit-orphaned-processes
Open

joowon-jang wants to merge 10 commits into
stablyai:mainfrom
joowon-jang:fix/quit-orphaned-processes

Conversation

@joowon-jang

Copy link
Copy Markdown

ELI5

When Orca quit while a terminal or emulator helper was still starting, the app could stop waiting for that owned child process. This change keeps shutdown connected to the quit barrier and cleans up helpers that finish starting during shutdown, so closing Orca does not leave its work running in the background.

What Changed

  • Join local PTY cleanup to the app-quit teardown barrier.
  • Sweep descendants for agent PTYs and Windows PTYs during app quit, while preserving the existing ordinary POSIX nohup behavior.
  • Suppress late PTY exit callbacks after app-quit teardown has begun.
  • Gate iOS and Android emulator helper acquisition/registration during shutdown and clean up helpers that finish after the session snapshot.
  • Add regression coverage for local PTY descendants, shutdown ordering, emulator lease cleanup, late helper completion, and refused late registration.

Why

The quit path previously started local PTY cleanup without joining its asynchronous completion to the app teardown barrier. It also took a session snapshot before an in-flight emulator helper could register, allowing owned descendants to outlive the process that launched them. The new shutdown coordination closes both races without broad process-table reaping.

Linked Issue

Related to #11342 and #16714. This change covers local app-quit cleanup; daemon tab-close and cross-launch daemon ownership remain out of scope.

Visual Proof

N/A — no UI or interaction surface changed.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Automated verification:

  • pnpm tc
  • pnpm run check:code-quality:changed
  • pnpm test src/main/emulator/emulator-start-lease-registry.test.ts src/main/emulator/emulator-bridge.test.ts src/main/runtime/orca-runtime-emulator-folder-workspace.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/startup/desktop-startup-ordering.test.ts — 5 files, 80 tests passed on Windows.
  • Pre-commit hooks passed: oxlint, React Doctor lint, and oxfmt.
  • pnpm test was attempted, but the full suite was not clean in this Windows environment because of unrelated WSL/App Control/native-module/symlink-dependent failures and timeouts; it is not claimed as passing here.

AI Disclosure

OpenAI Codex (GPT-5) implemented the change. Claude performed an independent review of the shutdown paths.

Review

  • Cross-platform: uses the existing platform-specific PTY/process termination paths, preserves ordinary POSIX nohup semantics, and adds no shell or interpreter spawning.
  • SSH/remote/local: the change is scoped to local PTY and local emulator shutdown; remote/SSH execution remains owned by the execution host and is not reaped by the local quit path.
  • Agent/integration compatibility: agent PTY tracking uses the existing session identity, and the emulator gate covers both iOS and Android backends without changing their wire contract.
  • Performance: additional work runs only during shutdown; tracked acquisitions and cleanup are joined with bounded Promise.allSettled coordination rather than adding hot-path polling.
  • UI quality: no visual or interaction changes.
  • Security: cleanup is limited to owned/tracked sessions and existing descendant/job termination mechanisms; no broad process scan or new command-shell path was introduced.
  • Claude review confirmed the local PTY root-only termination survivor path. The cross-check also covered the emulator late-registration race and its cleanup-on-refusal behavior.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

No UI, SSH wire, Git provider, or shortcut behavior changed. The implementation keeps remote process ownership on the execution host and limits app-quit cleanup to locally owned resources.

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Join local PTY cleanup to the quit barrier and sweep owned descendants.
Gate emulator helper startup during shutdown so late helpers are cleaned
instead of surviving app exit.
@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 95cd34d5-118d-425b-906f-c9dbfe063f5a
Commits

Reviewing files that changed from the base of the PR and between 24009a1 and 7fe6a68.

Files selected for processing: 22
  • src/main/emulator/backends/android-emulator-backend.test.ts
  • src/main/emulator/backends/android-emulator-backend.ts
  • src/main/emulator/backends/emulator-backend.ts
  • src/main/emulator/backends/ios-emulator-backend.test.ts
  • src/main/emulator/backends/ios-emulator-backend.ts
  • src/main/emulator/emulator-bridge.test.ts
  • src/main/emulator/emulator-bridge.ts
  • src/main/emulator/emulator-session-registry.test.ts
  • src/main/emulator/emulator-session-registry.ts
  • src/main/emulator/serve-sim-execution.test.ts
  • src/main/emulator/serve-sim-execution.ts
  • src/main/emulator/serve-sim-kill-contract.test.ts
  • src/main/ipc/pty/kill-all.ts
  • src/main/providers/local-pty-provider-shutdown.test.ts
  • src/main/providers/local-pty-provider-state.ts
  • src/main/providers/local-pty-provider.ts
  • src/main/providers/local-pty-session-activation.ts
  • src/main/providers/local-pty-termination.ts
  • src/main/runtime/orca-runtime-emulator-folder-workspace.spec.ts
  • src/main/runtime/orca-runtime-emulator.ts
  • src/main/startup/main-process-quit-pending-writer.test.ts
  • src/main/startup/main-process-quit.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The PR adds ownership checks for emulator helper cleanup and coordinates emulator shutdown across active leases and pending acquisitions. It makes local PTY termination asynchronous, suppresses exit callbacks during app-quit cleanup, and waits for PTY cleanup as part of bounded application teardown. Emulator attach now releases its lease if active-session registration fails.

Priority: Normal

Merge Risk: Minimal · up to 7fe6a

The supplied evidence does not establish a new merge-blocking regression. The previously raised Android shutdown behavior still needs an owner decision.

Security Architecture Review

Security architecture risk: 🟡 Moderate · up to 24009

The change improves shutdown coordination, but a new cleanup path can automatically power off an already-running Android emulator that the app did not start. The effect is local and device-scoped; ownership protection is not consistently enforced.

Retained concerns

  • Medium · security · inferred: New shutdown cleanup for late acquisitions and unregistered leases can power off an externally started Android AVD. Acquisition accepts already-running devices, while Android device shutdown ignores ownedOnly and issues adb emu kill. Although registered managed sessions already had this power-off behavior, the PR extends it to acquisitions that never became registered sessions. Helper ownership therefore does not reliably constrain the new device-level cleanup authority.
Security review details

Security Blast Radius

  • inferred — The identified ownership concern affects selected Android emulators reachable through the app's existing ADB authority. Each shutdown command targets one resolved serial, although multiple in-flight acquisitions can produce multiple cleanup targets. The evidence does not establish a privilege escalation or remote attack route.

Security Findings and Attack Paths

  • inferred — A user-selected already-running Android AVD can be reused during helper acquisition. If app shutdown begins before acquisition finishes, the new late-completion path stops the helper and then powers off that AVD despite ownedOnly. This is an automatic ownership-containment failure path, not evidence of an unauthenticated attacker entrypoint.

Trust Boundaries and Controls

  • observed — Before signaling an iOS helper, owner-scoped cleanup requires a unique positive PID, a fresh single process-table row, and exact device and owner tokens. These controls reduce stale-PID and substring-match risks, but do not establish that same-user process metadata is unforgeable.

Resilience and Maintainability Implications

  • observed — Tracked PTY shutdown checks that the process still belongs to the same PTY entry before signaling and retains physical-exit tracking. These controls help prevent concurrent teardown or natural exit from transferring termination authority to a replacement process.

Hardening Proposals

  • proposed — Separate helper ownership from Android device boot ownership. Enforce ownedOnly in device shutdown so automatic late-acquisition cleanup stops app-owned streams without powering off pre-existing AVDs; retain explicit user-requested shutdown as a distinct authority.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 4.35% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 28 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title "fix(quit): reap owned helpers before app exit" matches the main change. The changeset joins local PTY cleanup to the quit teardown barrier and reaps owned emulator helpers (iOS and Android)…
Description check Passed The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist se…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(quit): reap owned helpers before app exit" matches the main change. The changeset joins local PTY cleanup to the quit teardown barrier and reaps owned emulator helpers (iOS and Android) during shutdown. The title is specific and uses a conventional commit prefix. It does not name the PTY part of the change, but that is an acceptable omission.

Full details: Description check

Explanation

The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections. It explains the mechanism and the reasoning. The Linked Issue section is weak. It says 'Related to #11342 and #16714' and does not use the required 'Fixes #' form, which the template says outside contributors must provide. The author also left the 'pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass' checklist item unchecked without explanation. The Testing section also states that the full test suite was not clean. The AI Disclosure section is filled in, which is acceptable for a non-team contributor.

Resolution

Consider these fixes before merge: (1) Replace the 'Related to' line in Linked Issue with a 'Fixes #<issue>' line that links an actual issue, if the author is an outside contributor. (2) Check the 'pnpm lint, typecheck, test, and build' item, or state which of those ran locally. (3) Clarify in Testing that the full suite was not run to a passing state, which the description already says.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Reviewed the full 15-file diff, concentrating on shutdown ordering, the acquire-vs-quit races in the emulator path, and the local-PTY descendant sweep, then traced each new code path against its callers.

  • Local PTY teardown — killAllPty()/LocalPtyProvider.killAll()/killAllLocalPtys() are now async and joined to the will-quit teardown barrier as local-ptys. Agent sessions and Windows PTYs route through killWithDescendantSweep; plain POSIX keeps the existing nohup-preserving requestPlainPosixAppQuitTermination path.
  • Exit-callback suppression — new ptyExitCallbacksSuppressed set prevents a late node-pty onExit from re-entering runtime teardown during quit; it is read by the handler before clearPtyState removes it, so the ordering is safe.
  • Emulator shutdown gate — new EmulatorBridgeShutdown coordinator gates registerActiveEmulator/acquireHelperForDevice, tracks in-flight acquires, and on shutdown drains them and cleans up any helper that finishes starting after the snapshot.
  • Lease registry tracking — EmulatorStartLeaseRegistry now tracks active + in-flight leases with an idempotent shutdown(), cleaning up unreleased/session-started-during-shutdown helpers.
  • Runtime attach ordering — registerActiveEmulator moved inside the try so a shutdown-refused registration releases the lease with cleanupIfUnused, rather than leaking the helper.

The double tracking (pendingHelperAcquires in the coordinator vs inFlightAcquires in the registry) is intentional and non-overlapping: the coordinator set covers the backendForDevice await window that precedes startLeases.acquire. Both shutdown flags are set in one synchronous block, so no acquire slips the gap. Quit-path liveness stays bounded by the existing settleTeardownWithinDeadline barrier, and killAllPty remains local-only (SSH/daemon PTYs untouched). Ran local-pty-provider-shutdown.test.ts — 24/24 pass.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Reviewed the incremental commit 90dcad0c63 ("fix(quit): include orphaned helpers in app-shutdown emulator sweep") on top of the previously cleared 29f88cfe13.

  • Orphan-inclusive shutdown sweep — EmulatorBridgeShutdown.destroyAllSessionsInternal() now passes includeOrphaned: true to stopHelperForDevice for each managed session. On iOS this sweeps orphaned serve-sim helpers whose command targets the device UDID (in addition to the tracked helperPid); on Android it removes device-scoped adb forward leaks via -s <serial> forward --remove-all.
  • Test coverage — the managed-session sweep assertion now expects includeOrphaned: true, and the helper-ownership suite's late-attach case already exercised the helperPid: undefined + includeOrphaned: true path.

The change is consistent with the pre-existing orphan-inclusive kill paths in EmulatorStartLeaseRegistry (cleanupStartedSession and cleanupIfUnused, which already pass includeOrphaned: true), so the app-quit sweep now reaps the same class of orphans the acquire/lease teardown already handled. Re-ran emulator-bridge.test.ts — 28/28 pass.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Merge current main while preserving OMP and immediate-close teardown behavior.
Join the bounded identity-safe descendant verifier to app quit, coalesce updater
and will-quit cleanup, cancel delayed startup delivery before capture, and
release the POSIX native handle if root signalling fails.

Add ten real-sweep regressions covering completion, PID safety and quit races.
Validated 137 targeted tests, changed-code quality and scoped TypeScript checks.
A real Linux PTY oracle reproduced the old survivor and verified the fix.
Full aggregate TypeScript checks exceeded the cloud runner memory budget.
@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 3/5

[High risk] Adds helper process lifecycle tracking and shutdown coordination.

The PR is not yet safe to merge because macOS quit cleanup can miss an owned serve-sim helper, and update-install PTY cleanup remains unjoined.

Findings

  1. P1 Owned helpers can be missed ▶
  2. P2 Update cleanup goes unjoined ▶

Summary

The PR joins local PTY cleanup to the quit barrier and coordinates emulator acquisitions with shutdown. Changes since the previous review replace broad automatic iOS helper cleanup with per-launch ownership checks.

  • The macOS owned-helper enumeration can miss helpers whose device argument is truncated from the initial process listing.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Q[App quit] --> P[Await local PTY cleanup]
  Q --> E[Emulator shutdown]
  E --> L[Settle helper leases]
  E --> S[Enumerate owned serve-sim helpers]
  S --> V[Verify device and launch owner]
  V --> K[Signal matching helpers]
Loading

Reviews (2) · Last reviewed commit: "fix(emulator): restrict automatic cleanu..."

Comment on lines +7 to +9
export function killAllPty(): Promise<void> {
if (localProvider instanceof LocalPtyProvider) {
localProvider.killAll()
return localProvider.killAll()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Update cleanup goes unjoined

killAllPty() now returns an asynchronous descendant sweep, but the update-install path discards that promise and records cleanup immediately. It cannot tell whether the sweep finished, and if the installer exits before the separate will-quit barrier joins it, the sweep can be abandoned. Joining or explicitly coordinating the promise would make update cleanup completion observable.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Reviewed the incremental commit 3f48601fd9 ("fix(quit): await verified local descendants before app exit") on top of the previously cleared 29f88cfe13 and 90dcad0c63, re-read the full 16-file diff end-to-end, and traced the new app-quit path against its callers.

  • Awaited descendant verdict on app quit — shutdownPtyForAppQuit now passes terminateDescendants (→ terminateShutdownDescendants) and awaitEscalation: true into killWithDescendantSweep, so the agent/Windows root is signalled only after the snapshot's descendants are SIGTERM'd, escalate to SIGKILL, and a bounded identity-safe verification returns a verdict; a non-exited verdict is logged and the quit still proceeds.
  • Single in-flight app-quit sweep — killAllLocalPtys() memoizes through a module-level appQuitShutdown promise (reset on settle), so the updater's early killAllPty() and will-quit's join share one sweep instead of racing two.
  • Final-handle fallback — killRoot destroys the native PTY handle even when the force signal is rejected, matching the "app exit is the final boundary" contract.
  • Regression coverage — new local-pty-app-quit.test.ts (10 tests) drives the real sweep and bounded verifier with only OS reads/signals mocked: awaited SIGKILL/absence ordering, concurrent-quit joining, recycled-PID safety, unreadable/hung/duplicate table bounds, suppressed late root exit, and the plain-POSIX no-sweep path. local-pty-provider-shutdown.test.ts gains an agent-sweep assertion.

The new ordering mirrors the established daemon teardown pattern (daemon/terminal-host-session-shutdown.ts uses the same terminateDescendants + awaitEscalation: true shape), stays local-only (SSH/daemon PTYs untouched), and the ~2.5s verification window sits well inside the 20s will-quit barrier. Verified locally: 72 tests across the 5 touched suites, pnpm tc, and pnpm run check:code-quality:changed all pass.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Tag detached serve-sim launches with a private instance marker and verify the live helper PID, device and marker before signaling. Refuse missing or ambiguous ownership instead of using shared state-file kill or unowned device sweeps. Keep the shared iOS simulator powered on during automatic cleanup; explicit shutdown remains available.

Validation: 165 tests across 13 suites; scoped TypeScript, changed-code quality and formatting passed. Real Linux process regression with ps flag adaptation confirms same-device external helper survives. Native macOS execution remains unverified; full project typecheck remains memory-limited locally.
Comment on lines +108 to +110
const table = await execFileText('ps', ['-axo', 'pid=,command=']).catch(() => '')
const helpers = parseServeSimHelperProcesses(table).filter((helper) =>
containsExactToken(helper.command, deviceUdid)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Owned helpers can be missed

If macOS truncates a long serve-sim command in the initial ps -axo listing, the device UDID may not appear. This filter then skips the helper before the later, wider lookup can verify its owner, so quitting Orca can leave an owned helper running.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — one minor question inline.

Reviewed changes

Reviewed the incremental commit 24009a109a ("fix(emulator): restrict automatic cleanup to owned helpers") on top of the previously cleared 3f48601fd9, then read the full 25-file diff for context.

  • Owned-only automatic cleanup — EmulatorBridgeShutdown.destroyAllSessionsInternal, EmulatorStartLeaseRegistry.releaseActiveLease/cleanupStartedSession/drainCleanup, and managed stopActiveForWorktree now pass ownedOnly: true instead of includeOrphaned: true, so a quit no longer SIGTERMs another tool's serve-sim helper or powers off a shared simulator. EmulatorHelperStopOptions and shutdownDevice(device, { ownedOnly }) carry the flag.
  • Per-backend launch ownership — IosEmulatorBackend stamps each --detach with a random ORCA_SERVE_SIM_OWNER, and the new killOwnedServeSimHelperProcessesForDevice SIGTERMs a PID only after ps -Eww shows both the device UDID and that exact owner token. Verified against Apple's ps source that -E appends the environment to the command field as space-delimited tokens and that a piped ps -axo uses unlimited width, so the two-stage identification can succeed.
  • Shutdown-time narrowing — drainCleanup forces ownedOnly once the registry's shutdown flag is set, so a cleanup queued orphan-inclusive is still restricted during quit.
  • Coverage — new serve-sim-owned-helper-processes.test.ts exercises PID reuse, non-exact owner/device tokens, ambiguous/malformed ps output, and concurrent verification; bridge/registry/backend suites were updated for the new expectations.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

stopHelperForDevice(deviceId: string, options?: EmulatorHelperStopOptions): Promise<void>
// Power off the underlying device/AVD.
shutdownDevice(deviceId: string): Promise<void>
shutdownDevice(deviceId: string, options?: { ownedOnly?: boolean }): Promise<void>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shutdownDevice now advertises an ownedOnly option, and every automatic cleanup path passes it — but AndroidEmulatorBackend.shutdownDevice (src/main/emulator/backends/android-emulator-backend.ts:195) declares no options parameter, so Android silently ignores the flag and still runs adb emu kill. Was leaving a shared AVD running after app quit intentionally out of scope, or should Android mirror the iOS guard?

Technical details
# Android `shutdownDevice` ignores the new `ownedOnly` flag

## Affected sites
- `src/main/emulator/backends/emulator-backend.ts:73` — declares `shutdownDevice(deviceId, options?: { ownedOnly?: boolean })`.
- `src/main/emulator/backends/ios-emulator-backend.ts:281` — honors it (early-returns before `shutdownSimulatorDevice`).
- `src/main/emulator/backends/android-emulator-backend.ts:195` — `shutdownDevice(deviceId: string)` has no `options` parameter; TypeScript accepts the narrower signature, so the flag is dropped and `adb emu kill` still runs.
- Call sites that now pass `{ ownedOnly: true }`: `emulator-bridge-shutdown.ts:64`, `emulator-start-lease-registry.ts:152` and `:177-180`.

## Required outcome
Decide whether automatic Android device shutdown should also be suppressed when `ownedOnly` is set. If yes, Android needs the same early-return as iOS; if no, a one-line comment stating that an Orca-booted AVD is deliberately still powered off would keep the interface contract honest.

## Open questions for the human
- Is an Android AVD attached by Orca (rather than booted by it) shared the way an iOS simulator is, or is powering it off on quit intentional?

Keep the upstream deletion of the retired startup source-string tests.
Cover pending, completed, and rejected local PTY teardown in the existing
quit-handler behavior suite.
Combine the notification-dismissal and local PTY test fixtures without
losing either teardown barrier's behavior coverage.
Keep ownership-safe Android cleanup, move shutdown regression into the shared runtime suite, and align quit test mocks with current teardown modules.
Preserve pane-grid flush ordering, synchronous SSH detachment and final save,
and awaited local PTY teardown. Cover pending grid and PTY cleanup together.

Validation: 160 tests passed with Vitest 5.0.5; changed-code quality gate and
format checks passed. Full node typecheck exceeded this environment's memory
limit; platform/native end-to-end behavior was not exercised.
Preserve awaited PTY cleanup and upstream runtime-fed exit events.
Keep managed emulator pruning limited to its recorded owned helper.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant