Skip to content

upstream/2026-04-26 PR3: host-service restart 関連 2 commits 取り込み#437

Merged
MocA-Love merged 2 commits intomainfrom
upstream/batch-2026-04-26-pr-c
Apr 26, 2026
Merged

upstream/2026-04-26 PR3: host-service restart 関連 2 commits 取り込み#437
MocA-Love merged 2 commits intomainfrom
upstream/batch-2026-04-26-pr-c

Conversation

@MocA-Love
Copy link
Copy Markdown
Owner

Summary

upstream (superset-sh/superset) からの 9 commits 取り込みバッチの PR3(host-service restart 関連 2 commits)。host-service-coordinator.ts で fork が Linux 用に拡張した spawnPersistent (systemd-run --user --scope) ラッパーを保持しつつ、upstream の「全環境で detach + log file 経由」方針を統合。

取り込み内容

Commit upstream PR 概要
1f55c623a superset-sh#3732 Host-service restart adoption fix。fetchHostVersion の response 形式に result.json.version フォールバック追加。spawn ロジックを isPackaged 分岐ベースから「全環境 detached: true + log file 経由」へ統一。dev 環境のパイプ stdout/stderr console.log ハンドラを削除。
0fe65d230 superset-sh#3734 上記 PR で追加された host-service-coordinator.test.ts を削除(Bun の mock.module()node:child_process / shell-env をプロセス全体で hoist し、merge-pull-request / git / teardown / listExternalWorktrees 等の 17 件の無関係テスト を pollute するため)。

Fork 側のコンフリクト解決

host-service-coordinator.ts (1f55c62)

Block 1: spawn 部分

  • fork の spawnPersistent ラッパー(Linux で systemd-run --user --scope 化)は 保持。dev 環境では plain spawn にフォールバックする挙動も維持。
  • upstream の detached: true 全環境化を採用(dev でも detach、host-service が Electron restart を生き延びる)。
  • windowsHide: true / stdio (logFd-only) は upstream の流れに沿って統一。
  • FORK NOTE コメントを「systemd-run on Linux」「detached: true everywhere — terminal-host daemon と同じ理由」と書き直し、upstream PR [codex] Fix host service restart adoption superset-sh/superset#3732 への参照を残す。

Block 2: post-spawn 部分

  • fork の instance.scopeUnit = scopeUnit保持(systemd-run 単位の追跡用)。
  • upstream の意図に従い、dev 環境用の child.stdout.on("data", ...) / child.stderr.on("data", ...) console ロガーを削除。dev 中もログは host-service.log (rotating) に書かれるので機能的に等価。

fetchHostVersion のレスポンス形式フォールバックや、isPackaged 分岐削除(条件 stdio / logFd 構築の片付け)等は auto-merge 成立。

0fe65d2301f55c623a で追加されたテストの削除なので競合なし。

Fork 固有機能ヘルスチェック

  • 19 tRPC procedure: 全件健在(getHostServiceCoordinator 関数本体含む)
  • ansi_up / @vscode/ripgrep / @xyflow/react 健在
  • TERMINAL_OPTIONS / SUPERSET_WORKSPACE_NAME / moonshot-ai.kimi-code / MainWindowEffects / INCEPTION_AUTH_PROVIDER_ID / v1MigrationState / TiptapPromptEditor 健在
  • desktop 1.5.10、drizzle idx (db=0035 / local-db=0072) 維持
  • spawnPersistent / killPersistentScope の Linux systemd-run 統合は完全に維持

検証

  • bun install: ✅ (5757 packages, 88s)
  • bun run typecheck: ✅ (27/27 successful)
  • bun run lint: ✅ (Biome: 4331 files, no fixes applied)
  • bun run --filter @superset/desktop compile:app: ✅ (electron-vite build, 2m 24s, exit 0)

後続 PR の予定

  • PR4(remote ports 大物): 7c0d22b77 (78 files / +4234 -1088、conflict 9 件、新規 packages/port-scanner/ パッケージ追加)

Test plan

  • dev / packaged 両方で host-service が spawn できる(macOS)
  • Linux で systemd-run スコープに包まれた host-service が superset-host-service-<orgId> として実体化される
  • Electron restart 後に既存 host-service が adopt される(manifest.json 経由、fetchHostVersionresult.json.version フォールバックが機能する)
  • dev 環境でも host-service.log に出力される(console には出ない)
  • bun test で merge-pull-request / git / teardown / listExternalWorktrees 系テストが通る(host-service-coordinator.test.ts の汚染が解消されたこと)

…er tests (superset-sh#3734)

The mock.module() calls in this test for node:child_process and shell-env are
hoisted by Bun and persist process-wide, causing 17 unrelated tests
(merge-pull-request, git, teardown, listExternalWorktrees) to fail or timeout
when run in the same suite. Bun does not provide per-file mock isolation, and
re-mocking back in afterAll fires too late to restore live ESM bindings already
captured by other test files.

Removes the test entirely to unblock CI. Coverage of the host-service
restart-adoption fix should be restored via a refactor that injects spawn /
getProcessEnvWithShellPath as constructor options instead of mocking modules.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

Warning

Rate limit exceeded

@MocA-Love has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 47 minutes and 38 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 47 minutes and 38 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: faee0a20-5ee6-4dc3-bad2-1775df1cbd90

📥 Commits

Reviewing files that changed from the base of the PR and between 4089462 and 23f7f10.

📒 Files selected for processing (1)
  • apps/desktop/src/main/lib/host-service-coordinator.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch upstream/batch-2026-04-26-pr-c

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 and usage tips.

@MocA-Love MocA-Love merged commit 7ce0d91 into main Apr 26, 2026
6 checks passed
@github-actions
Copy link
Copy Markdown

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

MocA-Love added a commit that referenced this pull request Apr 26, 2026
PR1〜PR5 (#435 #436 #437 #438 #440) で 13 commits 全件 cherry-pick + 手動 conflict 解消で取り込み済み。
本コミットは git 履歴上 behind=0 とするための ours マージ記録。

取り込み済み 13 commits:
- 1f55c62 Fix host service restart adoption (superset-sh#3732)
- 0fe65d2 test(desktop): remove host-service-coordinator test (superset-sh#3734)
- 3012b5a Add optimistic Electric collection updates (superset-sh#3722)
- c272a51 fix(desktop): drop branch row from v2 sidebar workspace item (superset-sh#3733)
- c2f3fdc feat(desktop): add fade-edge mask utilities (superset-sh#3735)
- 682d07c fix v2 terminal osc links (superset-sh#3736)
- 7c0d22b feat(ports): surface remote host-service ports in the sidebar (superset-sh#3676)
- 6a3be2d [codex] Stabilize v2 terminal resize (superset-sh#3739)
- 8928ac6 [codex] Improve v2 pane header responsiveness (superset-sh#3737)
- 5fe3d22 refactor(desktop): tidy v2 terminal session dropdown (superset-sh#3743)
- 66c23d6 Fix automation timezone scheduling (superset-sh#3738)
- 16e270c [codex] Add terminal session titles (superset-sh#3740)
- 583fa5d fix(desktop): refit v2 terminal after font settle (superset-sh#3742)
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