diff --git a/docs/research/r29-bcd-local-addressing-decision.md b/docs/research/r29-bcd-local-addressing-decision.md index 0df28b28..32ca3fe6 100644 --- a/docs/research/r29-bcd-local-addressing-decision.md +++ b/docs/research/r29-bcd-local-addressing-decision.md @@ -77,6 +77,8 @@ ADR-0010 的确认覆盖:resize 不物理裁剪正文、历史/显示投影/ **2026-11-05 执行结果**:计划 `windterm-bcd-address-pre-write-v1` 已冻结并由调度者授权一次运行;实际初始 NAWS 为 **80×25**(非目标 80×24),控制器在 `fixed initial grid differs` 停止,未发送 B/C/D、未产生写前/写后端点,严格导出未运行。失败身份、计划/attempt 哈希与精确阻塞见[失败记录](../../research/ui/results/2026-11-06-resize-bcd-address-pre-write-failed/README.md);同一计划不重放,也未据此选择 A/B/C。下面是原计划的目标与区分力,保留为下一次新计划的设计依据。 +**2026-11-09 恢复进展(blocked)**:主机重新可达后完成严格身份核验;`1228×839` 初始窗口实测为 **80×24**,但固定 `988×509` 的 `60×12` resize 在校准 peer 报 `Resize changed row count`,仅 phase0 完成。未发送 B/C/D 正文,未执行原 v2 正式重试;旧 plan/marker 未变。一次校准计划 SHA `954636ee…`,详见[恢复记录](../../research/ui/results/2026-11-09-bcd-recovery/README.md)。解除条件:另一次授权的 60×12 校准/诊断解释该错误并成功,之后才可冻结 v2。 + **固定问题**:WindTerm 2.7.0 在同一轮 `80×24→60×12` 主屏会话中,缩高后、写入前的正文/滚动/DSR 是什么;随后固定 `CUP 12;1+marker+DSR` 的 marker 落在保留源的哪一行、显示在哪一行。 - 唯一计划 `windterm-bcd-address-pre-write-v1`,一次授权运行;固定窗口请求 `80×24→60×12`,先写稳定 B/C/D,resize 后**不写入**先读快照,再仅发送固定 CUP/marker/DSR;不重跑、不补写。 diff --git a/research/ui/results/2026-11-09-bcd-recovery/ACTION-BUDGET.md b/research/ui/results/2026-11-09-bcd-recovery/ACTION-BUDGET.md new file mode 100644 index 00000000..bb1af60f --- /dev/null +++ b/research/ui/results/2026-11-09-bcd-recovery/ACTION-BUDGET.md @@ -0,0 +1,26 @@ +# B/CD 恢复:预写动作预算与停止条件(2026-11-09) + +## 授权与基线 + +- 原恢复授权:issue #29 comment 6666471726;同一故障 `bcd-prewrite-initial-grid-80x25-v1` 已有一次已登记恢复,主机离线期间校准/v2 未运行,`executedOriginalRetries=0`。 +- 当前 main 参考 `31a999249e8fb3eccc80f2e95dbf8b3d7782e28c`;不改旧 plan/attempt/raw。 +- 严格 SSH 主机身份校验;不绕过 known_hosts,不重启主机/服务,不改电源,不触碰个人桌面。 + +## 阶段与动作预算(只读 + 一次几何校准) + +1. **身份/可达(只读,最多 8 条远程命令/查询)**:SSH 登录、hostname、uname、当前用户、虚拟化/VM 标记、guest 会话标识。任一不符(host key、登录、专用 VM/guest、执行源身份)即停止。 +2. **环境身份(只读,最多 10 条)**:固定 WindTerm 2.7.0 EXE/路径/SHA-256、原版执行源/计划/attempt 存在性、显示器/DPI/字体/窗口设置、旧 attempt 失败记录。不得修改或重录旧文件。 +3. **几何校准(最多 1 次有界会话,≤6 个动作)**:仅调整专用 VM 显示区域/窗口矩形以测得实际网格;只读 NAWS/窗口矩形/网格,不发送 B/C/D/CUP 正文。记录前后显示设置并恢复;失败即停,不滚动增加预算。 +4. **仅在校准成功后**:冻结新 v2 计划、执行源、环境身份与一次性 `.attempted` 守卫;执行原来尚未使用的唯一正式重试。任何身份/校准失败均不进入此阶段。 + +## 停止条件 + +- host key 不匹配、SSH 登录失败、非专用取证 VM/guest、WindTerm 2.7.0/执行源不符。 +- 旧 plan/attempt/raw 已被改写或 `.attempted` 已存在(v2 尚未执行时只记录,不重复)。 +- 校准超过 1 次会话/6 动作仍未得到 80×24,或无法记录/恢复显示区域。 +- 任何需要重启主机/服务、改电源、个人桌面、绕过主机身份的操作。 +- 同一故障已有恢复额度用尽;不再重试/换名。 + +## 记录 + +每次动作记录时间、命令、只读结果/哈希、是否改变环境;私有 raw 留本地,公开材料仅来源/隐私核验后的内容。 diff --git a/research/ui/results/2026-11-09-bcd-recovery/README.md b/research/ui/results/2026-11-09-bcd-recovery/README.md new file mode 100644 index 00000000..e1b18f80 --- /dev/null +++ b/research/ui/results/2026-11-09-bcd-recovery/README.md @@ -0,0 +1,30 @@ +# B/CD 恢复:主机重新可达后的身份核验与唯一几何校准(blocked) + +## 结论 + +- 主机 `192.168.3.210:22` 严格 host-key 登录成功;专用 VM `termforge-r2-win11-20261028-7d7e678b` 正在运行,guest `TF-R2-W11`(Windows 11 10.0.26300,用户 `TFTest`,console session 1)可用;固定 WindTerm 2.7.0 EXE SHA-256 与既有计划身份一致 `7b10531dccc7cd614ae559f36f1ef518e0c96335637431b4646354823b2804d0`。 +- 旧失败 `bcd-prewrite-initial-grid-80x25-v1` 的 plan/marker 保留且哈希未变:plan `7718a4b8…`,marker `20fd56d7…`;未重放旧计划。 +- 已执行**一次**新的几何校准计划 `windterm-bcd-calibration-v1`(plan SHA-256 `954636ee…`,`.attempted` `20fd56d7…`;case `calibrate`,无 B/C/D/CUP 正文)。初始目标 `1228×839 → 80×24` **成功**(实际 window rect `[160,145,1387,983]`,inclusive size `1228×839`,frozen grid `80×24`,DSR `[1,1]`)。随后固定目标 `988×509 → 60×12` 失败:peer 报 `Resize changed row count`;仅 phase0 完成,phase1 未完成,`audit_mechanics` 因 peer 未 clean 停止。 +- 因此校准**未成功完成**,未进入新的 v2 写前/写后正式重试;`executedOriginalRetries=0` 不变。没有重试、没有改期望、没有用估算窗口发送正文。 +- 为执行校准,交互会话把专用 VM 显示从 `1024×768` 临时设为 `1600×1200`,校准后已恢复 `1024×768`(`restore_result=0`,bounds `1024×768`)。校准输出在 staging 源副本,旧 plan/attempt/raw 未覆盖。 + +## 身份与动作 + +- host:`8845hs`,Ubuntu 24.04.3 LTS,SSH strict host key。 +- VM:`termforge-r2-win11-20261028-7d7e678b`,running;guest agent `TF-R2-W11`;WindTerm EXE SHA `7b10531d…`;REA/Node 沿用旧计划身份。 +- display:before `1024×768`;校准 `1600×1200`;after restore `1024×768`。 +- calibration source:staging copy `C:\TermForgeHarness\Tools\r29-bcd-calibration-src-0`,calibration source hashes 与 `r29-bcd-calibration-source.json` 一致;未修改 `r29-bcd-source-0` 的旧 plan/attempt/raw。 +- 校准动作只包含窗口/NAWS/DSR 与只读行数;没有发送 B/C/D/CUP 正文。 + +## 精确阻塞 + +peer 在从 `80×24` 调整到目标 `60×12` 时记录 `error="Resize changed row count"`,`naws_history` 虽出现 `[[80,24],[60,12]]`,但 phase1 未完成,无法证明 60×12 目标可用于后续 v2。该错误可能来自 WindTerm terminal API/REA 的行数变化保护或校准控制器预期,现有一次失败不足以归因;不能未经新授权重跑或改预期。 + +解除条件:用户授权一份新的、仅针对 `60×12` resize 的校准/诊断计划(保留此失败指纹、不重放本计划),先解释 `Resize changed row count` 是 WindTerm 行为、REA/controller guard 还是窗口/DSR 采样问题;只有 60×12 校准成功后,才能冻结并执行原尚未使用的唯一 v2 正式重试。不得把本次 phase0 的 80×24 成功拼成完整校准或 B/C/D 结论。 + +## 产物 + +- `bcd-calibration-result.json`、`peer.json`、`cleanup.json`、`profile-check.json`、`run.json`、`bcd-calibration-plan.json` 见本目录。 +- 原始私有 raw 留在专用 VM;公开材料仅身份与脱敏结果。 +- 旧失败记录:`research/ui/results/2026-11-06-resize-bcd-address-pre-write-failed/` 不变。 +- #27/#29/R2 不关闭;未选择 A/B/C,未改产品行为。 diff --git a/research/ui/results/2026-11-09-bcd-recovery/bcd-calibration-plan.json b/research/ui/results/2026-11-09-bcd-recovery/bcd-calibration-plan.json new file mode 100644 index 00000000..85ccf731 --- /dev/null +++ b/research/ui/results/2026-11-09-bcd-recovery/bcd-calibration-plan.json @@ -0,0 +1,132 @@ +{ + "schema": "termforge-resize-bcd-calibration-plan-v1", + "issue": 29, + "related_issue": 27, + "case_id": "calibrate", + "maximum_original_runs": 1, + "actual_original_runs": 0, + "phase_count": 4, + "windows": [ + [ + 1228, + 839 + ], + [ + 988, + 509 + ], + [ + 988, + 509 + ], + [ + 1228, + 839 + ] + ], + "required_grids": [ + [ + 80, + 24 + ], + [ + 60, + 12 + ], + [ + 60, + 12 + ], + [ + 80, + 24 + ] + ], + "resize_phases": [ + 1, + 3 + ], + "window_rect_format": "qt-qrect-inclusive-ltrb", + "rea_capture_seconds": 45, + "cli_wait_timeout_seconds": 60, + "whole_lifecycle_bound_seconds": null, + "phases": [ + { + "phase": 0, + "label": "initial-80x24", + "source_hex": "", + "source_bytes": 0, + "source_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "dsr_suffix_hex": "1b5b366e" + }, + { + "phase": 1, + "label": "shrunk-60x12", + "source_hex": "", + "source_bytes": 0, + "source_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "dsr_suffix_hex": "1b5b366e" + }, + { + "phase": 2, + "label": "shrunk-60x12-second", + "source_hex": "", + "source_bytes": 0, + "source_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "dsr_suffix_hex": "1b5b366e" + }, + { + "phase": 3, + "label": "restored-80x24", + "source_hex": "", + "source_bytes": 0, + "source_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "dsr_suffix_hex": "1b5b366e" + } + ], + "reference_exe_sha256": "7b10531dccc7cd614ae559f36f1ef518e0c96335637431b4646354823b2804d0", + "reference_files_manifest_sha256": "e459adf2f12adb6a1b7f55e66a9da1c22794185e66e848057d21e0c60d669203", + "semantic_acceptance": false, + "action_phase": 2, + "pre_action_phases": [ + 0, + 1 + ], + "post_initial_terminal_input": "DSR at every phase; pre-write body snapshot is phase 1; exactly one declared CUP+RESIZED action after it is acknowledged", + "scope": "Fresh direct Telnet process per case; WindTerm protocol/display evidence only, not local-shell/native-grid proof; document, DSR and public marker rectangles remain separate", + "stop": "Wrong fixed geometry/grid, unarmed NAWS, stale snapshots, source/reply/phase mismatch, bounds or deadline failure; no retries", + "source_identity": { + "kind": "source-archive", + "manifest": "reference-source.json", + "manifest_sha256": "12ad742c2ead9d5cb8ac2fd84a03143f02a64212d923024cbbcbf47ea04301af" + }, + "source_base_commit": "53cf24fc17c00924d19bbed18063e978d259954c", + "source_files_sha256": { + "research/ui/resize_bcd_calibration.py": "de1d6c0aba4a70727f08b86061fd51ec7a3e14559e41de13c7612ddd4fa3b9c2", + "research/ui/resize_bcd_calibration.js": "296f02e4f384f8a722e62b7f8b39f3f70918d5bbc4ba95d35ff8b1c82f946efe", + "research/ui/resize_state_reference.py": "628f9e3a5e3ecea6c34829810df2cdf0e93dc221bd3d19b31b3f5028759f07fd", + "research/ui/mode_state_reference.py": "bac745e74a2653412ea7a701e3a1f3defa1fb97fdd7841b73fad483120496ec4", + "research/ui/alternate_reference.py": "94b85d49347e0e9813f7acddf0244f58520a7d1fce14084677c91cf4ddafffea", + "research/ui/r1_launch.py": "54fb41872c6abcc48242a0938044184854b016785cc13659c66b1bf404da0d8a", + "research/ui/launch.py": "6970e0d4f2fe5e7ec4827df7aa1026cd0e74aeb828cdc9b7a0b42b3c887eb4e6", + "research/ui/qt_r1_text.js": "f5820d413fdd72c13dffcefbf4d0ade615abfe15754c6b0b52e1e098814eea6f", + "research/ui/r1_vt_fixture.py": "5853f684d5b8a4c17a30f22a536f04f0eb212813b8d6b3cc3c197df392eb732a", + "experiments/conpty/run.py": "3766879cafe38aabf53cfac8ab2f62985b1976b6fa24c8b6031258bdc914258f" + }, + "python_sha256": "4d6f5f81a4bca11191c4c7c6b43632694d0a4ce74e068619d8fdc161d469859a", + "python_version": "3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]", + "windows_version": "10.0.26300", + "execution_authorized": true, + "source": "C:\\TermForgeHarness\\Tools\\r27-reference-runtime-0\\reference", + "out": "C:\\TermForgeHarness\\Tools\\r29-bcd-calibration-src-0\\local\\bcd-calibration-0", + "rea": "C:\\TermForgeHarness\\Tools\\r27-reference-runtime-0\\node_modules\\.bin\\rea.cmd", + "rea_prepared_identity": { + "version": "6.7.0", + "shim_sha256": "d092352a4088e7df223e9fe39039d703411dc5cbd39990f69756ade448ef1de4", + "package_json_sha256": "3f6c47fb12c8388f291a21e7f99a876495d03aee671b3b6a0708dd12d6ebb570", + "entry_sha256": "ed06cee49505b95a3cc5fceb1b4b279167e26df86227c644bb366ffffdbaf738", + "node_executable": "C:\\TermForgeHarness\\Tools\\r27-reference-runtime-0\\node\\node.exe", + "node_executable_sha256": "1c331340fa6cac5e4294725959070a143fa0507195a78ad77eed7943f719aac9" + }, + "launcher_source_sha256": "c38b97cfe7942bc772fba03b13e583fc7978783e46da6ac422a995b06884aac0" +} diff --git a/research/ui/results/2026-11-09-bcd-recovery/bcd-calibration-result.json b/research/ui/results/2026-11-09-bcd-recovery/bcd-calibration-result.json new file mode 100644 index 00000000..25d41cd2 --- /dev/null +++ b/research/ui/results/2026-11-09-bcd-recovery/bcd-calibration-result.json @@ -0,0 +1 @@ +{"status":"failed","case_id":"calibrate","error":"Error: peer Resize changed row count","observations":[{"phase":0,"label":"initial-80x24","terminal":{"protocol":"Telnet","connected":true,"top":null,"scroll":0,"line_count":1,"capacity":24,"lines":[""],"markers":[],"caret_api":{"caretLine":0,"caretColumn":0,"caretPosition":0}},"window_rect":[160,145,1387,983],"window_size":[1228,839],"cursor_reply":[1,1],"cursor_reply_private":false,"response_hex":"1b5b313b3152","frozen_grid":[80,24]}],"window_rect_format":"qt-qrect-inclusive-ltrb","geometry_checks":[{"phase":0,"window_rect":[160,145,1387,983],"window_size":[1228,839],"expected_size":[1228,839]}],"full_active_grid_verified":false,"local_shell_transport_verified":false,"direct_telnet_protocol_display_only":true,"presented_done":null} \ No newline at end of file diff --git a/research/ui/results/2026-11-09-bcd-recovery/cleanup.json b/research/ui/results/2026-11-09-bcd-recovery/cleanup.json new file mode 100644 index 00000000..2113bcde --- /dev/null +++ b/research/ui/results/2026-11-09-bcd-recovery/cleanup.json @@ -0,0 +1 @@ +{"active": 0, "total": 3, "terminated": 0} \ No newline at end of file diff --git a/research/ui/results/2026-11-09-bcd-recovery/peer.json b/research/ui/results/2026-11-09-bcd-recovery/peer.json new file mode 100644 index 00000000..86dd617b --- /dev/null +++ b/research/ui/results/2026-11-09-bcd-recovery/peer.json @@ -0,0 +1 @@ +{"connected": true, "columns": 60, "rows": 12, "phase": 0, "records": [{"phase": 0, "label": "initial-80x24", "source_hex": "", "source_bytes": 0, "source_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "dsr_suffix_hex": "1b5b366e", "cursor_reply": [1, 1], "frozen_grid": [80, 24], "response_hex": "1b5b313b3152", "cursor_reply_private": false}], "received_hex": "1b5b313b3152", "naws_history": [[80, 24], [60, 12]], "frozen_grid": [80, 24], "frozen_grids": [[80, 24]], "freeze_event_counts": [1], "resize_armed": 1, "resize_boundaries": [{"phase": 1, "before_event_count": 1, "requested_window": [988, 509]}], "case_id": "calibrate", "phase_count": 4, "phase_label": "initial-80x24", "error": "Resize changed row count", "closed": true} \ No newline at end of file diff --git a/research/ui/results/2026-11-09-bcd-recovery/profile-check.json b/research/ui/results/2026-11-09-bcd-recovery/profile-check.json new file mode 100644 index 00000000..9bcd1684 --- /dev/null +++ b/research/ui/results/2026-11-09-bcd-recovery/profile-check.json @@ -0,0 +1 @@ +{"only_synthetic_session": true, "session_count": 1} \ No newline at end of file diff --git a/research/ui/results/2026-11-09-bcd-recovery/run.json b/research/ui/results/2026-11-09-bcd-recovery/run.json new file mode 100644 index 00000000..2c823476 --- /dev/null +++ b/research/ui/results/2026-11-09-bcd-recovery/run.json @@ -0,0 +1,13 @@ +{ + "pid": 2436, + "tid": 4460, + "sha256": "7b10531dccc7cd614ae559f36f1ef518e0c96335637431b4646354823b2804d0", + "files_sha256": "e459adf2f12adb6a1b7f55e66a9da1c22794185e66e848057d21e0c60d669203", + "script_sha256": "dc3230a767184491dadb6e4b347e3b022a0bab95ad30030a864a172be0d98e32", + "fixture_sha256": "5853f684d5b8a4c17a30f22a536f04f0eb212813b8d6b3cc3c197df392eb732a", + "template_sha256": "9cc60b12c92fc1189d9291f487a3a2eaa56dc6bab473ebf7666f6aab1e7f0722", + "scenario": "menu-wrap", + "profile": "synthetic-local-only", + "window_station": "TermForgeR1-2664", + "clipboard": "owned-window-station" +} \ No newline at end of file diff --git a/research/ui/results/2026-11-09-bcd-recovery/validation.json b/research/ui/results/2026-11-09-bcd-recovery/validation.json new file mode 100644 index 00000000..310ddea9 --- /dev/null +++ b/research/ui/results/2026-11-09-bcd-recovery/validation.json @@ -0,0 +1,109 @@ +{ + "schema": "termforge-bcd-recovery-calibration-blocked-v1", + "status": "blocked-calibration-resize", + "issue": 29, + "related_issue": 27, + "old_failure": { + "id": "bcd-prewrite-initial-grid-80x25-v1", + "plan_sha256": "7718a4b8cb41e3b45f249e3a5479aa78803f2df3eae5e7cf7eed4e7efe03c260", + "attempted_sha256": "20fd56d7a9b72e43aee2ba364cb1a30c6149690a3deb97e7fcecc55d460e6523", + "changed": false, + "replayed": false + }, + "host_identity": { + "ssh": "192.168.3.210:22", + "host": "8845hs", + "os": "Ubuntu 24.04.3 LTS", + "strict_host_key": true + }, + "vm_identity": { + "libvirt_name": "termforge-r2-win11-20261028-7d7e678b", + "guest": "TF-R2-W11", + "windows": "10.0.26300", + "user": "TFTest", + "session_id": 1, + "windterm_exe_sha256": "7b10531dccc7cd614ae559f36f1ef518e0c96335637431b4646354823b2804d0" + }, + "display": { + "before": "1024x768", + "during": "1600x1200", + "after": "1024x768", + "restore_result": 0 + }, + "calibration": { + "plan_name": "windterm-bcd-calibration-v1", + "plan_sha256": "954636ee3f776fd9629a57a41ce8880e736640a3d76562a7913be369c54f1590", + "attempted_sha256": "20fd56d7a9b72e43aee2ba364cb1a30c6149690a3deb97e7fcecc55d460e6523", + "authorized_runs": 1, + "actual_runs": 1, + "originals_retries": 0, + "components_body_sent": false + }, + "observed": { + "phase0": { + "label": "initial-80x24", + "window_rect_inclusive": [ + 160, + 145, + 1387, + 983 + ], + "window_size": [ + 1228, + 839 + ], + "frozen_grid": [ + 80, + 24 + ], + "capacity": 24, + "cursor_reply": [ + 1, + 1 + ], + "status": "observed" + }, + "phase1": { + "label": "shrunk-60x12", + "requested_window": [ + 988, + 509 + ], + "requested_grid": [ + 60, + 12 + ], + "naws_history": [ + [ + 80, + 24 + ], + [ + 60, + 12 + ] + ], + "status": "failed", + "peer_error": "Resize changed row count" + }, + "result_error": "BCD peer did not complete cleanly", + "completed_phases": 1, + "v2_executed": false + }, + "evidence_sha256": { + "bcd-calibration-plan.json": "954636ee3f776fd9629a57a41ce8880e736640a3d76562a7913be369c54f1590", + "bcd-calibration-result.json": "834e32b8ec9d6622d82b2108b6a9539a91a4c9ae24100c4f1e4baf40a3754ff7", + "peer.json": "8524236edfb2aeb0c6aff83780d884c4370aafb66bab39d1754f78047ebc92ed", + "cleanup.json": "8400f93b6a4a4a50cde35b5d474660590ed215732f55772a9d8afac138da4f1d", + "profile-check.json": "5e522a64e98197722ccd084639b1ce50258b238e03be2f016e81c8af023b5ee1", + "run.json": "0ee1603288e036164605fe80d9e7574603783c38acf09313ff1b258be428ef1d" + }, + "blocker": "Calibration reached the initial 80x24 grid but failed on the fixed 60x12 resize with peer error \"Resize changed row count\"; phase 1 did not complete. No B/C/D body was sent and no v2 formal retry was executed.", + "unblock_condition": "A new user-authorized calibration/diagnosis plan for the 60x12 resize (without replaying this plan or changing expected grids) must explain whether the error is WindTerm behavior, an REA/controller guard, or a sampling/DSR issue; only after 60x12 calibration succeeds may the original unused v2 retry be frozen and run.", + "not_conclusions": [ + "No A/B/C route choice.", + "No B/C/D pre-write or post-write observation.", + "The 80x24 phase alone is not a complete calibration.", + "No change to old failure, plan, raw or product behavior." + ] +} \ No newline at end of file