Skip to content

Commit 40c209b

Browse files
committed
feat: activate the latest d2x release and verify legacy upgrades
1 parent d56322e commit 40c209b

15 files changed

Lines changed: 65 additions & 21 deletions

File tree

‎.agents/docs/2026-10-20-d2x-d2mcpp-first-use-plan.md‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# d2x 与 d2mcpp 最新版联动及首次启动优化方案
22

3-
日期:2026-10-20。状态:待 review,仅提交方案;未修改运行代码、版本 pin 或包索引。
3+
日期:2026-10-20。状态:已进入实现与发布。原设计和调研快照保留于第 1–8 节,第 9 节记录实际验收;最终状态以链接的 PR、Release 和 CI 为准。
44

55
## 1. 建议与边界
66

@@ -75,7 +75,7 @@ Provider stdout 保留协议解析;子进程 stderr 实时独立读取并呈
7575

7676
### 4.1 公开入口使用最新稳定版
7777

78-
README 三种语言维持简洁流程,但显式在工具安装前更新索引:`xlings update` → `xlings install d2x mcpp -y`。实施时使用已安装旧版的场景验证该命令是否会选择最新版本;若实际需要更新/切换命令,以 xlings 当前支持的命令修正流程。
78+
README 三种语言维持简洁流程,但显式在工具安装前更新索引:`xlings update` → `xlings install --use d2x@latest mcpp@latest -y`。实施时使用已安装旧版的场景验证该命令是否会选择最新版本;若实际需要更新/切换命令,以 xlings 当前支持的命令修正流程。
7979

8080
课程下载后必须安装课程 `.xlings.json` 声明的依赖,并在运行前确认实际版本。优先让 `d2x install` 在现有课程安装机制内完成该步骤;先核实 xlings 课程配方是否已经负责安装,避免重复下载或循环调用。不要仅在 CI 里增加隐藏准备步骤而让用户命令仍运行旧版本。
8181

@@ -143,3 +143,21 @@ latest 检查与候选 pin 验收分开:定时/main job 对比稳定 Release
143143
- [此前 mcpp 升级方案](2026-10-19-mcpp-upgrade-and-first-run-plan.md):保留历史记录,本方案更新 d2x 版本与冷启动策略。
144144

