Skip to content

[Grok/dsh 67] Linux 产物与基础终端运行 #199

Description

@Blackman99

Parent

#132

Ticket: 67

Status: ready-for-agent

User Stories: 7, 18, 69(见父规格)

What to build

Linux 用户从预编译产物安装并完成第一阶段 dsh 对话、工具审批、取消和恢复。

Acceptance criteria

  • 目标架构和运行库要求明确,实际干净系统可安装,不以交叉编译通过代替可运行证明。
  • 真实 PTY 驱动第一阶段流程与退出复原,Linux-specific 依赖缺失时错误可操作。
  • 安装、更新、回退及数据目录策略在 Linux 一致;无需官方账号或 Rust 编译环境。
  • 建立可供后续功能复用的平台运行测试,保留未测能力清单,完整 Linux 功能由最终矩阵验收。

Blocked by

Delivery contract

用户于2026-09-20批准当前测试与任务拆分。按父规格的已安装产物/真实终端和公开协议测试验收;实际实现须带适用的文档、Changeset及必要检查。ready-for-agent表示任务已定义,不表示前置任务已完成,也不授权自动开始本轮实施、购买付费资源或发布软件版本。

Activity

  1. Blackman99 commented on Sep 28, 2026

    @Blackman99
    OwnerAuthor

    已集成: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;Changeset rust-linux-prebuilt.md(codsh-cli / codsh-bundle patch)。

    检查(本地 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、voice substitute_route…、privacy drafts_stay_local…),与基线一致。
    • 严格 clippy:仅 2 个已知错误(filesystem_sandbox.rs tail_marker dead 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 最终矩阵。

    已记录的差异

    未改动

    • 未改动 main,未发布包/标签/Release,未改仓库设置或 secrets。
    • 草稿分支 ci/199-linux、ci/199-linux-b、ci/199-linux-c、ci/199-linux-d 保留未删。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions