Repository navigation
test(core): replay post-reflow CUP addressing after narrowing (#29) - #309
Merged
Merged
Conversation
Add a four-stage, one-action direct-Telnet observation that distinguishes whether CUP addressing after narrowing follows the retained (pre-resize) rows or the current reflowed display rows. The fixed body puts a 123-character soft-wrapped line before the target rows, so narrowing shifts later display rows by one while retained rows keep their numbering. The design document records both competing interpretations and their independent expectations before any original run; the exporter can publish either pre-registered target row without choosing a policy. Offline peer, plan and exporter tests only use in-memory/synthetic targets. Co-authored-by: JavaZeroo <[email protected]>
One fixed direct-Telnet WindTerm 2.7.0 run (four stages, one CSI 8;2HQ action) whose body places a 123-character soft-wrapped line before the target rows. Narrowing 91 -> 61 shifts later display rows by one while the retained rows keep their numbering. Result: Q lands on document line 6 (retained rows; the reflowed display row would be 5), DSR 8;3, narrow rect (155,144) and restored (155,126). Strict offline export passed; one original run, no retry. Co-authored-by: JavaZeroo <[email protected]>
) Add reflow_addressing_core, a literal regression gate for the observed sample: four phases (91x20 -> 61x20 -> 91x20, one CSI 8;2HQ), each checked under strict/recovery and whole/bytewise, covering protocol grid, DSR, joined source logical rows and the reflowed display rows/marker positions. 16/16 phases, 0/620 assertions, exit 0; core CTest 35/35. No production source change: screen.hpp bytes are identical to main, so the existing retained-owner plus independent display-projection design already matches the observation. Default Screen::resize and Qt still clip physically; the evidence and docs state that separately. Co-authored-by: JavaZeroo <[email protected]>
This was referenced Nov 3, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题与最终行为
承接 #29(接续 #27 / PR #308):补上正式接线前缺失的关键证据——缩窄使前方行显示重排后,继续 CUP 寻址写入、DSR、光标/文档位置与显示位置的对应关系。
本 PR 新增一个运行前冻结的直接 Telnet 观察切片:固定 WindTerm 2.7.0,
91×20 → 61×20 → 91×20,四阶段,唯一动作CSI 8;2H Q。初始正文在目标行之前写入一条 123 字符软折行,使缩窄后后续显示行整体 +1,而保留的源片段行号不变,从而区分"协议行=保留行"与"协议行=重排显示行"两种解释。实测(一次独立原版运行,严格导出通过):Q 写入文档行 6(保留的缩放前源片段行),不是重排后的显示行 5;DSR
8;3、caret 同口径;窄屏可见矩形 (155,144),恢复后 (155,126)。因此协议/光标/DSR 行号跟随保留行,显示页独立重排,显示行号不能当协议行号。该合同已落地为
reflow_addressing_core字面回归门禁:16/16 阶段、0/620 断言;核心 CTest 35/35。没有生产源码改动(screen.hpp与 main0420137字节一致):现有同 owner 保留 + 独立显示投影已与本原版样本一致,因此只补证据与门禁,不制造实现改动。默认Screen::resize与正式 Qt 仍走物理裁剪,本 PR 不切换、也不豁免 Qt 六阶段 B/CD 失败。验证
原版(
research/ui/results/2026-11-03-reflow-addressing-reference/shrink-reflow-cup.json):2d27000(观察前冻结的协议与预期),10 文件执行源码清单、授权计划 SHA25619006f…、公开 JSON SHA2561bb625…;REA 6.7.0/frida、EXE7b10531d…、4,047 文件清单e459adf2…。job_after.active=0,主动终止原版进程,不声称自然 GUI 退出。离线/core:
结果:11+10 个离线测试通过(不启动原版);
resize_reflow_addressing_test16/16 阶段、0/620 断言、退出 0;核心 CTest 35/35、4.11 s。门禁首跑 12/16 是测试自身阶段 3 预期分支笔误(非产品 RED),修正后 16/16,记录保留在validation.json。性能影响(如适用)
未测量,不声明性能。核心回放与 CTest 的总耗时是测试执行时间,不是性能结果。
来源与限制