145145
本次未执行新的 Windows 复现、跨平台运行或候选产物验收;所有新增字段、事件和行为均为待实现设计,不代表当前 Release 已支持。
146+
147+
148+
## 9. 实现与联动验收记录
149+
150+
- d2x [PR #39](https://github.com/d2learn/d2x/pull/39) 已通过自我 review 并 squash 合入,提交 `9066e6a2554ad86fe8e1d6eecf8d359946ca48ec`。发布版本为 `2026.10.20.2`。
151+
- d2x [原生 CI](https://github.com/d2learn/d2x/actions/runs/39441449900) 六个作业全部通过:Linux 静态分发、macOS 14/15 ARM64、Windows 2022/2025、真实 Linux 课程冒烟。包括独立启动期限、stderr 隔离、大输出、部分结果后失败、进程树清理、依赖安装失败、原有协议 e2e 和 28 个 session 断言。
152+
- d2mcpp [候选产物联动 CI](https://github.com/mcpp-community/d2mcpp/actions/runs/39443060283) 十个首次使用作业全部通过,README/cold 分开,覆盖无编译器 Linux、macOS ARM64、Windows 2022/2025 和无 MSVC。每个作业检查候选 checkout SHA `3f56f74efe63837f450d7b101ab7588c639a36c3` 与二进制 SHA256;该候选覆盖是显式的,不冒充公开安装已更新。
153+
- 本地 Ubuntu 20.04 普通用户隔离容器:全新 MCPP_HOME,使用静态候选,首次 session 99.2 秒、首题 103.3 秒;保存、通过、推进、重启恢复及重复 setup 保留进度均通过;solutions 为 52/52。原始日志保留在执行机器 `/tmp/d2mcpp-startup-local/run.log`。本地另验证 print/TUI 准备与错误显示,以及交互配置保留两种期限。
154+
- [独立 Windows 取证](https://github.com/mcpp-community/d2mcpp/actions/runs/39442502584) 将 build、直接 run、旧版 checker 分成独立空 home:直接 `mcpp run -q ... describe` 约 24.9 秒正常返回;旧 checker 仍触发 120 秒静默超时。此前另一份独立 build 为 34.5 秒。说明不能把旧故障简单归为编译耗时;候选验收必须覆盖真正 checker 链路。
155+
- README 的公开工具安装现在位于仓库外的空目录,防止祖先项目配置影响版本解析;版本快照在安装器实际运行的 shell 内记录。进入课程后检查实际工具版本;预发布候选单独校验来源和哈希。`d2x install` 安装课程声明的项目依赖,失败不打印就绪。
156+
- 自我 review 重点:准备提示不刷新总期限;stderr 不能伪造协议;部分事件后失败不推进;Windows 无法建立 Job Object 时拒绝启动;输出洪流不能饿死期限检查;真实发布版还要经过 xlings 安装与课程完整 CI 验证。
157+
158+
- 旧环境补测发现 bare install 保留旧版,`@latest` 单独使用也不会必然激活已安装的新版;公开命令已改为 `xlings install --use d2x@latest mcpp@latest -y`。升级矩阵显式从八月版 d2x/mcpp 开始;三个平台的 latest 检查会先激活八月版,再验证最新版安装与切换。
159+
160+
- [d2x 2026.10.20.2](https://github.com/d2learn/d2x/releases/tag/v2026.10.20.2) 已发布,tag 指向上述 squash 提交;[发布工作流](https://github.com/d2learn/d2x/actions/runs/39443965654) 四个作业通过。上游、[GitHub RES](https://github.com/xlings-res/d2x/releases/tag/2026.10.20.2) 和 GitCode RES 的三平台压缩包、SHA256 sidecar 全部下载并验证逐字节一致;Linux 无 INTERP/NEEDED,实际版本正确。
161+
- [包索引 PR #1013](https://github.com/openxlings/xim-pkgindex/pull/1013) 的三平台安装、索引注册、生命周期等检查通过后 squash 合入 `88af0a08556d807b4338ac5f3603f26e4537c662`;[公开索引发布](https://github.com/openxlings/xim-pkgindex/actions/runs/39445523430) 成功,滚动指针 source_commit 已核对。
162+
163+
课程改动由 [PR #94](https://github.com/mcpp-community/d2mcpp/pull/94) 承载。课程固定 2026.10.20.2;最终验收继续检查真实 xlings 安装版、旧环境升级和 Dev Container,不以候选产物结果代替。

‎.github/workflows/fresh-install.yml‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,28 @@ jobs:
266266

267267
latest-stable:
268268
if: github.ref == 'refs/heads/main' && inputs.candidate_run == ''
269-
runs-on: ubuntu-24.04
269+
runs-on: ${{ matrix.os }}
270+
strategy:
271+
fail-fast: false
272+
matrix:
273+
os: [ubuntu-24.04, macos-14, windows-2025]
270274
steps:
271275
- uses: actions/checkout@v4
272-
- run: bash scripts/install-xlings.sh
276+
- name: Install xlings (Unix)
277+
if: runner.os != 'Windows'
278+
run: bash scripts/install-xlings.sh
279+
- name: Install xlings (PowerShell 5.1)
280+
if: runner.os == 'Windows'
281+
shell: powershell
282+
run: ./scripts/install-xlings.ps1
273283
- name: Check stable release, public latest and course pin
274-
run: python3 scripts/ci/latest.py
284+
shell: bash
285+
env:
286+
GH_TOKEN: ${{ github.token }}
287+
run: ${{ runner.os == 'Windows' && 'python' || 'python3' }} scripts/ci/latest.py
275288
- uses: actions/upload-artifact@v4
276289
if: always()
277290
with:
278-
name: latest-stable-versions
291+
name: latest-stable-versions-${{ matrix.os }}
279292
path: .d2x/ci-logs/
280293
include-hidden-files: true

‎.xlings.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"workspace": {
3-
"d2x": "2026.10.20.1",
3+
"d2x": "2026.10.20.2",
44
"mdbook": "0.4.43",
55
"mcpp": "2026.10.17.1"
66
}

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Install [xlings](docs/environment.md#install-xlings), reopen your terminal, then
4949

5050
```bash
5151
xlings update
52-
xlings install d2x mcpp -y
52+
xlings install --use d2x@latest mcpp@latest -y
5353
```
5454

5555
**2. Get the course**

‎README.zh.hant.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
```bash
5151
xlings update
52-
xlings install d2x mcpp -y
52+
xlings install --use d2x@latest mcpp@latest -y
5353
```
5454

5555
**第二步:取得課程**

‎README.zh.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
```bash
5151
xlings update
52-
xlings install d2x mcpp -y
52+
xlings install --use d2x@latest mcpp@latest -y
5353
```
5454

5555
**第二步:获取课程**

‎book/en/src/base/chapter_1.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ git clone https://github.com/mcpp-community/d2mcpp.git
2121
cd d2mcpp
2222
```
2323

24-
**2. Prepare the environment.** These scripts install xlings **2026.10.18.1**, the versions in `.xlings.json` (mcpp **2026.10.17.1**, d2x **2026.10.20.1**, mdBook **0.4.43**), and build and check the Provider. The first build may take several minutes.
24+
**2. Prepare the environment.** These scripts install xlings **2026.10.18.1**, the versions in `.xlings.json` (mcpp **2026.10.17.1**, d2x **2026.10.20.2**, mdBook **0.4.43**), and build and check the Provider. The first build may take several minutes.
2525

2626
Linux / macOS:
2727

@@ -60,7 +60,7 @@ Then, on either system:
6060

6161
```text
6262
xlings update
63-
xlings install d2x mcpp -y
63+
xlings install --use d2x@latest mcpp@latest -y
6464
d2x install d2mcpp
6565
cd d2mcpp
6666
```

‎book/en/src/changelog.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
**d2x upgrade and cold-start diagnostics**
1414

15-
Upgrade d2x and verify the selected executable; bound first Provider startup separately, show preparation and retain raw logs.
15+
Upgrade d2x to 2026.10.20.2 and verify the selected executable; bound first Provider startup separately, show preparation and retain raw logs.
1616

1717
- `Book`: [zh](https://mcpp-community.github.io/d2mcpp/base/chapter_1.html) / [en](https://mcpp-community.github.io/d2mcpp/en/base/chapter_1.html) - 2026/10/20
1818
- `Code`: [first-use CI](https://github.com/mcpp-community/d2mcpp/blob/main/.github/workflows/fresh-install.yml) - 2026/10/20

‎book/src/base/chapter_1.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ git clone https://github.com/mcpp-community/d2mcpp.git
2121
cd d2mcpp
2222
```
2323

24-
**第二步:准备环境。** 脚本安装 xlings **2026.10.18.1** 及 `.xlings.json` 声明的版本(mcpp **2026.10.17.1**、d2x **2026.10.20.1**、mdBook **0.4.43**),构建并检查 Provider。首次构建可能需要几分钟。
24+
**第二步:准备环境。** 脚本安装 xlings **2026.10.18.1** 及 `.xlings.json` 声明的版本(mcpp **2026.10.17.1**、d2x **2026.10.20.2**、mdBook **0.4.43**),构建并检查 Provider。首次构建可能需要几分钟。
2525

2626
Linux / macOS:
2727

@@ -60,7 +60,7 @@ $env:Path = "$env:USERPROFILE\.xlings\subos\current\bin;$env:Path"
6060

6161
```text
6262
xlings update
63-
xlings install d2x mcpp -y
63+
xlings install --use d2x@latest mcpp@latest -y
6464
d2x install d2mcpp
6565
cd d2mcpp
6666
```

‎book/src/changelog.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
**d2x 最新版联动与冷启动诊断**
1414

15-
升级 d2x,核对实际执行版本;首次 Provider 构建单独限时,显示准备进度并保留原始日志。
15+
升级 d2x 至 2026.10.20.2,核对实际执行版本;首次 Provider 构建单独限时,显示准备进度并保留原始日志。
1616

1717
- `Book`: [zh](https://mcpp-community.github.io/d2mcpp/base/chapter_1.html) / [en](https://mcpp-community.github.io/d2mcpp/en/base/chapter_1.html) - 2026/10/20
1818
- `Code`: [first-use CI](https://github.com/mcpp-community/d2mcpp/blob/main/.github/workflows/fresh-install.yml) - 2026/10/20

0 commit comments

Comments
 (0)