Repository navigation
[Grok/dsh 67] Linux 产物与基础终端运行 #199
Copy link
Copy link
Closed
Labels
ready-for-agentAgent-grabbable workAgent-grabbable work
Description
Activity
- added a commit that references this issue
on Sep 28, 2026 已集成:Linux 预编译安装与第一阶段平台运行(#199)
集成提交:
a0281ca(已普通推送到rewrite/grok-dsh-20260920,未改动main)。实现内容
- 原生产物:
linux-x64与新增linux-arm64;OpenSSL 以 vendored 方式编入(运行时不再依赖系统 libssl),glibc 下限记录为 2.35。 - 运行前检查(在创建 Rust Home 之前):
rust-artifact.mjs内置 ELF 读取,识别原生程序的 libc 与所需共享库;musl(Alpine)、过旧 glibc、缺失共享库均被拒绝并给出可操作提示(错误码libc/glibc/library),同时说明普通codsh(Node.js 运行时)照常可用。 codsh --rust install-check新增runtime小节,check:rust-package校验该小节。- turn / permission / cancel / resume / child-approval PTY 测试解除 macOS 限定,在 Linux 同样运行。
- 新增
scripts/rust-platform-test.py:可复用的"已安装产物"平台运行(install-check、安装/更新/回退、真实 turn、工具审批、取消、恢复),输出含环境信息与未测能力清单的platform-report.json,供 [Grok/dsh 68] Windows 产物与原生终端运行 #200/[Grok/dsh 69] 三平台原生能力验收 #201 复用。 - CI:
rust-platforms.yml新增linux-platform(GitHub 托管主机)与linux-containers(干净容器)两个 job;Changesetrust-linux-prebuilt.md(codsh-cli/codsh-bundlepatch)。
检查(本地 box,Linux x64)
pnpm typecheck、cargo fmt --check通过。pnpm test:110 files passed / 2 skipped;2676 passed / 15 skipped。- 旧版 e2e(pnpm 10):177 passed / 1 skipped。
build+build:rust+check:rust-package+rust-install-test通过。test:rust:791 passed,4 个已知 Linux 失败(2×filesystem_sandbox、voicesubstitute_route…、privacydrafts_stay_local…),与基线一致。- 严格 clippy:仅 2 个已知错误(
filesystem_sandbox.rstail_markerdead code、needless_return)。 - PTY:turn / permission / cancel / resume / child-approval 通过;legacy-home、core-pty 在 Linux 按设计拒绝(仅 macOS)。
真实运行(GitHub Actions,集成提交 a0281ca 本身)
集成运行 Rust platforms #36384180623:全部成功(含 #198 的 3 个 macOS 安装 job)。均为已打包 tarball + 注册表 dsh(测试版本 0.1.5-rc.3),无官方账号、无 Rust 编译环境。
环境 结果 Job Ubuntu 22.04 x64(托管主机,真实 PTY) 安装/更新/回退 + turn/审批/取消/恢复 通过 108807422747 Ubuntu 24.04 x64(托管主机) 通过 108807422790 Ubuntu 22.04 arm64(托管主机) 通过 108807422717 Debian 12 bookworm(干净容器) 通过 108807422788 Debian 13 trixie(干净容器) 通过 108807422744 Fedora 41(干净容器) 通过 108807422742 Debian 11 bullseye(glibc 2.31) 按预期拒绝( glibc)108807422818 Alpine(musl) 按预期拒绝( libc)108807422811 开发期证据运行(
ci/199-linux-d):#36379948605,同样全部成功(Ubuntu 22.04 108797960195、24.04 108797960185、arm64 108797960292、bookworm 108797960288、trixie 108797960273、fedora 108797960422、bullseye 拒绝 108797960277、alpine 拒绝 108797960194)。拒绝提示原文:
- musl:
the prebuilt Linux Rust client needs glibc 2.35 or newer, and this system has no glibc (musl, as on Alpine, is not supported). - 旧 glibc:
this Linux has glibc 2.31; the prebuilt Rust client needs glibc 2.35 or newer. - 缺库:
install the package that provides <lib> (or add its directory to LD_LIBRARY_PATH)→then check again: codsh --rust install-check - 三者均附:
plain \codsh` (the Node.js runtime) keeps working on this machine.`
对照验收标准
- 目标架构/运行库明确(linux-x64、linux-arm64,glibc ≥ 2.35,无 libssl 依赖),在干净系统实际安装运行,而非仅交叉编译。
- 真实 PTY 驱动第一阶段流程(turn、审批、取消、恢复)并正常退出复原;Linux 特有依赖缺失(libc/glibc/共享库)时错误可操作。
- 安装、更新、回退与数据目录策略与 macOS 一致(
~/.codsh-rust,不触碰旧~/.dsh/~/.grok);无需官方账号或 Rust 编译环境。 - 可复用平台运行测试
scripts/rust-platform-test.py+platform-report.json未测能力清单;完整 Linux 功能留给 [Grok/dsh 69] 三平台原生能力验收 #201 最终矩阵。
已记录的差异
- RHEL 9 系(glibc 2.34)、Debian 11、Ubuntu 20.04 不支持(低于 glibc 2.35 下限),均会被明确拒绝。
- "缺失共享库"分支只有单元测试(
rust-artifact.spec.mjs),CI 容器里没有构造真实缺库系统。 - 文件沙箱在 Linux 依赖 bubblewrap,本票未验证,留给 [Grok/dsh 69] 三平台原生能力验收 #201 矩阵。
- 干净容器 job 只跑安装/更新/回退(无 TTY);真实 PTY 流程在 3 个托管主机 job 上运行。
- 未测能力清单(
platform-report.json的untested):系统剪贴板/图片粘贴、麦克风、桌面通知、真实终端模拟器与 tmux/SSH、真实鼠标上报、bubblewrap 沙箱、Wayland/X11 剪贴板与 OSC 52、非 Ubuntu 发行版上的 linux-arm64(交给 [Grok/dsh 69] 三平台原生能力验收 #201);长期压力([Grok/dsh 77] 三平台并发与长期资源压力 #209);真实付费模型([Grok/dsh 71] 固定任务集的真实模型评测 #203)。
未改动
- 未改动
main,未发布包/标签/Release,未改仓库设置或 secrets。 - 草稿分支
ci/199-linux、ci/199-linux-b、ci/199-linux-c、ci/199-linux-d保留未删。
- 原生产物:
Metadata
Metadata
Assignees
Labels
ready-for-agentAgent-grabbable workAgent-grabbable work
Parent
#132
Ticket: 67
Status: ready-for-agent
User Stories: 7, 18, 69(见父规格)
What to build
Linux 用户从预编译产物安装并完成第一阶段 dsh 对话、工具审批、取消和恢复。
Acceptance criteria
Blocked by
Delivery contract
用户于2026-09-20批准当前测试与任务拆分。按父规格的已安装产物/真实终端和公开协议测试验收;实际实现须带适用的文档、Changeset及必要检查。ready-for-agent表示任务已定义,不表示前置任务已完成,也不授权自动开始本轮实施、购买付费资源或发布软件版本。