upstream 取り込み PR #3: host-service 系 / 4 commits#399
Conversation
superset-sh#3548) v1's createWorktree appended ^{commit} to the start point to prevent implicit upstream tracking. This fails with "fatal: invalid reference" when the ref isn't locally resolvable with that suffix (e.g. stale or missing remote-tracking ref, branches with slashes like feat/workstreams-view). Replace ^{commit} with --no-track, which has the same effect without fragile ref suffix manipulation. Matches v2's host-service approach. Closes superset-sh#3448
Squirrel.Mac's update flow SIGTERMs the old app's process group, which reached the host-service child and caused two nukes: the child's shutdown handler deleted its own manifest, and the child itself was in the parent's process group so it died with the app. On relaunch the new app found no manifests and spawned fresh host-services, losing all in-memory state. - Drop removeManifest from the child's SIGTERM handler. The coordinator already owns manifest lifecycle on intentional stops and observed exits. - Spawn with detached: true and file-backed stdio at <manifestDir>/host-service.log, so the child lives in its own process group and doesn't depend on parent-held pipes. Mirrors the existing terminal-daemon pattern. Tray Stop / Quit & Stop Services are unchanged — coordinator.stop() signals by pid, independent of process group.
…, dev pipes (superset-sh#3616) * fix(desktop): keep v2 host-service alive across app updates The host-service child was spawned without `detached: true`, so it shared the Electron main's process group. When Squirrel relaunched the app on auto-update, the old app's process group got killed — taking the host-service and all its PTYs with it. The whole manifest-adoption design in HOST_SERVICE_LIFECYCLE.md assumed the child survives, but the spawn options contradicted that. Mirror the v1 terminal-host daemon pattern (client.ts:1160-1221): `detached: true` in prod, stdio pointed at a per-org rotating log file at `~/.superset/host/{orgId}/host.log` (piped stdio would EPIPE once the parent exits). Dev mode keeps pipes for live console logs since enableDevReload restarts instances on bundle rebuild anyway. * address review: normalize log perms + windowsHide - chmodSync log file after open: openSync's mode arg only applies on create, so a pre-existing file rotated out-of-band keeps old perms. - windowsHide: true on the spawn so the detached Node child doesn't flash a CMD window on Windows. * refactor(desktop): extract pure host-service helpers to host-service-utils * address review feedback - Gate detach on app.isPackaged instead of NODE_ENV. NODE_ENV is ambient and could silently flip detach off in a packaged app (e.g. shell env), reintroducing the Squirrel kill-chain this PR exists to fix. - Log a warning on chmodSync failure so permission issues are observable instead of being swallowed silently. - Move clearTimeout into finally in pollHealthCheck so the 2s abort timer is also cleared when fetch rejects, not just on success.
…t-sh#3630) * feat(setup): clone v2 host-service DBs alongside v1 local DB Seeds ~/.superset/host/<orgId>/host.db into superset-dev-data/host/<orgId>/ so v2 workspaces open with host-service state prefilled, matching the existing v1 local.db clone behavior. * feat(setup): seed Electron renderer Local Storage from prod userData The v2 sidebar reads pinned-workspace state from renderer localStorage (`v2WorkspaceLocalState`, etc.), which lives in the per-app userData dir. Each dev worktree gets a fresh `Superset (<workspace>)` userData → empty sidebar even when the cloud + host.db clones have plenty of accessible workspaces. Copy `Local Storage/` from the prod app's userData using APFS clonefile so prod can keep running. * feat(desktop): auto-pin accessible v2 workspaces in dev sidebar Drop the renderer-state file-copy approach (Chromium localStorage is per-origin: dev runs on http://localhost:<port>, prod is file://, so copying the leveldb seeds the wrong namespace). Instead, add a small dev-only hook in the dashboard layout that pins every accessible v2 workspace once per worktree's userData. A localStorage flag prevents re-pinning workspaces the user has explicitly unpinned later. * chore(deslop): tighten useDevSeedV2Sidebar JSDoc and drop restate-the-code comment * chore(deslop): drop restate-the-code comment in step_seed_host_dbs * Lint * fix(setup): clean up partial host DB copies on failure If host.db copies but a -wal/-shm sibling fails, leaving the lone host.db in place would make the next non-force run skip the org as "already seeded." Wipe the per-org dest before returning the error. Caught by coderabbitai on PR superset-sh#3630.
|
Warning Rate limit exceeded
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 22 minutes and 37 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3da4dd01a3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
upstream 取り込みバッチ 3: host-service 系 4 commits。Codex 事前調査 (gpt-5.5 high effort) を経て、当初計画の 9 commits から慎重に 4 commits へ絞り込み。
取り込み内容(4 commits)
当初計画から除外した commits(理由別)
fork 相当実装がある (raw cherry-pick すると fork 独自実装を上書きする懸念)
605c2ee496a1(fix(host-service): v2 workspace git correctness (upstream, 3-dot, numstat) superset-sh/superset#3543 v2 workspace git correctness) — fork に987b29c64として相当 commit 存在。PR upstream取り込み: 安全な29コミット (安全・おそらく安全) #388 でlistBranchesのsortOrder/pinDefaultが silent regression で消えた領域。差分を精査した別 PR で再評価45dd81c691b6(feat(cli,trpc): organization override via header, no session mutation superset-sh/superset#3638 organization override via header) — fork に66df8b0bbとして相当6ae8ea96f01c(fix(host-service): stop misattributing cross-fork PRs to local workspaces superset-sh/superset#3625 stop misattributing cross-fork PRs) — fork にa116bb2b3として相当前提 commit 欠落
5501bae43826(feat(host-service): restore AI workspace naming on v2 create superset-sh/superset#3654 restore AI workspace naming on v2 create) — fork にupdateNameFromHostが未存在。PR #2b で feat(v2): minimal project create/import for workspaces superset-sh/superset#3566 (v2 project create/import) を取り込んだ後に処理PR #6 (version bump) へ移動
5b8cd243(chore(host-service): bump version to 0.2.0 + raise min version superset-sh/superset#3672 host-service version to 0.2.0 + raise min version) —adopt(worktreePath)前提コードが現 HEAD 未存在Fork 側のコンフリクト解決
apps/desktop/src/main/lib/host-service-coordinator.ts,host-service-utils.ts新規追加は fork の既存 coordinator alias (getHostServiceManager) と整合.superset/lib/setup/steps.sh,apps/desktop/src/renderer/routes/_authenticated/_dashboard/layout.tsxの auto-merge は fork の setup flow / dashboard layout と整合性維持Fork 固有機能ヘルスチェック
作業前 baseline (
/tmp/pr3-baseline/fork-features.txt) と作業後を grep で照合。全 14 項目変化なし (silent regression 検出ゼロ):ansi_up,@vscode/ripgrep,@xyflow/react依存TERMINAL_OPTIONS(5 ファイル)SUPERSET_WORKSPACE_NAME(24 箇所)moonshot-ai.kimi-codeMainWindowEffects/INCEPTION_AUTH_PROVIDER_IDlistBranchessortOrder (4) / pinDefault (3) ← PR upstream取り込み: 安全な29コミット (安全・おそらく安全) #388 の silent regression 領域、健在BROWSER_RELOAD, port-scanner Windows 分岐,dmg.size="4g"Codex 事前調査レポート
/tmp/pr3-codex-preanalysis.md参照。PR #388 で silent regression が起きた領域 (listBranches) は今回 cherry-pick 対象ではないため直接影響なし。取り込んだ 4 commits はいずれも coordinator / setup / worktree 作成系で、fork の 19 tRPC プロシージャには干渉しない。Test plan
bun install正常完了bun run typecheckグリーン (27/27 task)bun run lintグリーン (4058 files checked, biome 指摘ゼロ)次の PR
1f2c093v2 project create/import を土台にして5501baefeat(host-service): restore AI workspace naming on v2 create superset-sh/superset#3654,e964940fix(desktop): stop spurious folder picker on settings → dashboard nav superset-sh/superset#3602,1e2302ffeat(desktop): infer project name from folder on import superset-sh/superset#3605 を処理5b8cd243を含む)987b29c64,66df8b0bb,a116bb2b3と upstream 対応 3 commits の差分精査 PR