Skip to content

Commit be3f8a8

Browse files
authored
docs(changelog): the status-line probe entry no longer says the row draws nothing (#21)
The Added entry for scripts/tui_pty/status_line_probe.py said that the row draws nothing with the Python agent. #19 changed that, and the Changed entry of the same release says so. The release page would have shown both. The entry now says what the probe found when it was written and what it checks now. I searched the [0.5.0] section for other lines that #18 or #19 made old, with these words: export, status_line, status row, session_status, resume_matrix, GAP, probe, tui_pty. This was the only one. The release notes grow from 49,429 B to 49,640 B (awk program of release.yml). The plan and the execution log have the new number.
1 parent 6b56286 commit be3f8a8

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2626
- **A call graph of the TUI workspace (`scripts/tui_callgraph.py`)**: it reads the Rust source as text, so it needs no `cargo` and no network, and it gives the same answer on Windows, Linux and macOS. `crates` shows the dependency closure of the product crates (78 crates in the workspace, 74 in the closure; `--without pi-shell` shows what only `pi-shell` keeps alive). `units` shows, for one or more crates, the modules that no live code refers to; `--ban` asks what dies if a module goes. `keep` writes `docs/baselines/tui-support.md`, which replaces the hand-written list of examples of what the support crates keep. It says: 305,581 lines of non-test code in the 7 support crates, and 17 modules (6,190 lines, 4,339 of them in `pi-hooks`) that no live code refers to. A module on that list is a candidate for deletion, not proof, so the list was checked with the compiler. In a copy of `tui/`, 16 of the 17 modules were deleted, and `cargo check` passed (also `cargo check --workspace --tests`, after the test file of the removed `pi-hooks` modules went too). The 17th, `types::error` in `pi-tools`, cannot go: it holds the `impl From<…> for ToolError` that `?` calls, and no path names it. The tool marks such modules "check first". The first version listed 21 modules and 4 of them were live: it did not see a path inside an attribute string (`serde(with = "crate::util::serde_base64")`) or a path that starts at a child module. Both are fixed. 39 tests; each of 17 changes made to the tool makes a test fail. Nothing was deleted from `tui/` (plan item D.8; execution log section 10.14).
2727
- **A check that `tui/THIRD-PARTY-NOTICES` matches the dependencies (`scripts/tui_notices.py`)**: the file came from the upstream project and did not follow `Cargo.lock`. `check` finds the packages that ship in `zypi` (the normal and build dependencies of `pi-pager-bin`, for five target triples, from crates.io, git or `tui/third_party/`) and exits 1 if an entry is missing or stale. `update --write` fixes the file: it removes stale entries, adds missing ones and leaves the hand-written parts and the license texts alone. The license wording of a new entry is copied from the entries with the same SPDX expression; a package with no such entry is listed as `needs review`. First run: 222 stale entries removed (packages that are not in the binary) and 44 missing entries added, so there are 989 entries for 989 packages, and the file went from 18,898 to 16,548 lines. None of the 44 needed review. This matches the file to `Cargo.lock`. It is not a legal review: nobody has read the copied wording one entry at a time. `check` needs `cargo`. 62 tests.
2828
- **A network audit of `zypi` (`scripts/tui_pty/net_audit.py`, Linux)**: it runs `zypi` in a pseudo-terminal, plays one turn, and reads the sockets of `zypi` and of every process below it about every 9 ms (`/proc/<pid>/fd` joined with `/proc/<pid>/net/{tcp,tcp6,udp,udp6}`). `zypi` must hold no connection to a non-loopback address and must listen on none. With the real model, the agent must hold such a connection (the positive control: it shows that the sampler can see a connection). Result: 13 of 13 checks with the mock LLM; 13 of 13 with the whole process tree in an empty network namespace (`--no-network`, `bwrap --unshare-net`), and the turn still ends normally; 13 of 13 for one turn with the real model of the machine. The output names no host, address or key, and the key goes to the agent through an environment variable only. A connection that opens and closes between two samples is not seen.
29-
- **A probe for the status line (`scripts/tui_pty/status_line_probe.py`, `status_proxy_agent.py`, Linux)**: it shows that `[ui.status_line]` (`type = "command"` or `"builtin"`) draws nothing with the Python agent, and that the command script is not run. The row is built from a `session_status` notification that only the old Rust agent sent. `status_proxy_agent.py` runs the real agent and adds that one notification after each turn; with it, both types draw the row (4 of 4 runs). What to do about it is plan decision 15.
29+
- **A probe for the status line (`scripts/tui_pty/status_line_probe.py`, `status_proxy_agent.py`, Linux)**: it starts `zypi` on a pseudo-terminal and looks at the row of `[ui.status_line]` (`type = "command"` or `"builtin"`). When it was written, it showed that nothing was drawn with the Python agent and that the command script was not run, because the row came from a `session_status` notification that only the old Rust agent sent (4 of 4 runs). `status_proxy_agent.py` runs the real agent and adds that one notification after each turn, as a stand-in for an agent that sends a status. The row is drawn now (see **Changed**), and the probe checks that: the row is on the screen, and a script gets the facts and no invented number.
3030
- **`/model` works through ACP session config options (`pi-agent-cli`, TUI)**: the agent answers `session/new`, `load` and `resume` with `configOptions`, one select option with the id `model`. `[model]` in `agent.toml` is the first choice, and each `[[models]]` table adds one more (`agent.example.toml` has an example). The client changes the model with `session/set_config_option`. The choice goes into the session as a `model_change` entry, and `load` and `resume` bring it back. `zypi` reads the choices from `configOptions`, and uses `session/set_model` only for an agent that publishes none.
3131
- **A prebuilt `zypi` for macOS on Apple silicon (TUI)**: the release has `zypi-macos-arm64` next to `zypi-linux-x86_64`. The release workflow builds it on a `macos-14` runner. It is not signed with a Developer ID and it is not notarized, and nobody has started this build yet: CI only builds it (see Known issues). If macOS refuses to open a file that a browser downloaded, remove the quarantine flag with `xattr -d com.apple.quarantine <file>`. The install steps are in `docs/TUI-AND-CODE-AGENT.md`.
3232

‎docs/PLAN/PLAN-RUST-AGENT-RUNTIME-REMOVAL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ r12 续 8(2026-10-13):PR [#18][pr-18](决策 6,`zypi export`)与 PR
4848
2. **再量一次 release 体积。** 手动触发 `TUI CI` 的 `release_baseline`(约 30 分钟),把结果回填 [`docs/baselines/tui.md`](../baselines/tui.md)。条件:Linux 的 `zypi` 不大于 v0.4.0 的 470,461,776 B。上一次是 r5 的 422,034,120 B;#7 合入之后 `tui/` 又合入 5 个提交(#8、#9、#10、#12、#13):115 个文件,+4,481 / −16,045 行。**结果(r12)**:[run 38221952524][run-baseline],在 `4fc028a` 上:**420,767,096 B**(比 v0.4.0 小 10.6 %,比 r5 小 1,267,024 B),构建 1,195 s(v0.4.0:1,647 s),`--version` 中位数 23.4 ms。条件满足,数字已回填 [`docs/baselines/tui.md`](../baselines/tui.md)。之后 `tui/` 又合入了 #18、#19,所以在合入后的树上又量了一次。**结果(r12 续 8)**:[run 38353042677](https://github.com/zy1233/pi-python/actions/runs/38353042677),在 `1fa18cf` 上:**420,667,200 B**(401.2 MiB,比 v0.4.0 小 10.6 %,比 r12 开头的 420,767,096 B 小 99,896 B),构建 1,194 s(19 m 54 s),`--version` 中位数 22.9 ms。条件满足,数字已回填 [`docs/baselines/tui.md`](../baselines/tui.md)。`tui/` 的树与要打 tag 的提交相同(之后只改文档;打 tag 前再核对一次)。
4949
3. **发布构建演练。** `release.yml` 只在 `v*` tag 上触发,没有手动入口;macOS arm64 的 job(2026-10-01 加的)从来没有在发布里跑过。`github-release` 等它,`publish-pypi` 不等:它失败时,PyPI 上的包已经发出,GitHub 上没有 Release。Linux CI 编不到 macOS 专属的代码:`tui/crates` 里 75 个文件带 `cfg(target_os = "macos")`,最后一次在 macOS 上构建是 r7,之后 `tui/` 改了 88 个文件,其中 8 个带这样的代码。v0.3.0 的发布工作流跑了三次才通过。做法:给 `release.yml` 加 `workflow_dispatch`,构建 job 照跑并上传产物,`publish-pypi` 与 `github-release` 只在 tag 上跑。这改的是发布工作流,所以先问了用户:用户同意了(r12),PR [#14][pr-14] 就是这一改,已合入(`0efd400`)。两个发布 job 的 `if` 不只看 ref,还要求事件是 `push`,因为手动运行可以把一个 tag 当作 ref。条件:Linux 与 macOS arm64 的 `release-dist` 构建、六个 Python 包的构建都成功。**结果(r12)**:演练 [run 38223353755][run-dry-run] 从 PR 分支 `ci/release-dry-run`(`04cea48`)手动触发;GitHub 接受了分支上的 `workflow_dispatch`,不用先合入 `main`。结果:成功,共 27 分钟。测试 97 s,Python 包的构建 29 s,Linux x86_64 的 `release-dist` 构建 16 m 26 s,macOS arm64 的 `release-dist` 构建 25 m 27 s;`publish-pypi` 与 `github-release` 跳过,没有发布任何东西。三个产物(`dist`、`tui-binary`、`tui-binary-macos-arm64`)保留到 2027-01-10。macOS 的 job 第一次在发布工作流里跑,它编译的 `cfg(target_os = "macos")` 代码 Linux 的 CI 编译不到,现在通过了。**没有验证**:没有人运行过那个 macOS 二进制,我也没有下载它(试过 `gh run download`,太慢,见 [§10.15][l10-15]);`if` 为真的一侧(tag 的 `push`)要等真正的 tag 才跑得到。**再跑(r12 续 8)**:[run 38353038777](https://github.com/zy1233/pi-python/actions/runs/38353038777) 在 `1fa18cf` 上:成功,共 30 分钟 46 秒。测试 2 m 19 s,Python 包的构建 25 s,Linux x86_64 的 `release-dist` 构建 15 m 07 s,macOS arm64 的 `release-dist` 构建 28 m 12 s;`publish-pypi` 与 `github-release` 跳过,没有发布任何东西。三个产物(`dist`、`tui-binary`、`tui-binary-macos-arm64`)保留到 2027-01-11。macOS 的构建又通过了,所以 #18、#19 的 Rust 改动在 macOS 上能编译;仍然没有人在 macOS 上运行过这个二进制。
5050
4. **与 v0.4.0 对照。** 用 `scripts/tui_pty/` 的 `smoke.py`、`exit_matrix.py`、`resume_matrix.py`、`mode_probe.py`(都有 `--zypi PATH`)和同一个 Python agent,分别跑 v0.4.0 的 `zypi-linux-x86_64` 与新构建,比较结果。有差别的,要么在 `CHANGELOG.md` 里有一条,要么是缺陷。只在 Linux(WSL2)上做。**结果(r12)**:用户决定不做,V0.5 不等它。所以「已知问题」里的各项哪些 v0.4.0 就有,仍是推断,没有测量。
51-
5. **发布说明。** 发布页的正文只取 `CHANGELOG.md` 里与 tag 同版本的一段,所以:把 `[Unreleased]` 并进 `[0.5.0]`,日期改成发布日(现在是 2026-10-02);补上 `CHANGELOG.md` 里还没有的条目——Rust runtime 的删除与随之删掉的界面和命令(r3、r5)、`/model` 经 ACP `configOptions` 恢复(r3)、`-p` 在要求沙箱时拒绝运行(r5)、品牌清理(r6);写「已知问题」(下);用 `release.yml` 里同一段 `awk` 在本地预览。`docs/TUI-AND-CODE-AGENT.md` 只写了 Linux x86_64 有预编译二进制;`zypi-macos-arm64` 随版本发的话要补上。**状态(r12)**:PR [#15][pr-15] 把 `[Unreleased]` 并进了 `[0.5.0]`,补了 20 条(Added 2、Changed 2、Removed 2、Fixed 6、已知问题 8),日期写 2026-10-12(打 tag 那天不是这天,就改)。用 `release.yml` 里那段 `awk` 预览过(Git for Windows 的 `awk`,输入是 LF 文本):正文 45,076 B,五个分组。演练成功之后,PR [#15][pr-15] 又加了 `zypi-macos-arm64` 的条目(Added),并改了 `README.md` 与 `docs/TUI-AND-CODE-AGENT.md`:三处都写明这个二进制由 CI 构建,没有人运行过。PR [#17][pr-17] 再加 1 条 Changed(版本号,见决策 16),并去掉 1 条已知问题;那之后正文是 45,855 B。PR [#15][pr-15](`59545c1`)与 PR [#17][pr-17](`d57fd9b`)都已合入。**状态(r12 续 8)**:续 8 的文档提交把 #18、#19 的两条(Fixed 1、Changed 1)并进 `[0.5.0]`,删掉 `zypi export` 的已知问题,把 `[ui.status_line]` 的那条改窄(agent 不告诉 `zypi` 上下文与费用,这两项仍然空),日期改成 2026-10-13(打 tag 那天)。现在 `[0.5.0]` 有 Added 16、Fixed 32、Changed 14、Removed 2、已知问题 6 条;用同一段 `awk` 预览(输入是 LF 文本):正文 49,429 B,五个分组。
51+
5. **发布说明。** 发布页的正文只取 `CHANGELOG.md` 里与 tag 同版本的一段,所以:把 `[Unreleased]` 并进 `[0.5.0]`,日期改成发布日(现在是 2026-10-02);补上 `CHANGELOG.md` 里还没有的条目——Rust runtime 的删除与随之删掉的界面和命令(r3、r5)、`/model` 经 ACP `configOptions` 恢复(r3)、`-p` 在要求沙箱时拒绝运行(r5)、品牌清理(r6);写「已知问题」(下);用 `release.yml` 里同一段 `awk` 在本地预览。`docs/TUI-AND-CODE-AGENT.md` 只写了 Linux x86_64 有预编译二进制;`zypi-macos-arm64` 随版本发的话要补上。**状态(r12)**:PR [#15][pr-15] 把 `[Unreleased]` 并进了 `[0.5.0]`,补了 20 条(Added 2、Changed 2、Removed 2、Fixed 6、已知问题 8),日期写 2026-10-12(打 tag 那天不是这天,就改)。用 `release.yml` 里那段 `awk` 预览过(Git for Windows 的 `awk`,输入是 LF 文本):正文 45,076 B,五个分组。演练成功之后,PR [#15][pr-15] 又加了 `zypi-macos-arm64` 的条目(Added),并改了 `README.md` 与 `docs/TUI-AND-CODE-AGENT.md`:三处都写明这个二进制由 CI 构建,没有人运行过。PR [#17][pr-17] 再加 1 条 Changed(版本号,见决策 16),并去掉 1 条已知问题;那之后正文是 45,855 B。PR [#15][pr-15](`59545c1`)与 PR [#17][pr-17](`d57fd9b`)都已合入。**状态(r12 续 8)**:续 8 的文档提交把 #18、#19 的两条(Fixed 1、Changed 1)并进 `[0.5.0]`,删掉 `zypi export` 的已知问题,把 `[ui.status_line]` 的那条改窄(agent 不告诉 `zypi` 上下文与费用,这两项仍然空),日期改成 2026-10-13(打 tag 那天)。现在 `[0.5.0]` 有 Added 16、Fixed 32、Changed 14、Removed 2、已知问题 6 条;用同一段 `awk` 预览(输入是 LF 文本):正文 49,640 B,五个分组。预览之后又查了 `[0.5.0]` 里有没有被 #18、#19 改成过时的条目(查过的词:`export`、`status_line`、`status row`、`session_status`、`resume_matrix`、`GAP`、`probe`、`tui_pty`),找到一条并改了:Added 里状态行探针那条还写着 Python agent 下什么也不画,现在写成「写的时候是这样,现在画得出来,探针查的是这个」(没改之前正文是 49,429 B)。
5252
6. **打 tag。** 先前约定归用户;用户在 r12 续 8 让我来打,并说不用再重复本地测试,所以 `pre-push-ruff` 要求的本地 pytest(Windows 与 WSL)这次没有跑,只跑了 ruff;pytest 由 `CI`(Linux,Python 3.11–3.13)与 `Release` 的 `test` job 跑。`git tag -a v0.5.0`(v0.3.0、v0.4.0 的 tag 是带注释的)、`git push origin v0.5.0`;再核对 Release 的运行:PyPI 上六个包(核心、harness、cli 是 0.5.0,三个扩展包是 0.2.0),GitHub Release 上的 wheel、sdist 与 `zypi-*` 二进制。
5353

5454
**带着发布的已知问题**,除非用户在打 tag 之前决定。用户在 r12 续 5 定了决策 6 与 15,8 与 14 仍待定。6 与 15 各做成了一个 PR(r12 续 6、续 7;15 在复核后从 (a) 改成了 (b))。用户在续 8 让它们合入并进 V0.5:PR [#18][pr-18]、[#19][pr-19] 已合入 `main`,所以 `zypi export` 的一条已经删掉,`[ui.status_line]` 的一条改窄了(`CHANGELOG.md` 的已知问题同步改了)。决策 16 已做并已合入(PR [#17][pr-17],`d57fd9b`),所以「已知问题」里没有版本号一条。

0 commit comments

Comments
 (0)