Skip to content

fix(desktop): retire demo IPC requests before teardown - #1726

Draft
luokerenx4 wants to merge 1 commit into
devfrom
fix/1688-demo-ipc-shutdown
Draft

luokerenx4 wants to merge 1 commit into
devfrom
fix/1688-demo-ipc-shutdown

Conversation

@luokerenx4

@luokerenx4 luokerenx4 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem and behavior

Closes #1688.

On the latest dev base (82226d43), demo before-quit killed the fixture child while app-protocol requests could still send IPC. The callback correctly surfaced EPIPE, but Electron then reported that rejection during otherwise successful smoke teardown. #1685 repaired a separate destroyed-window error; the issue has no comments and no existing IPC teardown repair was found.

Retire the fixture's web-request source before killing it. Pending and subsequent requests return unavailable (503), including requests still reading their body. Request abort also completes promptly. Late replies/send callbacks cannot revive cancelled work. Live-source send errors and timeouts still reject; unexpected fixture exit is logged and exits nonzero.

Following the subtraction principle, the existing pending-request map remains the single owner: settlement now centralizes timer/listener/map cleanup instead of duplicating it across response, send-error and cancellation branches. The only new source state is a weak closed-source marker: child.connected cannot express intentional retirement before kill or prevent a delayed body reader from dispatching. Demo teardown has one idempotent owner. No catch-all EPIPE suppression, parallel transport, packaged smoke runner, production main, broker or persisted-state change.

Verification

All local validation used disposable HOME, OPENALICE_HOME, global/Supervisor and Pi paths under /tmp/oa1688; no real broker, SSH or native user state.

Passed:

  • pnpm test:owner:desktop --receipt /tmp/oa1688/desktop-final.json: 26 files / 130 assertions, including seven focused lifecycle regressions (source isolation/late callbacks, body-read cancellation, request abort, unexpected synchronous/callback errors, timeout).
  • pnpm -F @traderalice/desktop typecheck.
  • pnpm test:contract:workflow: 12 files / 104 assertions.
  • LOCAL_GIT_DIRECTORY=/usr GIT_EXEC_PATH=/usr/lib/git-core pnpm test:critical --receipt /tmp/oa1688/critical-system-git.json: all 18 assertions. This uses dugite's supported system-Git override, not packaged Git acceptance.
  • pnpm build; pnpm exec tsc -p tests/tsconfig.json --noEmit.
  • Demo shell, UI and fixture-backend build completed via pnpm electron:smoke:demo.

Failed/environment-limited attempts:

  • Initial frozen install failed downloading dugite with ECONNREFUSED. Installed dependency sources with --ignore-scripts; downloaded Electron successfully using the environment proxy.
  • Initial desktop suite: 127 assertions passed, one suite could not load without Electron. After installation, the full owner suite above passed.
  • Initial critical gate: five assertions failed because bundled dugite Git was absent (ENOENT); supported system-Git rerun passed as recorded above.
  • Native demo launch aborted before running smoke assertions: Chromium reports incorrectly configured SUID sandbox helper. The Linux container also has no DISPLAY/Xvfb. Native stderr-clean quit on macOS arm64, other native platforms and unsigned package acceptance remain unverified. No signing/release verification attempted.

Full monorepo tests were not selected: the runtime change remains within the desktop owner; its complete suite, owner types and existing dev required gates were selected. Draft for human review; do not merge automatically. Exact-head remote CI completed successfully: clean-build run 36929441448 on e88a50e93acaee251ff2ebacda79b1c6ee632096 passed dependency install, workflow contracts, required critical evidence, complete workspace build and registered-suite typecheck. All reported PR checks are terminal/success. This does not replace the unrun native smoke assertions.

@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openalice-demo Ready Ready Preview Oct 1, 2026 9:33pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — e88a50e9 Deployed Oct 1, 2026 by vercel[bot]
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.

2 participants