Skip to content

core: 封存行存储、结构只经 owner 发布 (#169) - #172

Merged
JavaZeroo merged 1 commit into
mainfrom
feat/seal-line-storage-r169
Oct 29, 2026
Merged

JavaZeroo merged 1 commit into
mainfrom
feat/seal-line-storage-r169

Conversation

@JavaZeroo

Copy link
Copy Markdown
Owner

本片交付

首片(#170,85eb5a0)给了 publish/locate/order_revision,但 Screen::lines/history 仍公开,绕过发布口的写入仍会留下陈旧 rank。本片把这条路径关掉:

  • 存储私有化:lines/history 移入 private,新增只读口 visible_lines()/history_lines()/history_size();结构只经 resize/newline/activate_buffer/publish/restore_frame 改变。
  • 移除逃生口:mark_order_unknown() 在存储私有后没有调用者,删掉,避免“看得到但没人该用”的旁路。
  • 调用方迁移:23 文件 / 363 处只读访问改经只读口;selection_test 3 处身份替换与 r164 乱序夹具改经 publish();measure/render/trace/shell 场景与 Qt 源码同步。
  • 真实 caller:ShellWindow::search_overlay 的可见范围裁剪与逐行覆盖由数值 ID 比较改为文档 rank(view.viewport.top + row + TextDocument::index_of)。

r164 冻结研究树(experiments/core/line_order,由 prepare.py 用固定源码再生)不随主线迁移:它对照的是冻结的旧 screen.hpp,改动会破坏可复现性。

验证(本机,隔离 worktree)

  • 默认 Release 全量构建 exit 0,/W4 无告警输出。
  • 核心 CTest 8/8;扩展快测 20/20(core/recovery/binary_paths/text_actions/keyboard/paste/clipboard_policy/text_action_policy/presentation/measure/scenario_tick_gate/transport_completion 等)。
  • candidate_terminal.cpp 以 /W4 /std:c++17 独立编译 exit 0(本机未启用候选适配器;链接与运行由本 PR 的 alacritty-headless 作业复核)。
  • Qt 三处只读访问已迁移;Qt 目标未在本机构建,由 qt-cpp-windows 作业复核。

证据:README · validation.json

明确未做

Refs #169

…h refs #169

Screen::lines/history become private with read-only accessors; mark_order_unknown is removed because no bypass write exists any more. 23 files migrate 363 read sites, test fixtures and the r164 probe publish through publish(), and the Find overlay crops by document rank instead of numeric identity.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-29T08:51:13.973245Z 8924478 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant