Skip to content

fix(runtime-host): recover WSL roots after remount - #4084

Merged
M4n5ter merged 1 commit into
mainfrom
fix/runtime-host-wsl-restart
Aug 28, 2026
Merged

fix(runtime-host): recover WSL roots after remount#4084
M4n5ter merged 1 commit into
mainfrom
fix/runtime-host-wsl-restart

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 28, 2026

Copy link
Copy Markdown
Member

WSL remounts can change a directory's device identity while preserving the same inode, path, and managed Root ID. That made an existing WSL Runtime Host fail setup or reconnect with StorageRootAuthorityError after WSL restarted.

This PR:

  • adds an explicit, opt-in remount repair at the storage authority boundary;
  • enables it only for WSL setup and framed-stdio connect/activate paths;
  • pins repairs to the persisted Root ID and requires the inode to remain unchanged;
  • keeps ordinary native and remote root validation strict.

Validation:

  • targeted storage, CLI operator, and WSL environment tests;
  • package typechecks and formatting checks;
  • Windows Electron → Ubuntu WSL setup, project browsing, and real session creation;
  • remount-equivalent reconnect: stale device identity was repaired and readiness returned to ready without changing Root ID.

No compatibility path is included for unpublished older development operators; onboarding installs the operator from the same build.

中文

WSL 重挂载后,目录的设备号可能变化,但 inode、路径和已管理的 Root ID 仍然相同。这会导致已有 WSL Runtime Host 在 WSL 重启后 setup 或重连时报 StorageRootAuthorityError

本 PR:

  • 在 storage authority 边界增加显式、按需启用的 remount 修复;
  • 仅由 WSL setup 与 framed-stdio connect/activate 路径启用;
  • 修复必须匹配持久化 Root ID,并要求 inode 不变;
  • native 与 remote 的普通 root 校验继续保持严格。

验证:

  • storage、CLI operator、WSL environment 的少量关键测试;
  • 相关 package typecheck 与格式检查;
  • Windows Electron → Ubuntu WSL 的 setup、项目浏览和真实 session 创建;
  • 等价 remount 重连:旧设备号被修复,Root ID 不变,readiness 恢复为 ready

不为未发布的旧开发 operator 增加兼容路径;onboarding 会安装与当前 build 同版本的 operator。

@M4n5ter M4n5ter self-assigned this Aug 28, 2026
@github-actions github-actions Bot added the effort/M Under 500 readable lines label Aug 28, 2026

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I reviewed exact head 672cadac5bbd0727563a64b6d6cd2a4c7d15d767 and found no blocking issue.

The remount repair is explicit and remains confined to the WSL setup/connect/activation paths. Managed reconnects pin the existing Root ID; the storage boundary permits only a device-identity change while requiring the directory inode and marker snapshot to remain stable through commit. Ordinary native and remote root resolution remains strict. The current-main synthetic merge is clean, and the exact-head hosted checks are terminal green.


Posted by an automated review agent operated by @WAWQAQ. This is not an
independent human review and does not satisfy the committer review required by
CONTRIBUTING.md. A human is accountable for this comment — please push back if
anything here is wrong.

简体中文

本条评论由 @WAWQAQ 运行的自动化审查程序发出。它不构成 CONTRIBUTING.md
所要求的独立人类审查,也不能替代人类审查。有人类对本条评论负责,如有错误请直接指出。

@M4n5ter
M4n5ter merged commit 9baa499 into main Aug 28, 2026
14 of 15 checks passed
@M4n5ter
M4n5ter deleted the fix/runtime-host-wsl-restart branch August 28, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants