diff --git a/CMakeLists.txt b/CMakeLists.txt index c1ceabb4..c4e2dbbc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,6 +312,7 @@ if(BUILD_TESTING) termforge_add_python_test(windterm_raster_style_reference -m unittest research.ui.test_raster_style_reference -v) termforge_add_python_test(windterm_raster_selection_proposal -m unittest research.ui.test_raster_selection_reference -v) termforge_add_python_test(windterm_raster_raw_proposal -m unittest research.ui.test_raster_raw_reference -v) + termforge_add_python_test(windterm_sgr1_proposal -m unittest research.ui.test_sgr1_reference -v) termforge_add_python_test(differential -m unittest discover -s experiments/differential -p test_*.py -v) termforge_add_python_test(ime_inventory -m unittest research.ime.test_hosted_inventory research.ime.test_prepare_hosted research.ime.test_product_ime -v) termforge_add_python_test(text_actions -m unittest experiments.shell.test_actions -v) diff --git a/docs/EVIDENCE.md b/docs/EVIDENCE.md index a044dfe5..5b007108 100644 --- a/docs/EVIDENCE.md +++ b/docs/EVIDENCE.md @@ -22,6 +22,8 @@ R1 固定总出口的源码为 `ce9b24d`,早期 `2dc8d6d` / `9b16acc` 仍分 原版模式依据见 [1049 直达终端观察](research/windterm-alternate-reference-2026-10-28.md)与[验证身份](../research/ui/results/2026-10-28-alternate-reference/validation.json):26 阶段精确输入、DSR 和文档投影相互绑定,原版重复进入的光标行为与通用幂等假设不同;样式、完整 active grid 和本地 Shell 运输继续保留未知。 +[#146 SGR1 固定样本调查](../research/ui/results/2026-10-29-sgr1-reference/README.md)取得五阶段/五 grab、28 对 H/space 完整有序像素签名;SGR0/SGR1 控制在采样条件下均不可分,进入/重复进入/返回无唯一分类。内部字重、SGR1 是否受字体/profile 偏好影响及全部非颜色属性仍未知;没有据此更改 C++ 策略或验收 #123/#126/#27。 + 原版输出自动化见 [cmd 正确性工具](../benchmarks/tools/WINDTERM-CMD.md)及[固定结果](../benchmarks/tools/results/2026-10-28-windterm-cmd/README.md):小 ASCII 全文、生产事件和 Job 回收已有无人值守闭环,路径元字符修复及各执行源码分列。它没有取得 C0、完整历史、消费/真实呈现端点或正式性能基线。 [#133 设置读取诊断](../benchmarks/tools/results/2026-10-29-c0-settings-reference/README.md)在独立受控配置差异下核对 536B 全文,并分别读到 producer console / 原版 view 窗口 120×40、document capacity 23;QWidget 字体仅为元数据,28 条 dot-key 设置仍不可读。完整 C0、glyph/字体请求有效性、10000 行历史、autocomplete、呈现及性能继续未知。 diff --git a/docs/research/windterm-sgr1-plan.md b/docs/research/windterm-sgr1-plan.md new file mode 100644 index 00000000..5d799f4e --- /dev/null +++ b/docs/research/windterm-sgr1-plan.md @@ -0,0 +1,36 @@ +# 1049 的 SGR1 输出签名:调查合同 + +对应 [#146](https://github.com/JavaZeroo/termforge/issues/146),接续 #123/#126 的未知非颜色属性。[离线 false 提案](../../research/ui/results/2026-10-29-sgr1-proposal/README.md)保留执行前身份;独立预审后的[唯一实际运行](../../research/ui/results/2026-10-29-sgr1-reference/README.md)取得五阶段完整栅格,但每帧 SGR0/SGR1 控制均不可分,进入/重复进入/返回的字重状态保持 unknown。旧 raw-capture-v1 的七个生产源、计划与证据保持字节不变。 + +目标是比较固定 WindTerm 2.7.0 在 1049 进入、重复进入与返回后,新写的 H/space 是否匹配同一张图中的 SGR0 或 SGR1 控制输出。匹配表示该固定样本的完整像素输出签名相同,不能直接解释为内部 `Style.bold`、QPainter pen 或实际字体字重相同。原版优先;重要独立差异仍需用户确认。 + +## 五阶段与可区分前态 + +| 阶段 | 精确输入的作用 | 采集后的源末态 | +|---|---|---| +| 0 | 主屏清空,SGR0/SGR1 各写两个 H 控制 | SGR1 | +| 1 | `1049h` 后先写无 SGR 的 `E0 H H`,再写两组控制 | SGR1 | +| 2 | 备用屏明确写 SGR0 样本和两组控制 | SGR1,为重复进入提供不同于 SGR0 的前态 | +| 3 | 重复 `1049h` 后先写 `R0 H H`,再写两组控制;最后追加不写字的 SGR0 | SGR0,与主屏原有源末态 SGR1 区分 | +| 4 | `1049l` 后先写 `M1 H H`,再写两组控制 | 不用于下一转换 | + +这里的末态来自精确发送源的声明,并非已读出的原版内部属性。返回标记前保留一个显式空格,避免与主屏末尾文字拼接而失去完整 token 绑定。每阶段源后追加一次 `CSI 6n`,只在独立 UI 确认后前进。固定输入、长度与 SHA 见[不可执行提案](../../research/ui/results/2026-10-29-sgr1-proposal/plan.json)。 + +## 采集与分类 + +[工具](../../research/ui/sgr1_reference.py)复用已审 raw Qt 模板,只以受保护锚点替换五阶段 marker 表、case/status 名称和输出文件名。原生 sret、QPixmap/QImage 生命周期、选择端点、marker/ROI、DPR、caret 和每阶段单次 grab 的实现不变;生成模板 SHA 与实际注入文件 SHA 分别记录。REA 固定 6.7.0,准备计划记录 shim、package.json 与入口脚本身份;这不代表完整工具依赖树已重现。 + +每个未知样本有两个 H,SGR0 与 SGR1 控制也各有两个 H。采集保留完整有序 H/space QRgb 数组于私有目录,分类完全离线,不在采集中按颜色选择是否继续。结构、身份、空图、ROI/DPR、选择端点或 caret 失败停止;不移动 ROI、不补抓、不重试。 + +[离线审计](../../research/ui/sgr1_analysis.py)要求同帧同一文本行、唯一位置与严格递增的 glyph 矩形、相同 ROI 形状/样本数、各组内部的完整有序签名一致。SGR0/1 控制不可分、控制重复不一致或目标未唯一匹配时保持 unknown。颜色差异、主墨色并列不阻断已经成立的完整输出签名匹配,但只记录颜色关系;`font_weight_mechanism=null` 和 `internal_bold_verified=false` 保持不变。 + +[导出器](../../research/ui/export_sgr1_reference.py)核对执行计划、源/模块/注入脚本、全部 NAWS 事件、实际 DSR、原始消息与文件一致性、逐阶段确认和 Job/profile 回收。只输出合成源、白名单标量、派生签名和原件哈希;原始像素、资源、路径、PID、profile 留私有。早期停止不补造未冻结的网格或后续画面。 + +## 执行与停止边界 + +- 执行前固定生产提交、唯一新目录与单次 marker,最多一次原版启动、每阶段一次 grab;当前 false 提案不能创建 attempt 或启动目标。 +- 仅官方固定 4047 文件清单、EXE/Qt 完整 SHA、自有副本、合成 loopback Telnet、非输入 station/desktop 和 OwnedJob;不修改个人桌面、剪贴板、DPI 或会话。 +- 沿既有 REA capture 45 秒、CLI wait 60 秒与清理边界;启动在前、清理在后,没有整程 45/60 秒保证,不构成绩效测量。 +- 实际运行使用独立预审后另建的单次 true 计划。该计划已经消费,原件与 false 提案保留;离线成功不批准重跑或模拟原版执行。 + +完整 style、内部笔刷、全网格、47/1047/1048、margin/origin/wrap、本地 Shell、物理呈现、性能及 R2 均未由本项验收。 diff --git a/research/ui/export_sgr1_reference.py b/research/ui/export_sgr1_reference.py new file mode 100644 index 00000000..4d342813 --- /dev/null +++ b/research/ui/export_sgr1_reference.py @@ -0,0 +1,131 @@ +"""Validate one fixed SGR1 capture and publish only reviewed synthetic scalars/hashes.""" +from __future__ import annotations +import argparse +import hashlib +import json +from pathlib import Path +import re +import sys + +ROOT = Path(__file__).resolve().parents[2] +sys.path.insert(0, str(ROOT)) +from research.ui.sgr1_reference import CASE_ID, MODULE_SHA256, MANIFEST_SHA256, SOURCE_FILES, AUDIT_FILES, TARGETS, phase_records, build_probe_fragment +from research.ui.sgr1_analysis import audit_capture, frame_comparisons, require +from research.ui.export_raster_raw_reference import REASONS + +TOKENS = sorted({row["label"] for target in TARGETS for row in target["markers"]}) +SYNTHETIC_LINE = re.compile(r" *(?:(?:" + "|".join(re.escape(token) for token in TOKENS) + r") *)*") +COMPLETE, PARTIAL = "captured-five-sgr1-raster-phases", "partial-sgr1-raster-capture" + + +def export(directory, plan_path, destination): + sha = lambda path: hashlib.sha256(path.read_bytes()).hexdigest() + read = lambda name: json.loads((directory / name).read_text(encoding="utf-8")) + plan = json.loads(plan_path.read_text(encoding="utf-8")) + require(plan["issue"] == 146 and plan["case_id"] == CASE_ID and plan["execution_authorized"] is True and plan["maximum_original_runs"] == 1, "Plan scope or execution authorization differs") + require((plan["phase_count"], plan["maximum_grabs_per_phase"], plan["maximum_grabs"], plan["rea_capture_seconds"], plan["cli_wait_timeout_seconds"], plan["whole_lifecycle_bound_seconds"]) == (5, 1, 5, 45, 60, None), "Plan capture/lifecycle bounds differ") + require(re.fullmatch(r"[0-9a-f]{40}", plan["source_base_commit"]) is not None, "Plan source identity missing") + require(plan["module_sha256"] == MODULE_SHA256 and plan["files_manifest_sha256"] == MANIFEST_SHA256 and plan["phases"] == phase_records(), "Plan fixed identities or inputs differ") + tool = plan["rea_prepared_identity"] + require(set(tool) == {"version", "shim_sha256", "package_json_sha256", "entry_sha256"} and tool["version"] == "6.7.0" and all(re.fullmatch(r"[0-9a-f]{64}", tool[key]) for key in ("shim_sha256", "package_json_sha256", "entry_sha256")), "Prepared REA identity differs") + for key, names in (("source_files_sha256", SOURCE_FILES), ("offline_audit_files_sha256", AUDIT_FILES)): + require(set(plan[key]) == set(names) and plan[key] == {name: sha(ROOT / name) for name in names}, "Source inventory or bytes differ") + generated = hashlib.sha256(build_probe_fragment().encode("utf-8")).hexdigest() + require(plan["generated_capture_sha256"] == generated, "Generated capture differs") + run, peer, captured, outer = [read(name) for name in ("run.json", "peer.json", "sgr1-raster-result.json", "evidence.json")] + evidence = outer["data"]["evidence"]; normalized = evidence["normalized_result"] + require(run["sha256"] == MODULE_SHA256["WindTerm.exe"] and run["files_sha256"] == MANIFEST_SHA256, "Observed package identity differs") + template = (ROOT / "research/ui/qt_r1_text.js").read_text(encoding="utf-8").split("// Scenario driver", 1)[0] + build_probe_fragment() + require(run["template_sha256"] == hashlib.sha256(template.encode("utf-8")).hexdigest(), "Executed capture template differs") + require(normalized["source_sha256"] == run["script_sha256"] == sha(directory / "probe.js"), "Injected source differs") + require(outer["ok"] and not outer["data"]["cleanup_error"] and not normalized["cleanup_error"] and not normalized["messages_truncated"], "Provider/cleanup incomplete") + require(not any(row["type"] == "error" for row in normalized["messages"]), "Provider script error") + require(evidence["provider"] == {"id": "frida", "name": "Frida", "version": None} and evidence["confidence"] == "observed" and evidence["subject"] is None and evidence["environment"] is None, "Provider identity differs") + require(re.fullmatch(r"ev_[0-9a-f]{64}", evidence["evidence_id"]) is not None, "Provider evidence identity missing") + require(all(value in {"Artifact identity is unavailable for this observation.", "The target operating system and architecture were not reported by this observation."} for value in evidence["limitations"]), "Unexpected provider limitation text") + messages = [row["payload"] for row in normalized["messages"] if row["type"] == "send" and isinstance(row.get("payload"), dict)] + observed = [{key: value for key, value in row.items() if key != "kind"} for row in messages if row.get("kind") == "sgr1_raster_phase"] + finals = [{key: value for key, value in row.items() if key != "kind"} for row in messages if row.get("kind") == "sgr1_raster_result"] + require(observed == captured["captures"] and finals == [captured], "Provider messages and raw file disagree") + require(captured["status"] in (COMPLETE, PARTIAL) and captured["reason"] in REASONS, "Capture status/reason differs") + guards = captured["module_guards"] + require(len(guards) == 4 and {row["name"] for row in guards} == set(MODULE_SHA256) and all(row == {"name": row["name"], "path_guard_passed": True} for row in guards), "Module path guard failed") + count = len(observed); require(0 <= count <= 5, "Too many phases") + grid, freeze, history = peer.get("frozen_grid"), peer.get("freeze_event_count"), peer.get("naws_history", []) + require(len(history) <= 64 and all(isinstance(row, list) and len(row) == 2 and all(type(n) is int and 0 < n <= 65535 for n in row) for row in history), "NAWS shape differs") + if grid is None: + require(count == 0 and captured["status"] == PARTIAL and freeze is None, "Missing grid after source release") + else: + require(grid == [peer["columns"], peer["rows"]] and 40 <= peer["columns"] <= 160 and 10 <= peer["rows"] <= 60, "Frozen grid differs") + require(type(freeze) is int and 0 <= freeze <= len(history), "NAWS event bound differs") + require(all(row == grid for row in history[freeze:]), "NAWS changed after freeze") + wire = bytes.fromhex(peer["received_hex"]) + replies = list(re.finditer(rb"\x1b\[(\??)(\d+);(\d+)R", wire)) + require(len(wire) <= 65536 and not re.sub(rb"\x1b\[(\??)(\d+);(\d+)R", b"", wire), "Unexpected application bytes") + require(len(peer["records"]) == len(replies) == count, "Source/reply/capture counts differ") + require(captured["grab_phases"] == [row["phase"] for row in observed if row["grab_attempted"]] and len(set(captured["grab_phases"])) == len(captured["grab_phases"]), "Extra grab") + public_phases = [] + for index, (capture, record, reply) in enumerate(zip(observed, peer["records"], replies)): + expected = phase_records(peer["rows"], peer["columns"])[index] + require(capture["phase"] == record["phase"] == index and capture["label"] == TARGETS[index]["label"], "Phase identity differs") + require(all(record[key] == expected[key] for key in ("label", "source_hex", "source_sha256")), "Exact source differs") + cursor = [int(reply[2]), int(reply[3])] + require(reply[1] == b"" and cursor == record["cursor_reply"] == capture["cursor_reply"], "DSR differs") + require(capture["reason"] in REASONS and capture["module_guards"] == guards, "Capture reason/module differs") + terminal = capture["terminal"] + require(terminal["protocol"] == "Telnet" and terminal["connected"] is True and terminal["capacity"] == peer["rows"], "Terminal binding differs") + require(terminal["line_count"] == len(terminal["lines"]) <= 200 and all(SYNTHETIC_LINE.fullmatch(line) for line in terminal["lines"]), "Non-synthetic terminal text") + require(type(terminal["is_alt"]) is bool and type(terminal["is_main"]) is bool and terminal["is_alt"] != terminal["is_main"], "Mode observation missing") + require(terminal["is_alt"] == (index in (1, 2, 3)), "Unexpected active buffer for fixed source") + value = audit_capture(capture) + value.update({"source_label": record["label"], "source_hex": record["source_hex"], "source_sha256": record["source_sha256"], + "dsr_request_hex": "1b5b366e", "cursor_reply_hex": reply[0].hex(), "is_alt": terminal["is_alt"], "is_main": terminal["is_main"]}) + public_phases.append(value) + ack = directory / f"ack-{index}" + if capture["capture_valid"]: + require(ack.read_text() == "captured", "Capture acknowledgment missing") + else: + require(index == count-1 and not ack.exists(), "Invalid capture advanced source") + complete = captured["status"] == COMPLETE + require(not complete or (count == 5 and peer["complete"] is True and all(row["capture_valid"] for row in observed)), "Incomplete capture promoted") + require(complete or captured["reason"] is not None, "Partial capture has no reason") + cleanup, profile = read("cleanup.json"), read("profile-check.json") + require(set(cleanup) == {"active", "total", "terminated"} and all(type(n) is int and n >= 0 for n in cleanup.values()) and cleanup["active"] == 0, "Owned Job did not finish") + require(profile == {"only_synthetic_session": True, "session_count": 1}, "Synthetic profile failed") + require((directory / "stderr.txt").stat().st_size == 0, "Unexpected original stderr") + raw_names = ("run.json", "probe.js", "peer.json", "sgr1-raster-result.json", "evidence.json", "cleanup.json", "profile-check.json", "stderr.txt") + summary = {"schema": "termforge-original-sgr1-reference-v1", "issue": 146, "case_id": CASE_ID, + "status": captured["status"], "reason": captured["reason"], "raw_capture_complete": complete, + "source_base_commit": plan["source_base_commit"], "source_files_sha256": plan["source_files_sha256"], + "offline_audit_files_sha256": plan["offline_audit_files_sha256"], "generated_capture_sha256": generated, + "rea_prepared_identity": tool, + "plan_sha256": sha(plan_path), "module_sha256": MODULE_SHA256, "files_manifest_sha256": MANIFEST_SHA256, + "maximum_original_runs": 1, "actual_original_runs": 1, "rea_capture_seconds": 45, + "cli_wait_timeout_seconds": 60, "whole_lifecycle_bound_seconds": None, + "frozen_grid": grid, "naws_history": history, "freeze_event_count": freeze, + "planned_phase_count": 5, "observed_phase_count": count, "grab_phases": captured["grab_phases"], + "phases": public_phases, "same_frame_signature_comparisons": frame_comparisons(public_phases), + "runtime_module_path_guards": guards, + "provider": {key: evidence[key] for key in ("evidence_id", "provider", "confidence", "subject", "environment", "limitations")}, + "lifecycle": {"outer_job": cleanup, "profile": profile, "deliberate_original_termination": True, "natural_gui_exit_verified": False}, + "raw_files": {name: {"bytes": (directory/name).stat().st_size, "sha256": sha(directory/name)} for name in raw_names}, + "internal_bold_verified": False, "full_style_verified": False, "full_grid_verified": False, + "local_shell_transport_verified": False, "presented_done": None, "r2_complete": False, "windterm_parity": False, + "limitations": ["Only exact same-frame SGR0/SGR1 output signatures are compared; this does not read an internal pen or prove general font weight.", + "Each group must repeat exactly with equal ROI shapes/counts. Indistinguishable or inconsistent controls stay unknown. Color differences/ties do not invalidate an exact output signature but never establish a font-weight mechanism.", + "Only the five fixed sources and one grab per phase are covered; no ROI movement, extra grab or retry.", + "QWidget raster and direct Telnet do not prove physical presentation, local-shell transport or performance.", + "Capture45/CLI60 exclude startup and later cleanup; no whole-lifecycle deadline is claimed.", + "Raw pixels, paths, PIDs, copied original resources and synthetic profile stay local. Unknowns do not establish a reset or inherited internal style."]} + destination.parent.mkdir(parents=True, exist_ok=True) + destination.write_text(json.dumps(summary, ensure_ascii=False, indent=2) + "\n", encoding="utf-8", newline="\n") + return summary + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + for name in ("directory", "plan", "destination"): + parser.add_argument("--" + name, type=Path, required=True) + args = parser.parse_args() + result = export(args.directory, args.plan, args.destination) + print(json.dumps({"exported": True, "status": result["status"], "observed_phases": result["observed_phase_count"]})) diff --git a/research/ui/results/2026-10-29-sgr1-proposal/README.md b/research/ui/results/2026-10-29-sgr1-proposal/README.md new file mode 100644 index 00000000..155f2eb9 --- /dev/null +++ b/research/ui/results/2026-10-29-sgr1-proposal/README.md @@ -0,0 +1,18 @@ +# SGR1 固定输出签名:离线预审材料 + +[#146](https://github.com/JavaZeroo/termforge/issues/146) 当前仅有[工具/停止合同](../../../../docs/research/windterm-sgr1-plan.md)、[false 提案](plan.json)和[离线验证身份](validation.json)。**实际 WindTerm 启动 0 次,guest 请求 0 次**;没有原版像素、SGR1 行为或内部字重结论。 + +工具源为 `8d44041cefbf566b5fb1eb7433bdfa0231235ef1`。其后两个提交只修改测试输入/等待:`5d18c34d94093e03871ff240c3d811e8d98757b9` 隔离旧 fixture 的共享标签列表,`14b28609b59c789d5b78e2f0463c53321e296ada` 等待新 peer 测试的记录发布。8 个生产源及 5 个离线审计源的字节与工具提交逐一一致;旧 raw-capture-v1 七个生产源、旧计划和旧证据未改。 + +提案准备于 `14b2860`:主屏进入前源末态 SGR1,重复进入前备用屏源末态 SGR1,退出前追加不写字的 SGR0。每个未知样本与 SGR0/SGR1 控制均有两个独立 H/space;最多五阶段、每阶段一抓、一次原版启动。末态来自精确源声明,并非内部属性读数。控制可分且完整有序签名唯一匹配时只记录 `SGR0-control-output` / `SGR1-control-output`;颜色同异、并列主墨色不被解释为实际字重,机制始终 unknown。 + +最终 Windows x64、Python 3.12.10、Node 22.21.1 的新离线套件普通与 `-O` 各 **15/15、零跳过**,包含合成完整导出逐字节相同、早期/部分停止、位置/矩形别名、零/越界 ROI、隐私拒绝、不可分/不一致控制、同直方图不同像素顺序,以及逐字节 loopback peer。新 CMake 入口只运行该套件,CTest **1/1**;未构建或运行原生产品。 + +两项测试失败与修正分列保留: + +- 旧 raw/selection/peer 模块放到同一 unittest 进程时,26 项中 6 个 selection 子例失败。直接反例证明 phase0 的 `lines` 与全局 `LABELS[0]` 是同一列表,原隐私拒绝负例原地改变了后续 fixture。只复制测试列表,完全相同组合随后 **26/26**;生产源和拒绝断言不变。原有按 CTest 隔离的三个模块分别为 11/11、13/13、2/2,不用这些成功覆盖组合红。 +- 新 CTest 首次 **0/1**:测试客户端收到源字节时,peer 线程尚未发布对应记录,立即索引产生 `IndexError`。测试现在在原 2 秒条件预算内先核对记录存在,再核对原 DSR;最终 **1/1**。原失败日志和首次 false 计划保留,未加等待预算或重跑原版。 + +日志、首次与最终 false 计划的路径只留 `local/`;公开记录其 SHA。最终私有 false 计划 SHA 为 `6d04124b88fcc9aa1325a99850ed4708ab8a7fc689cecdabee7aea5052104397`,没有创建 attempt marker 或目标输出目录。准备时只实际核对四个完整模块 SHA;完整 4047 文件清单由既有启动器在未来获准运行时再次核对,不能把准备成功当作已启动。 + +独立预审后仍须从当时的 HEAD **另建 true 计划**,不能修改这些 false 提案或运行旧 immutable 计划。此次没有产品完整矩阵、实际呈现、性能或 R2 验收结果。 diff --git a/research/ui/results/2026-10-29-sgr1-proposal/plan.json b/research/ui/results/2026-10-29-sgr1-proposal/plan.json new file mode 100644 index 00000000..71b3baf9 --- /dev/null +++ b/research/ui/results/2026-10-29-sgr1-proposal/plan.json @@ -0,0 +1,93 @@ +{ + "schema": "termforge-sgr1-plan-v1", + "issue": 146, + "case_id": "sgr1-capture-v1", + "maximum_original_runs": 1, + "actual_original_runs": 0, + "execution_authorized": false, + "source_base_commit": "14b28609b59c789d5b78e2f0463c53321e296ada", + "rea_prepared_identity": { + "version": "6.7.0", + "shim_sha256": "d092352a4088e7df223e9fe39039d703411dc5cbd39990f69756ade448ef1de4", + "package_json_sha256": "3f6c47fb12c8388f291a21e7f99a876495d03aee671b3b6a0708dd12d6ebb570", + "entry_sha256": "ed06cee49505b95a3cc5fceb1b4b279167e26df86227c644bb366ffffdbaf738" + }, + "module_sha256": { + "WindTerm.exe": "7b10531dccc7cd614ae559f36f1ef518e0c96335637431b4646354823b2804d0", + "Qt5Core.dll": "8d2ff4ce9096ddccc4f4cd62c2e41fc854cfd1b0d6e8d296645a7f5fd4ae565a", + "Qt5Gui.dll": "5e7d2d41b8b92a880e83b8cc0ca173f5da61218604186196787ee1600956be1e", + "Qt5Widgets.dll": "3788c669d4b645e5a576de9fc77fca776bf516d43c89143dc2ca28291ba14358" + }, + "files_manifest_sha256": "e459adf2f12adb6a1b7f55e66a9da1c22794185e66e848057d21e0c60d669203", + "rea_capture_seconds": 45, + "cli_wait_timeout_seconds": 60, + "whole_lifecycle_bound_seconds": null, + "source_files_sha256": { + "research/ui/sgr1_reference.py": "963d1164af53e6bc57c5d2841d48a4f422cd2903b4fe0e762fbd26553dc656d8", + "research/ui/raster_raw_reference.py": "942902683fac816aa4271faaab31b01505aaab8ea6624f131f272e03a4548824", + "research/ui/raster_raw_reference.js": "bc427feb65650b1f90e6f882af405bbc88f93d1df2e2e249fb7960a90696869e", + "research/ui/alternate_style_reference.py": "3136e620a462a36ea3358c917eb4e207f32aa52db7c75ae14ba8856eba1eafcd", + "research/ui/alternate_reference.py": "94b85d49347e0e9813f7acddf0244f58520a7d1fce14084677c91cf4ddafffea", + "research/ui/r1_launch.py": "54fb41872c6abcc48242a0938044184854b016785cc13659c66b1bf404da0d8a", + "research/ui/launch.py": "6970e0d4f2fe5e7ec4827df7aa1026cd0e74aeb828cdc9b7a0b42b3c887eb4e6", + "research/ui/qt_r1_text.js": "f5820d413fdd72c13dffcefbf4d0ade615abfe15754c6b0b52e1e098814eea6f" + }, + "offline_audit_files_sha256": { + "research/ui/sgr1_analysis.py": "65af7130f705a21e81918ae86e62ed03e5db7b2ee6699b32b100b23d5f30c087", + "research/ui/export_sgr1_reference.py": "44cd3b6415f53415bd8405923bc3d5ed19ec00025ff8a5cb92b308d802115489", + "research/ui/raster_raw_analysis.py": "019d2c2616ac3942160da19289c7d4ee0fa7560dcd3c6d27f732cf724da98e50", + "research/ui/raster_selection_analysis.py": "745cda14921a383ca9baf6ec85242982ca587396b8464a3d27047ecf204a8845", + "research/ui/export_raster_raw_reference.py": "581b034eb18944e91e4cc07b23702e224e62939c4616686a15430eca0959261a" + }, + "generated_capture_sha256": "d245425ba4215b1c0cea3546720b397de36df3c6c6bf8b86d29405a466e61e51", + "phases": [ + { + "phase": 0, + "label": "main-controls-end-sgr1", + "source_hex": "1b5b306d1b5b324a1b5b481b5b323b33484e3020482048201b5b316d423020482048", + "source_bytes": 34, + "source_sha256": "47595c12e92593673e2d27d3c485d6bce1187b20aabeae08f0219cca75ce8bb0", + "dsr_suffix_hex": "1b5b366e" + }, + { + "phase": 1, + "label": "1049-entry-with-controls", + "source_hex": "1b5b3f3130343968453020482048201b5b306d454e20482048201b5b316d454220482048", + "source_bytes": 36, + "source_sha256": "7cbbfc713e560873081b561974e68ea91e04d47d72b238d89eb752bfaa12e9c7", + "dsr_suffix_hex": "1b5b366e" + }, + { + "phase": 2, + "label": "alternate-end-sgr1", + "source_hex": "1b5b343b33481b5b306d41302048204820414e20482048201b5b316d414220482048", + "source_bytes": 34, + "source_sha256": "873380655f527f9f130435eedd3af9d04ac944c82311c4e9b1c93ac8eace6e84", + "dsr_suffix_hex": "1b5b366e" + }, + { + "phase": 3, + "label": "1049-repeat-with-controls-end-sgr0", + "source_hex": "1b5b3f3130343968523020482048201b5b306d524e20482048201b5b316d5242204820481b5b306d", + "source_bytes": 40, + "source_sha256": "2d369c29d963b52ac78d7dc8b2501929889984ef00e5d0754ef3996db76561eb", + "dsr_suffix_hex": "1b5b366e" + }, + { + "phase": 4, + "label": "1049-return-with-controls", + "source_hex": "1b5b3f313034396c204d3120482048201b5b306d4d4e20482048201b5b316d4d4220482048", + "source_bytes": 37, + "source_sha256": "a1046b17ab9fd1e0845354a2e38536b45113d6c9005fde2435a9e634eac15e89", + "dsr_suffix_hex": "1b5b366e" + } + ], + "phase_count": 5, + "maximum_grabs_per_phase": 1, + "maximum_grabs": 5, + "scope": "Exact same-frame SGR0/SGR1 output signatures only; no internal pen, general bold, full-grid, local-shell, presented or performance claim", + "stop": "Structural/identity/empty-image/ROI/DPR/selection/caret failures stop. Equal/inconsistent controls or incomparable shapes leave output classification unknown; color differences/ties leave the font-weight mechanism unknown, even when the exact output uniquely matches. No moved ROI, extra grab or retry.", + "private_plan_sha256": "6d04124b88fcc9aa1325a99850ed4708ab8a7fc689cecdabee7aea5052104397", + "prepared_original_package_guard": "Four full module hashes checked; the existing launcher will check the complete 4047-file manifest at a later authorized launch.", + "execution_note": "Offline proposal only. No original or guest execution; no attempt marker or target output directory was created." +} diff --git a/research/ui/results/2026-10-29-sgr1-proposal/validation.json b/research/ui/results/2026-10-29-sgr1-proposal/validation.json new file mode 100644 index 00000000..555f3c11 --- /dev/null +++ b/research/ui/results/2026-10-29-sgr1-proposal/validation.json @@ -0,0 +1,142 @@ +{ + "schema": "termforge-sgr1-offline-preflight-v1", + "issue": 146, + "case_id": "sgr1-capture-v1", + "base_commit": "c6940a9562c2177ae784a506aa611db84e1c74f6", + "producer_commit": "8d44041cefbf566b5fb1eb7433bdfa0231235ef1", + "fixture_alias_fix_commit": "5d18c34d94093e03871ff240c3d811e8d98757b9", + "fixture_wait_fix_commit": "14b28609b59c789d5b78e2f0463c53321e296ada", + "prepared_head": "14b28609b59c789d5b78e2f0463c53321e296ada", + "private_plan_sha256": "6d04124b88fcc9aa1325a99850ed4708ab8a7fc689cecdabee7aea5052104397", + "public_plan_sha256": "132e98fab3e480006a11fa0d75fd71f55f8028a050bd0d525f249383abf7c4f7", + "generated_capture_sha256": "d245425ba4215b1c0cea3546720b397de36df3c6c6bf8b86d29405a466e61e51", + "source_files_sha256": { + "research/ui/sgr1_reference.py": "963d1164af53e6bc57c5d2841d48a4f422cd2903b4fe0e762fbd26553dc656d8", + "research/ui/raster_raw_reference.py": "942902683fac816aa4271faaab31b01505aaab8ea6624f131f272e03a4548824", + "research/ui/raster_raw_reference.js": "bc427feb65650b1f90e6f882af405bbc88f93d1df2e2e249fb7960a90696869e", + "research/ui/alternate_style_reference.py": "3136e620a462a36ea3358c917eb4e207f32aa52db7c75ae14ba8856eba1eafcd", + "research/ui/alternate_reference.py": "94b85d49347e0e9813f7acddf0244f58520a7d1fce14084677c91cf4ddafffea", + "research/ui/r1_launch.py": "54fb41872c6abcc48242a0938044184854b016785cc13659c66b1bf404da0d8a", + "research/ui/launch.py": "6970e0d4f2fe5e7ec4827df7aa1026cd0e74aeb828cdc9b7a0b42b3c887eb4e6", + "research/ui/qt_r1_text.js": "f5820d413fdd72c13dffcefbf4d0ade615abfe15754c6b0b52e1e098814eea6f" + }, + "offline_audit_files_sha256": { + "research/ui/sgr1_analysis.py": "65af7130f705a21e81918ae86e62ed03e5db7b2ee6699b32b100b23d5f30c087", + "research/ui/export_sgr1_reference.py": "44cd3b6415f53415bd8405923bc3d5ed19ec00025ff8a5cb92b308d802115489", + "research/ui/raster_raw_analysis.py": "019d2c2616ac3942160da19289c7d4ee0fa7560dcd3c6d27f732cf724da98e50", + "research/ui/raster_selection_analysis.py": "745cda14921a383ca9baf6ec85242982ca587396b8464a3d27047ecf204a8845", + "research/ui/export_raster_raw_reference.py": "581b034eb18944e91e4cc07b23702e224e62939c4616686a15430eca0959261a" + }, + "producer_bytes_unchanged_after_test_only_fixes": true, + "actual_original_runs": 0, + "guest_requests": 0, + "attempt_marker_created": false, + "original_output_created": false, + "environment": { + "python": "3.12.10", + "system": "Windows", + "version": "10.0.26200", + "machine": "AMD64", + "node": "v22.21.1" + }, + "validation": { + "new_public_seams": { + "methods": 15, + "normal_via_ctest": "passed", + "optimized": "15/15", + "skips": 0, + "synthetic_normal_optimized_export_byte_equal": true + }, + "cmake": { + "configuration": "Debug test runner; Qt OFF; candidate OFF; no native product build", + "configure_exit": 0, + "ctest_selector": "^windterm_sgr1_proposal$", + "final_ctest": "1/1", + "final_ctest_exit": 0 + }, + "related_modules_isolated_before_fixes": { + "raw": "11/11", + "selection": "13/13", + "peer": "2/2" + }, + "existing_fixture_alias": { + "red_source": "8d44041cefbf566b5fb1eb7433bdfa0231235ef1", + "red_methods": 26, + "red_failed_subcases": 6, + "red_exit": 1, + "direct_same_list": true, + "direct_global_changed": true, + "fix": "One test-only list copy; production inputs/rejection assertions unchanged", + "same_combined_selector_green": "26/26", + "green_exit": 0 + }, + "new_peer_test_wait": { + "first_ctest_source": "5d18c34d94093e03871ff240c3d811e8d98757b9", + "first_ctest_exit": 8, + "first_ctest": "0/1: test fixture indexed a record before publication", + "observed_exception": "IndexError: list index out of range", + "fix": "Wait for record existence and same DSR under unchanged two-second condition budget", + "final_ctest_exit": 0 + } + }, + "private_logs": { + "combined-red.txt": { + "bytes": 11005, + "sha256": "8266bd29145ecb0e18718d7d503c429590c0a8e6880db678f85c321291048745" + }, + "combined-red-exit.json": { + "bytes": 81, + "sha256": "e971b4aed126ee93d3bb78203aa822ff35ea5488043081280668b47d516892fc" + }, + "alias-red.txt": { + "bytes": 37, + "sha256": "ea423d7137b4338ac7a5678b1f68504f8a74ee1d5959c4a0615378e2b5e6d891" + }, + "combined-green.txt": { + "bytes": 130, + "sha256": "c6e192fa51ccd7dda7120304ea5a37eacac4ca1c0aa37684c35aa5d340ed369a" + }, + "combined-green-exit.json": { + "bytes": 180, + "sha256": "55798c68f2b2f5d85e685306cb3b24055dd3a57f7dd08e4f98acfeb65c687f2c" + }, + "configure.txt": { + "bytes": 786, + "sha256": "1dae89bee64f96960ca160a429d5fbae466f83bc6d4da53e3cc564fcca6cd98d" + }, + "ctest.txt": { + "bytes": 4695, + "sha256": "6025c0bf35d6b1146f1d94bdf9a93914862619cf4bc4d362a0fdb5e6606bd648" + }, + "optimized.txt": { + "bytes": 119, + "sha256": "100293c04b30ee0f80176ac8a4a929e8b04de16a4dc2d103fc03f1f4e5c28163" + }, + "final-exits.json": { + "bytes": 130, + "sha256": "4cad79b4ca20c5a26b22be72adc4b3b70ee01979f34de2dbf16d6e8c8df82efc" + }, + "ctest-after-fixture-wait.txt": { + "bytes": 361, + "sha256": "bda8910b90cd283f6821cff0b44d76c7eb22cc638db1c7742362656a612036ce" + }, + "optimized-final.txt": { + "bytes": 119, + "sha256": "ef3ec1cca3a098fec0d231a2a4de32e4c136031427a54281623e04444ec9b6cf" + }, + "reviewed-exits.json": { + "bytes": 106, + "sha256": "9de4360b0711e74e5300b92c091ac64a1b6b4909804e6512cc2be18669f5aba9" + }, + "ctest-reviewed-LastTest.log": { + "bytes": 3900, + "sha256": "b5666387e698fee0068bde34a65b353b1ddd514a280d4ddf49f0100783fd5b05" + } + }, + "limitations": [ + "Only synthetic/owned loopback tests and read-only preparation were executed; no WindTerm observation was made.", + "Old combined-fixture failures and the first new CTest failure are preserved; later passes do not rewrite those source identities.", + "No complete product matrix, native product build, guest run, real pixel sample, performance or R2 acceptance is claimed.", + "After independent preflight review, a new true plan at the then-current HEAD is required. This false plan must not be edited into an attempted run." + ] +} diff --git a/research/ui/results/2026-10-29-sgr1-reference/README.md b/research/ui/results/2026-10-29-sgr1-reference/README.md new file mode 100644 index 00000000..8c1a186e --- /dev/null +++ b/research/ui/results/2026-10-29-sgr1-reference/README.md @@ -0,0 +1,35 @@ +# 原版 1049 / SGR1 固定样本:采集完整,控制不可分 + +[#146](https://github.com/JavaZeroo/termforge/issues/146) 的唯一实际运行取得五阶段、五次独立 QWidget grab。**每帧的 SGR0 与 SGR1 双 H/space 控制完整像素签名均不可分,进入、重复进入和返回的比较结果都保持 unknown。** 这不能证明原版忽略 SGR1、不支持粗体,或 1049 保留/重置/恢复了内部字重。 + +## 身份与实际执行 + +- 实际执行 HEAD:`a115bc82119dcf1456e8bf9a7c0e15bee3d77174`;工具实现:`8d44041cefbf566b5fb1eb7433bdfa0231235ef1`。8 个生产源、5 个离线审计源与两提交逐一字节相同。[执行前材料](../2026-10-29-sgr1-proposal/README.md)保留其当时的零次运行状态和测试失败/修正身份。 +- 固定官方 WindTerm 2.7.0 x64 EXE SHA256:`7b10531dccc7cd614ae559f36f1ef518e0c96335637431b4646354823b2804d0`;4047 文件 canonical manifest:`e459adf2f12adb6a1b7f55e66a9da1c22794185e66e848057d21e0c60d669203`。离线重新枚举并核对源包和自有副本的全部 4047 文件、四模块完整 SHA 与实际模块路径守卫。 +- 已消费的私有 true 计划 SHA:`d0286fade7bf18f3dbea5e44ed91b8c5e1a5f595b0900978abcc758e9b06af45`;[公开计划](plan.json)删除私有路径,分别记录准备时零次与完成后一次。原 false、true、attempt、源和原件均保留,不再执行。 +- REA Evidence:`ev_c6e7637ba0e47033ec012529a35c909bb21a805f98b6743e809cdb28958721d4`。root 监督 CLI 退出 0;provider 无脚本错误、截断或 cleanup error。原始 evidence 216159B,路径、PID、profile、资源及像素数组不公开。 +- 自有非输入 station/desktop、合成 loopback Telnet 和 OwnedJob。记录的最终 Job 为 `active=0,total=3,terminated=0`,profile 检查仅一个合成会话,stderr 为空。启动器主动结束原版,不把 Job0 或 terminated0 当作自然 GUI 退出。 + +## 五阶段观察 + +NAWS 完整事件为 `91×24 → 91×25`,第二事件后冻结,之后无新尺寸事件。五帧均为 888×451、DPR1;28 对 H/space ROI 共 56 数组、8064 个 QRgb,单个 ROI 为 8×18。完整有序 H/space 签名在本次 28 对中只有一个值;不是仅比较直方图或主墨色。 + +| 阶段 | 精确源条件 | 实际 DSR | 实际缓冲区 | 同帧控制 / 未知样本结论 | +|---|---|---|---|---| +| 0 | 主屏 SGR0/1 控制,结束为 SGR1 | (2,16) | 主屏 | 0/1 控制不可分 | +| 1 | `1049h` 后先写 E0,再写控制 | (1,21) | 备用屏 | 控制不可分,E0 无唯一分类 | +| 2 | 备用屏样本与控制,结束为 SGR1 | (4,23) | 备用屏 | 控制不可分 | +| 3 | 重复 `1049h` 后先写 R0,再写控制并追加不写字的 SGR0 | (1,21) | 备用屏 | 控制不可分,R0 无唯一分类 | +| 4 | `1049l` 后先写 M1,再写控制 | (2,37) | 主屏 | 控制不可分,M1 无唯一分类 | + +SGR1/SGR0 的转换前态来自已发送源声明,并非读取了内部 style。所有 marker 与实际文本、位置、矩形、DSR 和活动缓冲区分别绑定;同帧两组控制各自重复一致。正常与 SGR1 控制本身相同,所以不能利用目标匹配推导 reset/inheritance/restore。 + +本批只核对固定发行物、合成会话、精确请求和栅格输出;没有读取实际终端 glyph 字体、fallback、字重或相关 profile 偏好的有效值。不能把同像素解释成某字体请求无效、粗体偏好关闭或原版属性未实现。没有换字符、颜色、字体或 ROI,也没有补抓或重跑。 + +## 离线审核与发布 + +[validation.json](validation.json)原样复制普通导出,与 `python -O` 导出逐字节相同,SHA256 为 `da5c2b2615339d057a71a94b3bd50580477f9d5e2e70a670ee1a8dde177b42d3`。[独立 stdlib 审核](audit.json)未导入探针、分析器或导出器作为 oracle;另外重算精确输入、DSR/NAWS、完整模板与实际 CRLF 注入文件、8+5 源、4047 文件、模块、五次 grab、28 对位置/ROI、完整像素签名、消息/原件一致性及回收记录。31 份私有记录保留大小和 SHA,源文件另归档于 local。 + +结果整理前合并了 main `4d7bd8a7c822135b1fdee5935262af3205ee565f`,合并提交 `848d479af194ad8cf1f6238dc4e33774ade7da43`;这属于发布上下文,不是再次执行的源码身份。合并后没有重跑原版、REA、Node、peer 或 guest,也没有重跑 15 项或完整产品矩阵。 + +本项只完成这次有界调查与不可判定结果的可重算发布。完整非颜色属性、内部 pen、全网格、其他模式、本地 Shell 运输、实际呈现和性能继续未知;#123/#126/#27 与 R2 不因此通过。REA capture45 秒、CLI wait60 秒不含前置启动和后续清理,不构成整程期限或性能结果。 diff --git a/research/ui/results/2026-10-29-sgr1-reference/audit.json b/research/ui/results/2026-10-29-sgr1-reference/audit.json new file mode 100644 index 00000000..4a47d98a --- /dev/null +++ b/research/ui/results/2026-10-29-sgr1-reference/audit.json @@ -0,0 +1,276 @@ +{ + "schema": "termforge-sgr1-independent-audit-v1", + "issue": 146, + "audit_method": "stdlib only; no probe, analyzer or exporter imports", + "actual_source_commit": "a115bc82119dcf1456e8bf9a7c0e15bee3d77174", + "tool_implementation_commit": "8d44041cefbf566b5fb1eb7433bdfa0231235ef1", + "source_closure_files": 13, + "source_bytes_match_both_commits": true, + "actual_original_runs": 1, + "new_original_runs_in_audit": 0, + "guest_requests_in_audit": 0, + "plan_sha256": "d0286fade7bf18f3dbea5e44ed91b8c5e1a5f595b0900978abcc758e9b06af45", + "public_validation_sha256": "da5c2b2615339d057a71a94b3bd50580477f9d5e2e70a670ee1a8dde177b42d3", + "normal_optimized_byte_equal": true, + "manifest_members": 4047, + "source_and_copy_full_hashes_match": true, + "manifest_canonical_sha256": "e459adf2f12adb6a1b7f55e66a9da1c22794185e66e848057d21e0c60d669203", + "module_full_hashes_and_runtime_path_guards_match": true, + "generated_template_and_actual_script_exact_match": true, + "actual_script_line_endings": "CRLF", + "evidence_id": "ev_c6e7637ba0e47033ec012529a35c909bb21a805f98b6743e809cdb28958721d4", + "raw_evidence_sha256": "565bc0ad8c2232f5e5b03f4635b6e0e607cf1b83a63475d77585aadc46e0e7e8", + "frozen_grid": [ + 91, + 25 + ], + "naws_history": [ + [ + 91, + 24 + ], + [ + 91, + 25 + ] + ], + "freeze_event_count": 2, + "phase_audits": [ + { + "phase": 0, + "source_bytes": 34, + "dsr": [ + 2, + 16 + ], + "is_alt": false, + "rois": 4, + "controls_repeated": true, + "controls_distinguishable": false, + "classification": null + }, + { + "phase": 1, + "source_bytes": 36, + "dsr": [ + 1, + 21 + ], + "is_alt": true, + "rois": 6, + "controls_repeated": true, + "controls_distinguishable": false, + "classification": null + }, + { + "phase": 2, + "source_bytes": 34, + "dsr": [ + 4, + 23 + ], + "is_alt": true, + "rois": 6, + "controls_repeated": true, + "controls_distinguishable": false, + "classification": null + }, + { + "phase": 3, + "source_bytes": 40, + "dsr": [ + 1, + 21 + ], + "is_alt": true, + "rois": 6, + "controls_repeated": true, + "controls_distinguishable": false, + "classification": null + }, + { + "phase": 4, + "source_bytes": 37, + "dsr": [ + 2, + 37 + ], + "is_alt": false, + "rois": 6, + "controls_repeated": true, + "controls_distinguishable": false, + "classification": null + } + ], + "grabs": [ + 0, + 1, + 2, + 3, + 4 + ], + "marker_groups": 28, + "roi_arrays": 56, + "qrgb_samples": 8064, + "roi_shape": [ + 8, + 18 + ], + "unique_complete_pixel_signatures": 1, + "recorded_job": { + "active": 0, + "total": 3, + "terminated": 0 + }, + "profile": { + "only_synthetic_session": true, + "session_count": 1 + }, + "entry_repeat_return_unique_control": [ + null, + null, + null + ], + "internal_bold_verified": false, + "presented_done": null, + "limitations": [ + "The fixed SGR0/SGR1 controls are pixel-indistinguishable, so reset/inheritance/restore and font-weight mechanisms remain unknown.", + "This is offline verification of recorded files, not a new process/Job observation or a repeat target execution." + ], + "publication_context": { + "merged_main": "4d7bd8a7c822135b1fdee5935262af3205ee565f", + "publication_merge_commit": "848d479af194ad8cf1f6238dc4e33774ade7da43", + "executed_source_commit": "a115bc82119dcf1456e8bf9a7c0e15bee3d77174", + "post_merge_new_original_runs": 0, + "public_plan_sha256": "1b1411b7caa6637b2bd3665a6c8d969697ecca3e1d67fa9fab6a849cd760039a", + "validation_copied_without_modification": true + }, + "independent_audit_script_sha256": "ed08d5c6914b1141c593245e6463b9ccb986091c7a18fe0075c68236adc1345d", + "private_records": { + "r146-sgr1-0/run.json": { + "bytes": 620, + "sha256": "f958eb4d00b43d328c0c639beacb36a6072e8696db8ba4b9fada7d7e41a814cc" + }, + "r146-sgr1-0/files.json": { + "bytes": 637666, + "sha256": "a25c87cba935294d5bfd3bbc76c650d31a8473809564d798ad5a889e4aea00e8" + }, + "r146-sgr1-0/peer.json": { + "bytes": 1855, + "sha256": "a6d5a911dc2269c133c5dd75b214313f6d0b22435353fdefbe58a66419861b39" + }, + "r146-sgr1-0/probe.js": { + "bytes": 29259, + "sha256": "b67fd1e31a57ed6004d72fa0885f3bf7987bd1a8c319babdf15fa12bdc94c54e" + }, + "r146-sgr1-0/sgr1-raster-result.json": { + "bytes": 106769, + "sha256": "af42d30b770cc26f680bdc3c1a301f604b5925bc6a02ffdf019f5f75b42ce9eb" + }, + "r146-sgr1-0/evidence.json": { + "bytes": 216159, + "sha256": "565bc0ad8c2232f5e5b03f4635b6e0e607cf1b83a63475d77585aadc46e0e7e8" + }, + "r146-sgr1-0/cleanup.json": { + "bytes": 42, + "sha256": "8400f93b6a4a4a50cde35b5d474660590ed215732f55772a9d8afac138da4f1d" + }, + "r146-sgr1-0/profile-check.json": { + "bytes": 52, + "sha256": "5e522a64e98197722ccd084639b1ce50258b238e03be2f016e81c8af023b5ee1" + }, + "r146-sgr1-0/stderr.txt": { + "bytes": 0, + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "r146-sgr1-0/fixture-ready": { + "bytes": 20, + "sha256": "622d3895d17f825845b8a486e94c55b2db0fa84777cb6a4d3c2f72414fd5469f" + }, + "r146-sgr1-0/ack-0": { + "bytes": 8, + "sha256": "b737815f5ca9697f685dfe2b5fe1f7b12a180562f97da5a72e90eaedd9890876" + }, + "r146-sgr1-0/ack-1": { + "bytes": 8, + "sha256": "b737815f5ca9697f685dfe2b5fe1f7b12a180562f97da5a72e90eaedd9890876" + }, + "r146-sgr1-0/ack-2": { + "bytes": 8, + "sha256": "b737815f5ca9697f685dfe2b5fe1f7b12a180562f97da5a72e90eaedd9890876" + }, + "r146-sgr1-0/ack-3": { + "bytes": 8, + "sha256": "b737815f5ca9697f685dfe2b5fe1f7b12a180562f97da5a72e90eaedd9890876" + }, + "r146-sgr1-0/ack-4": { + "bytes": 8, + "sha256": "b737815f5ca9697f685dfe2b5fe1f7b12a180562f97da5a72e90eaedd9890876" + }, + "r146-sgr1-authorized-20261029.json": { + "bytes": 5160, + "sha256": "d0286fade7bf18f3dbea5e44ed91b8c5e1a5f595b0900978abcc758e9b06af45" + }, + "r146-sgr1-authorized-20261029.attempted": { + "bytes": 64, + "sha256": "b57964204c6607cd5fda8574ffc08c085c24bd9e83040e91869cdc9bbfc37a15" + }, + "r146-sgr1-proposal.json": { + "bytes": 5172, + "sha256": "adaaaf1c53e161fe1f6ec161943839b2bfc4be5d0e04aa029003cb671a385350" + }, + "r146-sgr1-proposal-v2.json": { + "bytes": 5172, + "sha256": "6d04124b88fcc9aa1325a99850ed4708ab8a7fc689cecdabee7aea5052104397" + }, + "r146-run.log": { + "bytes": 688, + "sha256": "52dc838fcf9f92829a9dd11798dd8dbd26c8611e7478e95fdafe5b5d17b7f770" + }, + "r146-run-exit.json": { + "bytes": 75, + "sha256": "d5ab356b180bf96ce402ba159dea1a1f0da192a95f41930545119a4ac3c69f13" + }, + "r146-export-normal.json": { + "bytes": 157450, + "sha256": "da5c2b2615339d057a71a94b3bd50580477f9d5e2e70a670ee1a8dde177b42d3" + }, + "r146-export-optimized.json": { + "bytes": 157450, + "sha256": "da5c2b2615339d057a71a94b3bd50580477f9d5e2e70a670ee1a8dde177b42d3" + }, + "r146-export-normal.log": { + "bytes": 88, + "sha256": "748da9f732302d7ceb0a3b9e888abebcb3c4490c320a05956f242e2615101e1a" + }, + "r146-export-optimized.log": { + "bytes": 88, + "sha256": "748da9f732302d7ceb0a3b9e888abebcb3c4490c320a05956f242e2615101e1a" + }, + "r146-export-normal-exit.json": { + "bytes": 24, + "sha256": "75876e0e3f497cad271143ba85bd4f36569cd81195509043f860dab14265b716" + }, + "r146-export-optimized-exit.json": { + "bytes": 24, + "sha256": "75876e0e3f497cad271143ba85bd4f36569cd81195509043f860dab14265b716" + }, + "r146-independent-audit.json": { + "bytes": 3367, + "sha256": "58f75951ece1242fc7de51551354f55a52124da593ba0f9566102878366a7540" + }, + "r146-audit-actual.py": { + "bytes": 15984, + "sha256": "ed08d5c6914b1141c593245e6463b9ccb986091c7a18fe0075c68236adc1345d" + }, + "r146-audit-actual.log": { + "bytes": 290, + "sha256": "2de9a48f7b169c1f9a075d2d6b0262af1555d72e6c3390ea643a43056db39e9b" + }, + "r146-audit-actual-exit.json": { + "bytes": 24, + "sha256": "75876e0e3f497cad271143ba85bd4f36569cd81195509043f860dab14265b716" + } + }, + "private_record_count": 31 +} diff --git a/research/ui/results/2026-10-29-sgr1-reference/plan.json b/research/ui/results/2026-10-29-sgr1-reference/plan.json new file mode 100644 index 00000000..f5e8cb0e --- /dev/null +++ b/research/ui/results/2026-10-29-sgr1-reference/plan.json @@ -0,0 +1,93 @@ +{ + "schema": "termforge-sgr1-plan-v1", + "issue": 146, + "case_id": "sgr1-capture-v1", + "maximum_original_runs": 1, + "execution_authorized": true, + "source_base_commit": "a115bc82119dcf1456e8bf9a7c0e15bee3d77174", + "rea_prepared_identity": { + "version": "6.7.0", + "shim_sha256": "d092352a4088e7df223e9fe39039d703411dc5cbd39990f69756ade448ef1de4", + "package_json_sha256": "3f6c47fb12c8388f291a21e7f99a876495d03aee671b3b6a0708dd12d6ebb570", + "entry_sha256": "ed06cee49505b95a3cc5fceb1b4b279167e26df86227c644bb366ffffdbaf738" + }, + "module_sha256": { + "WindTerm.exe": "7b10531dccc7cd614ae559f36f1ef518e0c96335637431b4646354823b2804d0", + "Qt5Core.dll": "8d2ff4ce9096ddccc4f4cd62c2e41fc854cfd1b0d6e8d296645a7f5fd4ae565a", + "Qt5Gui.dll": "5e7d2d41b8b92a880e83b8cc0ca173f5da61218604186196787ee1600956be1e", + "Qt5Widgets.dll": "3788c669d4b645e5a576de9fc77fca776bf516d43c89143dc2ca28291ba14358" + }, + "files_manifest_sha256": "e459adf2f12adb6a1b7f55e66a9da1c22794185e66e848057d21e0c60d669203", + "rea_capture_seconds": 45, + "cli_wait_timeout_seconds": 60, + "whole_lifecycle_bound_seconds": null, + "source_files_sha256": { + "research/ui/sgr1_reference.py": "963d1164af53e6bc57c5d2841d48a4f422cd2903b4fe0e762fbd26553dc656d8", + "research/ui/raster_raw_reference.py": "942902683fac816aa4271faaab31b01505aaab8ea6624f131f272e03a4548824", + "research/ui/raster_raw_reference.js": "bc427feb65650b1f90e6f882af405bbc88f93d1df2e2e249fb7960a90696869e", + "research/ui/alternate_style_reference.py": "3136e620a462a36ea3358c917eb4e207f32aa52db7c75ae14ba8856eba1eafcd", + "research/ui/alternate_reference.py": "94b85d49347e0e9813f7acddf0244f58520a7d1fce14084677c91cf4ddafffea", + "research/ui/r1_launch.py": "54fb41872c6abcc48242a0938044184854b016785cc13659c66b1bf404da0d8a", + "research/ui/launch.py": "6970e0d4f2fe5e7ec4827df7aa1026cd0e74aeb828cdc9b7a0b42b3c887eb4e6", + "research/ui/qt_r1_text.js": "f5820d413fdd72c13dffcefbf4d0ade615abfe15754c6b0b52e1e098814eea6f" + }, + "offline_audit_files_sha256": { + "research/ui/sgr1_analysis.py": "65af7130f705a21e81918ae86e62ed03e5db7b2ee6699b32b100b23d5f30c087", + "research/ui/export_sgr1_reference.py": "44cd3b6415f53415bd8405923bc3d5ed19ec00025ff8a5cb92b308d802115489", + "research/ui/raster_raw_analysis.py": "019d2c2616ac3942160da19289c7d4ee0fa7560dcd3c6d27f732cf724da98e50", + "research/ui/raster_selection_analysis.py": "745cda14921a383ca9baf6ec85242982ca587396b8464a3d27047ecf204a8845", + "research/ui/export_raster_raw_reference.py": "581b034eb18944e91e4cc07b23702e224e62939c4616686a15430eca0959261a" + }, + "generated_capture_sha256": "d245425ba4215b1c0cea3546720b397de36df3c6c6bf8b86d29405a466e61e51", + "phases": [ + { + "phase": 0, + "label": "main-controls-end-sgr1", + "source_hex": "1b5b306d1b5b324a1b5b481b5b323b33484e3020482048201b5b316d423020482048", + "source_bytes": 34, + "source_sha256": "47595c12e92593673e2d27d3c485d6bce1187b20aabeae08f0219cca75ce8bb0", + "dsr_suffix_hex": "1b5b366e" + }, + { + "phase": 1, + "label": "1049-entry-with-controls", + "source_hex": "1b5b3f3130343968453020482048201b5b306d454e20482048201b5b316d454220482048", + "source_bytes": 36, + "source_sha256": "7cbbfc713e560873081b561974e68ea91e04d47d72b238d89eb752bfaa12e9c7", + "dsr_suffix_hex": "1b5b366e" + }, + { + "phase": 2, + "label": "alternate-end-sgr1", + "source_hex": "1b5b343b33481b5b306d41302048204820414e20482048201b5b316d414220482048", + "source_bytes": 34, + "source_sha256": "873380655f527f9f130435eedd3af9d04ac944c82311c4e9b1c93ac8eace6e84", + "dsr_suffix_hex": "1b5b366e" + }, + { + "phase": 3, + "label": "1049-repeat-with-controls-end-sgr0", + "source_hex": "1b5b3f3130343968523020482048201b5b306d524e20482048201b5b316d5242204820481b5b306d", + "source_bytes": 40, + "source_sha256": "2d369c29d963b52ac78d7dc8b2501929889984ef00e5d0754ef3996db76561eb", + "dsr_suffix_hex": "1b5b366e" + }, + { + "phase": 4, + "label": "1049-return-with-controls", + "source_hex": "1b5b3f313034396c204d3120482048201b5b306d4d4e20482048201b5b316d4d4220482048", + "source_bytes": 37, + "source_sha256": "a1046b17ab9fd1e0845354a2e38536b45113d6c9005fde2435a9e634eac15e89", + "dsr_suffix_hex": "1b5b366e" + } + ], + "phase_count": 5, + "maximum_grabs_per_phase": 1, + "maximum_grabs": 5, + "scope": "Exact same-frame SGR0/SGR1 output signatures only; no internal pen, general bold, full-grid, local-shell, presented or performance claim", + "stop": "Structural/identity/empty-image/ROI/DPR/selection/caret failures stop. Equal/inconsistent controls or incomparable shapes leave output classification unknown; color differences/ties leave the font-weight mechanism unknown, even when the exact output uniquely matches. No moved ROI, extra grab or retry.", + "actual_original_runs_at_preparation": 0, + "recorded_original_runs_after_completion": 1, + "private_plan_sha256": "d0286fade7bf18f3dbea5e44ed91b8c5e1a5f595b0900978abcc758e9b06af45", + "publication_note": "Sanitized identity of the consumed single-attempt plan; not an executable replay entry." +} diff --git a/research/ui/results/2026-10-29-sgr1-reference/validation.json b/research/ui/results/2026-10-29-sgr1-reference/validation.json new file mode 100644 index 00000000..db6e1910 --- /dev/null +++ b/research/ui/results/2026-10-29-sgr1-reference/validation.json @@ -0,0 +1,6663 @@ +{ + "schema": "termforge-original-sgr1-reference-v1", + "issue": 146, + "case_id": "sgr1-capture-v1", + "status": "captured-five-sgr1-raster-phases", + "reason": null, + "raw_capture_complete": true, + "source_base_commit": "a115bc82119dcf1456e8bf9a7c0e15bee3d77174", + "source_files_sha256": { + "research/ui/sgr1_reference.py": "963d1164af53e6bc57c5d2841d48a4f422cd2903b4fe0e762fbd26553dc656d8", + "research/ui/raster_raw_reference.py": "942902683fac816aa4271faaab31b01505aaab8ea6624f131f272e03a4548824", + "research/ui/raster_raw_reference.js": "bc427feb65650b1f90e6f882af405bbc88f93d1df2e2e249fb7960a90696869e", + "research/ui/alternate_style_reference.py": "3136e620a462a36ea3358c917eb4e207f32aa52db7c75ae14ba8856eba1eafcd", + "research/ui/alternate_reference.py": "94b85d49347e0e9813f7acddf0244f58520a7d1fce14084677c91cf4ddafffea", + "research/ui/r1_launch.py": "54fb41872c6abcc48242a0938044184854b016785cc13659c66b1bf404da0d8a", + "research/ui/launch.py": "6970e0d4f2fe5e7ec4827df7aa1026cd0e74aeb828cdc9b7a0b42b3c887eb4e6", + "research/ui/qt_r1_text.js": "f5820d413fdd72c13dffcefbf4d0ade615abfe15754c6b0b52e1e098814eea6f" + }, + "offline_audit_files_sha256": { + "research/ui/sgr1_analysis.py": "65af7130f705a21e81918ae86e62ed03e5db7b2ee6699b32b100b23d5f30c087", + "research/ui/export_sgr1_reference.py": "44cd3b6415f53415bd8405923bc3d5ed19ec00025ff8a5cb92b308d802115489", + "research/ui/raster_raw_analysis.py": "019d2c2616ac3942160da19289c7d4ee0fa7560dcd3c6d27f732cf724da98e50", + "research/ui/raster_selection_analysis.py": "745cda14921a383ca9baf6ec85242982ca587396b8464a3d27047ecf204a8845", + "research/ui/export_raster_raw_reference.py": "581b034eb18944e91e4cc07b23702e224e62939c4616686a15430eca0959261a" + }, + "generated_capture_sha256": "d245425ba4215b1c0cea3546720b397de36df3c6c6bf8b86d29405a466e61e51", + "rea_prepared_identity": { + "version": "6.7.0", + "shim_sha256": "d092352a4088e7df223e9fe39039d703411dc5cbd39990f69756ade448ef1de4", + "package_json_sha256": "3f6c47fb12c8388f291a21e7f99a876495d03aee671b3b6a0708dd12d6ebb570", + "entry_sha256": "ed06cee49505b95a3cc5fceb1b4b279167e26df86227c644bb366ffffdbaf738" + }, + "plan_sha256": "d0286fade7bf18f3dbea5e44ed91b8c5e1a5f595b0900978abcc758e9b06af45", + "module_sha256": { + "WindTerm.exe": "7b10531dccc7cd614ae559f36f1ef518e0c96335637431b4646354823b2804d0", + "Qt5Core.dll": "8d2ff4ce9096ddccc4f4cd62c2e41fc854cfd1b0d6e8d296645a7f5fd4ae565a", + "Qt5Gui.dll": "5e7d2d41b8b92a880e83b8cc0ca173f5da61218604186196787ee1600956be1e", + "Qt5Widgets.dll": "3788c669d4b645e5a576de9fc77fca776bf516d43c89143dc2ca28291ba14358" + }, + "files_manifest_sha256": "e459adf2f12adb6a1b7f55e66a9da1c22794185e66e848057d21e0c60d669203", + "maximum_original_runs": 1, + "actual_original_runs": 1, + "rea_capture_seconds": 45, + "cli_wait_timeout_seconds": 60, + "whole_lifecycle_bound_seconds": null, + "frozen_grid": [ + 91, + 25 + ], + "naws_history": [ + [ + 91, + 24 + ], + [ + 91, + 25 + ] + ], + "freeze_event_count": 2, + "planned_phase_count": 5, + "observed_phase_count": 5, + "grab_phases": [ + 0, + 1, + 2, + 3, + 4 + ], + "phases": [ + { + "phase": 0, + "label": "main SGR0/1 controls", + "cursor_reply": [ + 2, + 16 + ], + "grab_attempted": true, + "constructed": [ + "pixmap", + "image" + ], + "destroyed": [ + "image", + "pixmap" + ], + "capture_valid": true, + "reason": null, + "image": { + "viewport_width": 888, + "viewport_height": 451, + "grab_rect": [ + 0, + 0, + 887, + 450 + ], + "pixmap_dpr": 1, + "image_dpr": 1, + "width": 888, + "height": 451, + "is_null": false, + "is_null_raw_value": 0, + "is_null_raw_type": "number" + }, + "rois": [ + { + "ordinal": 0, + "group": "control-normal", + "sample": 0, + "h_rect": [ + 187, + 18, + 8, + 18 + ], + "space_rect": [ + 179, + 18, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 1, + "group": "control-normal", + "sample": 1, + "h_rect": [ + 203, + 18, + 8, + 18 + ], + "space_rect": [ + 195, + 18, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 2, + "group": "control-sgr1", + "sample": 0, + "h_rect": [ + 243, + 18, + 8, + 18 + ], + "space_rect": [ + 235, + 18, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 3, + "group": "control-sgr1", + "sample": 1, + "h_rect": [ + 259, + 18, + 8, + 18 + ], + "space_rect": [ + 251, + 18, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + } + ], + "selection": { + "caret": 16, + "anchor": 16, + "text_type": "string", + "text_length": 17 + }, + "sgr1_signature_comparison": { + "unique_control": null, + "reason": "controls-indistinguishable", + "matching_controls": [], + "signature": "Exact ordered H/space QRgb SHA256 with shape and count; two independent repeats per group", + "internal_bold_verified": false, + "font_weight_mechanism": null, + "unmatched_does_not_imply_reset": true, + "control_color_relation": { + "background": "same", + "dominant_ink": "same" + } + }, + "source_label": "main-controls-end-sgr1", + "source_hex": "1b5b306d1b5b324a1b5b481b5b323b33484e3020482048201b5b316d423020482048", + "source_sha256": "47595c12e92593673e2d27d3c485d6bce1187b20aabeae08f0219cca75ce8bb0", + "dsr_request_hex": "1b5b366e", + "cursor_reply_hex": "1b5b323b313652", + "is_alt": false, + "is_main": true + }, + { + "phase": 1, + "label": "entry SGR1 signature", + "cursor_reply": [ + 1, + 21 + ], + "grab_attempted": true, + "constructed": [ + "pixmap", + "image" + ], + "destroyed": [ + "image", + "pixmap" + ], + "capture_valid": true, + "reason": null, + "image": { + "viewport_width": 888, + "viewport_height": 451, + "grab_rect": [ + 0, + 0, + 887, + 450 + ], + "pixmap_dpr": 1, + "image_dpr": 1, + "width": 888, + "height": 451, + "is_null": false, + "is_null_raw_value": 0, + "is_null_raw_type": "number" + }, + "rois": [ + { + "ordinal": 0, + "group": "sample", + "sample": 0, + "h_rect": [ + 171, + 0, + 8, + 18 + ], + "space_rect": [ + 163, + 0, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 1, + "group": "sample", + "sample": 1, + "h_rect": [ + 187, + 0, + 8, + 18 + ], + "space_rect": [ + 179, + 0, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 2, + "group": "control-normal", + "sample": 0, + "h_rect": [ + 227, + 0, + 8, + 18 + ], + "space_rect": [ + 219, + 0, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 3, + "group": "control-normal", + "sample": 1, + "h_rect": [ + 243, + 0, + 8, + 18 + ], + "space_rect": [ + 235, + 0, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 4, + "group": "control-sgr1", + "sample": 0, + "h_rect": [ + 283, + 0, + 8, + 18 + ], + "space_rect": [ + 275, + 0, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 5, + "group": "control-sgr1", + "sample": 1, + "h_rect": [ + 299, + 0, + 8, + 18 + ], + "space_rect": [ + 291, + 0, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + } + ], + "selection": { + "caret": 37, + "anchor": 37, + "text_type": "string", + "text_length": 22 + }, + "sgr1_signature_comparison": { + "unique_control": null, + "reason": "controls-indistinguishable", + "matching_controls": [], + "signature": "Exact ordered H/space QRgb SHA256 with shape and count; two independent repeats per group", + "internal_bold_verified": false, + "font_weight_mechanism": null, + "unmatched_does_not_imply_reset": true, + "control_color_relation": { + "background": "same", + "dominant_ink": "same" + } + }, + "source_label": "1049-entry-with-controls", + "source_hex": "1b5b3f3130343968453020482048201b5b306d454e20482048201b5b316d454220482048", + "source_sha256": "7cbbfc713e560873081b561974e68ea91e04d47d72b238d89eb752bfaa12e9c7", + "dsr_request_hex": "1b5b366e", + "cursor_reply_hex": "1b5b313b323152", + "is_alt": true, + "is_main": false + }, + { + "phase": 2, + "label": "known alternate SGR1 signature", + "cursor_reply": [ + 4, + 23 + ], + "grab_attempted": true, + "constructed": [ + "pixmap", + "image" + ], + "destroyed": [ + "image", + "pixmap" + ], + "capture_valid": true, + "reason": null, + "image": { + "viewport_width": 888, + "viewport_height": 451, + "grab_rect": [ + 0, + 0, + 887, + 450 + ], + "pixmap_dpr": 1, + "image_dpr": 1, + "width": 888, + "height": 451, + "is_null": false, + "is_null_raw_value": 0, + "is_null_raw_type": "number" + }, + "rois": [ + { + "ordinal": 0, + "group": "sample", + "sample": 0, + "h_rect": [ + 187, + 54, + 8, + 18 + ], + "space_rect": [ + 179, + 54, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 1, + "group": "sample", + "sample": 1, + "h_rect": [ + 203, + 54, + 8, + 18 + ], + "space_rect": [ + 195, + 54, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 2, + "group": "control-normal", + "sample": 0, + "h_rect": [ + 243, + 54, + 8, + 18 + ], + "space_rect": [ + 235, + 54, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 3, + "group": "control-normal", + "sample": 1, + "h_rect": [ + 259, + 54, + 8, + 18 + ], + "space_rect": [ + 251, + 54, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 4, + "group": "control-sgr1", + "sample": 0, + "h_rect": [ + 299, + 54, + 8, + 18 + ], + "space_rect": [ + 291, + 54, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 5, + "group": "control-sgr1", + "sample": 1, + "h_rect": [ + 315, + 54, + 8, + 18 + ], + "space_rect": [ + 307, + 54, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + } + ], + "selection": { + "caret": 62, + "anchor": 62, + "text_type": "string", + "text_length": 24 + }, + "sgr1_signature_comparison": { + "unique_control": null, + "reason": "controls-indistinguishable", + "matching_controls": [], + "signature": "Exact ordered H/space QRgb SHA256 with shape and count; two independent repeats per group", + "internal_bold_verified": false, + "font_weight_mechanism": null, + "unmatched_does_not_imply_reset": true, + "control_color_relation": { + "background": "same", + "dominant_ink": "same" + } + }, + "source_label": "alternate-end-sgr1", + "source_hex": "1b5b343b33481b5b306d41302048204820414e20482048201b5b316d414220482048", + "source_sha256": "873380655f527f9f130435eedd3af9d04ac944c82311c4e9b1c93ac8eace6e84", + "dsr_request_hex": "1b5b366e", + "cursor_reply_hex": "1b5b343b323352", + "is_alt": true, + "is_main": false + }, + { + "phase": 3, + "label": "repeat SGR1 signature", + "cursor_reply": [ + 1, + 21 + ], + "grab_attempted": true, + "constructed": [ + "pixmap", + "image" + ], + "destroyed": [ + "image", + "pixmap" + ], + "capture_valid": true, + "reason": null, + "image": { + "viewport_width": 888, + "viewport_height": 451, + "grab_rect": [ + 0, + 0, + 887, + 450 + ], + "pixmap_dpr": 1, + "image_dpr": 1, + "width": 888, + "height": 451, + "is_null": false, + "is_null_raw_value": 0, + "is_null_raw_type": "number" + }, + "rois": [ + { + "ordinal": 0, + "group": "sample", + "sample": 0, + "h_rect": [ + 171, + 0, + 8, + 18 + ], + "space_rect": [ + 163, + 0, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 1, + "group": "sample", + "sample": 1, + "h_rect": [ + 187, + 0, + 8, + 18 + ], + "space_rect": [ + 179, + 0, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 2, + "group": "control-normal", + "sample": 0, + "h_rect": [ + 227, + 0, + 8, + 18 + ], + "space_rect": [ + 219, + 0, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 3, + "group": "control-normal", + "sample": 1, + "h_rect": [ + 243, + 0, + 8, + 18 + ], + "space_rect": [ + 235, + 0, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 4, + "group": "control-sgr1", + "sample": 0, + "h_rect": [ + 283, + 0, + 8, + 18 + ], + "space_rect": [ + 275, + 0, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 5, + "group": "control-sgr1", + "sample": 1, + "h_rect": [ + 299, + 0, + 8, + 18 + ], + "space_rect": [ + 291, + 0, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + } + ], + "selection": { + "caret": 37, + "anchor": 37, + "text_type": "string", + "text_length": 22 + }, + "sgr1_signature_comparison": { + "unique_control": null, + "reason": "controls-indistinguishable", + "matching_controls": [], + "signature": "Exact ordered H/space QRgb SHA256 with shape and count; two independent repeats per group", + "internal_bold_verified": false, + "font_weight_mechanism": null, + "unmatched_does_not_imply_reset": true, + "control_color_relation": { + "background": "same", + "dominant_ink": "same" + } + }, + "source_label": "1049-repeat-with-controls-end-sgr0", + "source_hex": "1b5b3f3130343968523020482048201b5b306d524e20482048201b5b316d5242204820481b5b306d", + "source_sha256": "2d369c29d963b52ac78d7dc8b2501929889984ef00e5d0754ef3996db76561eb", + "dsr_request_hex": "1b5b366e", + "cursor_reply_hex": "1b5b313b323152", + "is_alt": true, + "is_main": false + }, + { + "phase": 4, + "label": "return SGR1 signature", + "cursor_reply": [ + 2, + 37 + ], + "grab_attempted": true, + "constructed": [ + "pixmap", + "image" + ], + "destroyed": [ + "image", + "pixmap" + ], + "capture_valid": true, + "reason": null, + "image": { + "viewport_width": 888, + "viewport_height": 451, + "grab_rect": [ + 0, + 0, + 887, + 450 + ], + "pixmap_dpr": 1, + "image_dpr": 1, + "width": 888, + "height": 451, + "is_null": false, + "is_null_raw_value": 0, + "is_null_raw_type": "number" + }, + "rois": [ + { + "ordinal": 0, + "group": "sample", + "sample": 0, + "h_rect": [ + 299, + 18, + 8, + 18 + ], + "space_rect": [ + 291, + 18, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 1, + "group": "sample", + "sample": 1, + "h_rect": [ + 315, + 18, + 8, + 18 + ], + "space_rect": [ + 307, + 18, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 2, + "group": "control-normal", + "sample": 0, + "h_rect": [ + 355, + 18, + 8, + 18 + ], + "space_rect": [ + 347, + 18, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 3, + "group": "control-normal", + "sample": 1, + "h_rect": [ + 371, + 18, + 8, + 18 + ], + "space_rect": [ + 363, + 18, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 4, + "group": "control-sgr1", + "sample": 0, + "h_rect": [ + 411, + 18, + 8, + 18 + ], + "space_rect": [ + 403, + 18, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + }, + { + "ordinal": 5, + "group": "control-sgr1", + "sample": 1, + "h_rect": [ + 427, + 18, + 8, + 18 + ], + "space_rect": [ + 419, + 18, + 8, + 18 + ], + "h": { + "samples": 144, + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 84 + }, + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + }, + { + "rgba": [ + 75, + 40, + 50, + 255 + ], + "count": 9 + }, + { + "rgba": [ + 75, + 75, + 50, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 75, + 81, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 75, + 107, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 107, + 40, + 50, + 255 + ], + "count": 7 + }, + { + "rgba": [ + 107, + 75, + 81, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 205, + 140, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 205, + 202, + 255 + ], + "count": 2 + }, + { + "rgba": [ + 205, + 205, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 205, + 248, + 171, + 255 + ], + "count": 8 + }, + { + "rgba": [ + 205, + 248, + 242, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 140, + 255 + ], + "count": 1 + }, + { + "rgba": [ + 248, + 205, + 202, + 255 + ], + "count": 1 + } + ] + }, + "space": { + "samples": 144, + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "hash_encoding": "UTF-8 compact JSON array of unsigned QRgb values", + "histogram": [ + { + "rgba": [ + 40, + 40, + 50, + 255 + ], + "count": 144 + } + ] + }, + "background_rgba": [ + 40, + 40, + 50, + 255 + ], + "dominant_ink_rgba": [ + 40, + 75, + 140, + 255 + ], + "dominant_ink_candidates": [ + { + "rgba": [ + 40, + 75, + 140, + 255 + ], + "count": 16 + } + ], + "ink_observed": true, + "status": "unique-dominant-ink", + "raw_signature": { + "h": { + "shape": [ + 8, + 18 + ], + "sha256": "1ecf635bbea0bfeb40dc95f2aeb2161678cfcde544dc0ffa8f581a93d6c02f54", + "samples": 144 + }, + "space": { + "shape": [ + 8, + 18 + ], + "sha256": "8e572b4409fc2c661ec8df07be7fa3e2e40b39110b2a3696f5cd724efa3839be", + "samples": 144 + } + } + } + ], + "selection": { + "caret": 37, + "anchor": 37, + "text_type": "string", + "text_length": 38 + }, + "sgr1_signature_comparison": { + "unique_control": null, + "reason": "controls-indistinguishable", + "matching_controls": [], + "signature": "Exact ordered H/space QRgb SHA256 with shape and count; two independent repeats per group", + "internal_bold_verified": false, + "font_weight_mechanism": null, + "unmatched_does_not_imply_reset": true, + "control_color_relation": { + "background": "same", + "dominant_ink": "same" + } + }, + "source_label": "1049-return-with-controls", + "source_hex": "1b5b3f313034396c204d3120482048201b5b306d4d4e20482048201b5b316d4d4220482048", + "source_sha256": "a1046b17ab9fd1e0845354a2e38536b45113d6c9005fde2435a9e634eac15e89", + "dsr_request_hex": "1b5b366e", + "cursor_reply_hex": "1b5b323b333752", + "is_alt": false, + "is_main": true + } + ], + "same_frame_signature_comparisons": [ + { + "phase": 0, + "unique_control": null, + "reason": "controls-indistinguishable", + "matching_controls": [], + "signature": "Exact ordered H/space QRgb SHA256 with shape and count; two independent repeats per group", + "internal_bold_verified": false, + "font_weight_mechanism": null, + "unmatched_does_not_imply_reset": true, + "control_color_relation": { + "background": "same", + "dominant_ink": "same" + } + }, + { + "phase": 1, + "unique_control": null, + "reason": "controls-indistinguishable", + "matching_controls": [], + "signature": "Exact ordered H/space QRgb SHA256 with shape and count; two independent repeats per group", + "internal_bold_verified": false, + "font_weight_mechanism": null, + "unmatched_does_not_imply_reset": true, + "control_color_relation": { + "background": "same", + "dominant_ink": "same" + } + }, + { + "phase": 2, + "unique_control": null, + "reason": "controls-indistinguishable", + "matching_controls": [], + "signature": "Exact ordered H/space QRgb SHA256 with shape and count; two independent repeats per group", + "internal_bold_verified": false, + "font_weight_mechanism": null, + "unmatched_does_not_imply_reset": true, + "control_color_relation": { + "background": "same", + "dominant_ink": "same" + } + }, + { + "phase": 3, + "unique_control": null, + "reason": "controls-indistinguishable", + "matching_controls": [], + "signature": "Exact ordered H/space QRgb SHA256 with shape and count; two independent repeats per group", + "internal_bold_verified": false, + "font_weight_mechanism": null, + "unmatched_does_not_imply_reset": true, + "control_color_relation": { + "background": "same", + "dominant_ink": "same" + } + }, + { + "phase": 4, + "unique_control": null, + "reason": "controls-indistinguishable", + "matching_controls": [], + "signature": "Exact ordered H/space QRgb SHA256 with shape and count; two independent repeats per group", + "internal_bold_verified": false, + "font_weight_mechanism": null, + "unmatched_does_not_imply_reset": true, + "control_color_relation": { + "background": "same", + "dominant_ink": "same" + } + } + ], + "runtime_module_path_guards": [ + { + "name": "WindTerm.exe", + "path_guard_passed": true + }, + { + "name": "Qt5Core.dll", + "path_guard_passed": true + }, + { + "name": "Qt5Gui.dll", + "path_guard_passed": true + }, + { + "name": "Qt5Widgets.dll", + "path_guard_passed": true + } + ], + "provider": { + "evidence_id": "ev_c6e7637ba0e47033ec012529a35c909bb21a805f98b6743e809cdb28958721d4", + "provider": { + "id": "frida", + "name": "Frida", + "version": null + }, + "confidence": "observed", + "subject": null, + "environment": null, + "limitations": [ + "Artifact identity is unavailable for this observation.", + "The target operating system and architecture were not reported by this observation." + ] + }, + "lifecycle": { + "outer_job": { + "active": 0, + "total": 3, + "terminated": 0 + }, + "profile": { + "only_synthetic_session": true, + "session_count": 1 + }, + "deliberate_original_termination": true, + "natural_gui_exit_verified": false + }, + "raw_files": { + "run.json": { + "bytes": 620, + "sha256": "f958eb4d00b43d328c0c639beacb36a6072e8696db8ba4b9fada7d7e41a814cc" + }, + "probe.js": { + "bytes": 29259, + "sha256": "b67fd1e31a57ed6004d72fa0885f3bf7987bd1a8c319babdf15fa12bdc94c54e" + }, + "peer.json": { + "bytes": 1855, + "sha256": "a6d5a911dc2269c133c5dd75b214313f6d0b22435353fdefbe58a66419861b39" + }, + "sgr1-raster-result.json": { + "bytes": 106769, + "sha256": "af42d30b770cc26f680bdc3c1a301f604b5925bc6a02ffdf019f5f75b42ce9eb" + }, + "evidence.json": { + "bytes": 216159, + "sha256": "565bc0ad8c2232f5e5b03f4635b6e0e607cf1b83a63475d77585aadc46e0e7e8" + }, + "cleanup.json": { + "bytes": 42, + "sha256": "8400f93b6a4a4a50cde35b5d474660590ed215732f55772a9d8afac138da4f1d" + }, + "profile-check.json": { + "bytes": 52, + "sha256": "5e522a64e98197722ccd084639b1ce50258b238e03be2f016e81c8af023b5ee1" + }, + "stderr.txt": { + "bytes": 0, + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + "internal_bold_verified": false, + "full_style_verified": false, + "full_grid_verified": false, + "local_shell_transport_verified": false, + "presented_done": null, + "r2_complete": false, + "windterm_parity": false, + "limitations": [ + "Only exact same-frame SGR0/SGR1 output signatures are compared; this does not read an internal pen or prove general font weight.", + "Each group must repeat exactly with equal ROI shapes/counts. Indistinguishable or inconsistent controls stay unknown. Color differences/ties do not invalidate an exact output signature but never establish a font-weight mechanism.", + "Only the five fixed sources and one grab per phase are covered; no ROI movement, extra grab or retry.", + "QWidget raster and direct Telnet do not prove physical presentation, local-shell transport or performance.", + "Capture45/CLI60 exclude startup and later cleanup; no whole-lifecycle deadline is claimed.", + "Raw pixels, paths, PIDs, copied original resources and synthetic profile stay local. Unknowns do not establish a reset or inherited internal style." + ] +} diff --git a/research/ui/sgr1_analysis.py b/research/ui/sgr1_analysis.py new file mode 100644 index 00000000..22fc0d78 --- /dev/null +++ b/research/ui/sgr1_analysis.py @@ -0,0 +1,72 @@ +"""Scalar-only same-frame SGR1 classification with independent repeated controls.""" +from __future__ import annotations +import types +from research.ui import raster_raw_analysis as raw +from research.ui.sgr1_reference import TARGETS + +require = raw.require +MARKERS = [[(row["label"], row["offset"], row["group"], row["sample"]) for row in target["markers"]] for target in TARGETS] +# Each clone keeps the reviewed ROI/lifetime checks and an isolated case table. +_namespace = {**vars(raw), "MARKERS": MARKERS, + "GROUPS": [[row["group"] for row in target["markers"]] for target in TARGETS]} +_namespace["marker_bindings"] = types.FunctionType(raw.marker_bindings.__code__, _namespace) +_audit_capture = types.FunctionType(raw.audit_capture.__code__, _namespace) + + +def classify_frame(rois): + grouped = {name: [] for name in ("sample", "control-normal", "control-sgr1")} + for roi in rois: + require(roi["group"] in grouped and type(roi["sample"]) is int and roi["sample"] in (0, 1), "Unexpected SGR1 ROI identity") + grouped[roi["group"]].append(roi) + for name, values in grouped.items(): + require((not values and name == "sample") or [row["sample"] for row in values] == [0, 1], "Incomplete or duplicate SGR1 controls/sample") + result = {"unique_control": None, "reason": None, "matching_controls": [], + "signature": "Exact ordered H/space QRgb SHA256 with shape and count; two independent repeats per group", + "internal_bold_verified": False, "font_weight_mechanism": None, + "unmatched_does_not_imply_reset": True} + def relation(key): + values = [row[key] for row in grouped["control-normal"] + grouped["control-sgr1"]] + return "unknown" if any(value is None for value in values) else "same" if all(value == values[0] for value in values) else "different" + result["control_color_relation"] = {"background": relation("background_rgba"), "dominant_ink": relation("dominant_ink_rgba")} + def unknown(reason): + return {**result, "reason": reason} + shapes = [(row["h_rect"][2:4], row["space_rect"][2:4]) for row in rois] + if any(shape != shapes[0] for shape in shapes): + return unknown("shapes-differ") + signatures = {name: [raw.raw_signature(row) for row in values] for name, values in grouped.items()} + if any(values[0] != values[1] for name, values in signatures.items() if name != "sample"): + return unknown("control-repeat-differs") + if signatures["control-normal"][0] == signatures["control-sgr1"][0]: + return unknown("controls-indistinguishable") + if not grouped["sample"]: + return {**result, "reason": "controls-distinct-no-unknown-sample"} + if signatures["sample"][0] != signatures["sample"][1]: + return unknown("sample-repeat-differs") + result["matching_controls"] = [label for group, label in (("control-normal", "SGR0-control-output"), ("control-sgr1", "SGR1-control-output")) + if signatures["sample"][0] == signatures[group][0]] + if len(result["matching_controls"]) == 1: + result["unique_control"] = result["matching_controls"][0] + result["reason"] = "unique-same-frame-output-match" + return result + return unknown("sample-unmatched") + + +def audit_capture(capture): + public = _audit_capture(capture) + if capture["capture_valid"]: + # All SGR1 controls occupy one actual row, including baseline/known-state stages. + markers = capture["terminal"]["markers"] + require(len({row["document_line"] for row in markers}) == 1, "SGR1 controls are not on one document row") + require(len({(row["h_rect"]["y"], row["h_rect"]["height"]) for row in markers}) == 1, "SGR1 controls do not share a logical row") + require(all(type(row["position"]) is int and 0 <= row["position"] <= 9007199254740991 for row in markers), "Invalid SGR1 text position") + require(len({row["position"] for row in markers}) == len(markers), "Aliased SGR1 text positions") + require(len({row["position"] - row["column"] for row in markers}) == 1, "SGR1 positions do not bind one text row") + require(all(left["h_rect"]["x"] < right["h_rect"]["x"] for left, right in zip(markers, markers[1:])), "Aliased or reordered SGR1 glyph rectangles") + public["sgr1_signature_comparison"] = classify_frame(public["rois"]) + else: + public["sgr1_signature_comparison"] = None + return public + + +def frame_comparisons(captures): + return [{"phase": row["phase"], **row["sgr1_signature_comparison"]} for row in captures if row["capture_valid"]] diff --git a/research/ui/sgr1_reference.py b/research/ui/sgr1_reference.py new file mode 100644 index 00000000..86071527 --- /dev/null +++ b/research/ui/sgr1_reference.py @@ -0,0 +1,162 @@ +"""One fixed SGR1 output-signature case using the immutable raw Qt capture boundary.""" +from __future__ import annotations +import argparse +import hashlib +import json +from pathlib import Path +import subprocess +import sys + +ROOT = Path(__file__).resolve().parents[2] +sys.path.insert(0, str(ROOT)) +from research.ui.alternate_style_reference import peer_class, require +from research.ui.raster_raw_reference import MODULE_SHA256, MANIFEST_SHA256, check_full_hashes + +CASE_ID = "sgr1-capture-v1" +SOURCE_FILES = ("research/ui/sgr1_reference.py", "research/ui/raster_raw_reference.py", + "research/ui/raster_raw_reference.js", "research/ui/alternate_style_reference.py", + "research/ui/alternate_reference.py", "research/ui/r1_launch.py", + "research/ui/launch.py", "research/ui/qt_r1_text.js") +AUDIT_FILES = ("research/ui/sgr1_analysis.py", "research/ui/export_sgr1_reference.py", + "research/ui/raster_raw_analysis.py", "research/ui/raster_selection_analysis.py", + "research/ui/export_raster_raw_reference.py") + + +def pair(label, group): + return [{"label": label, "offset": len(label)-3+2*sample, "group": group, "sample": sample} + for sample in (0, 1)] + + +TARGETS = [{"label": "main SGR0/1 controls", "markers": pair("N0 H H", "control-normal") + pair("B0 H H", "control-sgr1")}] +for title, sample, normal, heavy in (("entry SGR1 signature", "E0 H H", "EN H H", "EB H H"), + ("known alternate SGR1 signature", "A0 H H", "AN H H", "AB H H"), + ("repeat SGR1 signature", "R0 H H", "RN H H", "RB H H"), + ("return SGR1 signature", "M1 H H", "MN H H", "MB H H")): + TARGETS.append({"label": title, "markers": pair(sample, "sample") + pair(normal, "control-normal") + pair(heavy, "control-sgr1")}) + + +def phases(rows, columns): + require(10 <= rows <= 60 and 40 <= columns <= 160, "Controlled grid out of bounds") + return [ + ("main-controls-end-sgr1", b"\x1b[0m\x1b[2J\x1b[H\x1b[2;3HN0 H H \x1b[1mB0 H H"), + ("1049-entry-with-controls", b"\x1b[?1049hE0 H H \x1b[0mEN H H \x1b[1mEB H H"), + ("alternate-end-sgr1", b"\x1b[4;3H\x1b[0mA0 H H AN H H \x1b[1mAB H H"), + ("1049-repeat-with-controls-end-sgr0", b"\x1b[?1049hR0 H H \x1b[0mRN H H \x1b[1mRB H H\x1b[0m"), + ("1049-return-with-controls", b"\x1b[?1049l M1 H H \x1b[0mMN H H \x1b[1mMB H H"), + ] + + +def build_probe_fragment(): + """Keep the reviewed native ABI/lifecycle body; substitute only fixed case data and names.""" + source = (ROOT / "research/ui/raster_raw_reference.js").read_text(encoding="utf-8") + start, end = "const started=Date.now(),captures=[],grabs=[],targets=[", ";\nfunction modulePathMatches" + require(source.count(start) == source.count(end) == 1, "Protected capture descriptor boundary changed") + left, right = source.index(start), source.index(end) + source = source[:left] + "const started=Date.now(),captures=[],grabs=[],targets=" + json.dumps(TARGETS, separators=(",", ":")) + source[right:] + for old, new, count in (("raster-raw-result.json", "sgr1-raster-result.json", 1), + ("raw_raster_result", "sgr1_raster_result", 1), ("raw_raster_phase", "sgr1_raster_phase", 1), + ("five-stage-raw-raster-capture-v1", "five-stage-sgr1-capture-v1", 1), + ("captured-five-raw-raster-phases", "captured-five-sgr1-raster-phases", 1), + ("partial-raw-raster-capture", "partial-sgr1-raster-capture", 3)): + require(source.count(old) == count, "Protected capture case names changed") + source = source.replace(old, new) + return source + + +_BasePeer = peer_class() # Its independent namespace does not alter old peer classes. +_BasePeer._serve.__globals__["phases"] = phases + + +class Peer(_BasePeer): + def _record(self): + if self.state.get("frozen_grid") and "freeze_event_count" not in self.state: + self.state["freeze_event_count"] = len(self.state.get("naws_history", [])) + super()._record() + + +def sha(path): + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def rea_identity(rea): + package = rea.parent.parent / "rea-agents/package.json" + metadata = json.loads(package.read_text(encoding="utf-8")) + require(rea.is_file() and metadata["version"] == "6.7.0" and metadata["bin"]["rea"] == "scripts/rea.mjs", "REA version/entry differs") + return {"version": "6.7.0", "shim_sha256": sha(rea), "package_json_sha256": sha(package), + "entry_sha256": sha(package.parent / "scripts/rea.mjs")} + + +def phase_records(rows=25, columns=91): + return [{"phase": index, "label": label, "source_hex": content.hex(), "source_bytes": len(content), + "source_sha256": hashlib.sha256(content).hexdigest(), "dsr_suffix_hex": "1b5b366e"} + for index, (label, content) in enumerate(phases(rows, columns))] + + +def prepare_plan(source, out, rea, destination, execution_authorized=False): + source, out, rea, destination = [path.resolve() for path in (source, out, rea, destination)] + require(not out.exists() and not destination.exists(), "Plan/output must be new") + require(out.is_relative_to(ROOT / "local") and destination.is_relative_to(ROOT / "local"), "Plan/output must belong to this worktree local directory") + tool_identity = rea_identity(rea) + plan = {"schema": "termforge-sgr1-plan-v1", "issue": 146, "case_id": CASE_ID, + "maximum_original_runs": 1, "actual_original_runs": 0, "execution_authorized": execution_authorized, + "source_base_commit": subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=ROOT, text=True).strip(), + "source": str(source), "out": str(out), "rea": str(rea), + "rea_prepared_identity": tool_identity, + "module_sha256": check_full_hashes(source), "files_manifest_sha256": MANIFEST_SHA256, + "rea_capture_seconds": 45, "cli_wait_timeout_seconds": 60, "whole_lifecycle_bound_seconds": None, + "source_files_sha256": {name: sha(ROOT / name) for name in SOURCE_FILES}, + "offline_audit_files_sha256": {name: sha(ROOT / name) for name in AUDIT_FILES}, + "generated_capture_sha256": hashlib.sha256(build_probe_fragment().encode("utf-8")).hexdigest(), + "phases": phase_records(), "phase_count": 5, "maximum_grabs_per_phase": 1, "maximum_grabs": 5, + "scope": "Exact same-frame SGR0/SGR1 output signatures only; no internal pen, general bold, full-grid, local-shell, presented or performance claim", + "stop": "Structural/identity/empty-image/ROI/DPR/selection/caret failures stop. Equal/inconsistent controls or incomparable shapes leave output classification unknown; color differences/ties leave the font-weight mechanism unknown, even when the exact output uniquely matches. No moved ROI, extra grab or retry."} + destination.parent.mkdir(parents=True, exist_ok=True) + destination.write_text(json.dumps(plan, indent=2) + "\n", encoding="utf-8", newline="\n") + return plan + + +def run_plan(path): + path = path.resolve() + plan = json.loads(path.read_text(encoding="utf-8")) + require(plan["issue"] == 146 and plan.get("case_id") == CASE_ID and plan["maximum_original_runs"] == 1, "Unexpected SGR1 plan") + require(plan.get("execution_authorized") is True, "Offline proposal only; new original execution has not been authorized") + require(plan["source_base_commit"] == subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=ROOT, text=True).strip(), "Source commit changed after plan") + require(plan["module_sha256"] == MODULE_SHA256 and plan["files_manifest_sha256"] == MANIFEST_SHA256, "Plan module/package identity differs") + require(plan["source_files_sha256"] == {name: sha(ROOT / name) for name in SOURCE_FILES}, "Probe source changed after plan") + require(plan["offline_audit_files_sha256"] == {name: sha(ROOT / name) for name in AUDIT_FILES}, "Offline audit source changed after plan") + require(plan["generated_capture_sha256"] == hashlib.sha256(build_probe_fragment().encode()).hexdigest(), "Generated capture differs") + require(plan["phases"] == phase_records(), "Plan source differs") + require((plan["phase_count"], plan["maximum_grabs_per_phase"], plan["maximum_grabs"], plan["rea_capture_seconds"], plan["cli_wait_timeout_seconds"], plan["whole_lifecycle_bound_seconds"]) == (5, 1, 5, 45, 60, None), "Plan capture bounds differ") + source, out, rea = [Path(plan[key]).resolve() for key in ("source", "out", "rea")] + require(path.is_relative_to(ROOT / "local") and out.is_relative_to(ROOT / "local") and not out.exists(), "This run plan/output is not new/local") + require(plan["rea_prepared_identity"] == rea_identity(rea), "Prepared REA entry changed") + check_full_hashes(source) + with path.with_suffix(".attempted").open("x", encoding="utf-8") as marker: + marker.write("One authorized original launch attempt; never retry this plan.\n") + from research.ui import r1_launch + launcher = Path(r1_launch.__file__) + code = launcher.read_text(encoding="utf-8") + replacements = {"from research.ui.r1_vt_fixture import Peer": "from research.ui.sgr1_reference import Peer, build_probe_fragment", + 'Path(__file__).with_name("r1_menu_wrap.js").read_text(encoding="utf-8")': "build_probe_fragment()"} + for old, new in replacements.items(): + require(code.count(old) == 1, "Protected launcher source changed") + code = code.replace(old, new) + namespace = {"__file__": str(launcher), "__name__": "termforge_sgr1_launcher"} + exec(compile(code, str(launcher), "exec"), namespace) + namespace["run"](source, out, rea, 45, False, "menu-wrap") + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--plan", type=Path, required=True) + parser.add_argument("--prepare", action="store_true") + parser.add_argument("--authorize-execution", action="store_true") + for name in ("source", "out", "rea"): + parser.add_argument("--" + name, type=Path) + args = parser.parse_args() + if args.prepare: + require(args.source and args.out and args.rea, "Source/output/REA required") + prepare_plan(args.source, args.out, args.rea, args.plan, args.authorize_execution) + print(json.dumps({"prepared": True, "phase_count": 5, "maximum_original_runs": 1})) + else: + run_plan(args.plan) diff --git a/research/ui/test_raster_selection_reference.py b/research/ui/test_raster_selection_reference.py index eea62d40..410464da 100644 --- a/research/ui/test_raster_selection_reference.py +++ b/research/ui/test_raster_selection_reference.py @@ -33,7 +33,7 @@ def fixture(root): capture.update(label=CAPTURE_LABELS[phase],rois=[]) capture['image'].update(viewport_width=16,width=16,grab_rect=[0,0,15,1]) terminal=capture['terminal'];terminal.pop('selection',None) - lines=LABELS[phase] if phase==0 else [' '.join(LABELS[phase])] + lines=list(LABELS[phase]) if phase==0 else [' '.join(LABELS[phase])] terminal.update(lines=lines,line_count=len(lines),markers=[],selection_caret=9,selection_anchor=9,selection_text_type='string',selection_text_length=10,caret_rect={'x':16,'y':0,'width':0,'height':2}) counts={} for ordinal,group in enumerate(GROUPS[phase]): diff --git a/research/ui/test_sgr1_native_contract.js b/research/ui/test_sgr1_native_contract.js new file mode 100644 index 00000000..9ec16524 --- /dev/null +++ b/research/ui/test_sgr1_native_contract.js @@ -0,0 +1,26 @@ +'use strict'; +// Exercise the unchanged native boundary assertions against this case's generated body. +const fs = require('fs'), path = require('path'), vm = require('vm'), assert = require('assert'); +const generated = fs.readFileSync(process.argv[2], 'utf8'); +const start = generated.indexOf('const started=Date.now(),captures=[],grabs=[],targets='); +const end = generated.indexOf(';\nfunction modulePathMatches', start); +assert(start >= 0 && end > start); +const descriptors = vm.runInNewContext('(function(){' + generated.slice(start, end) + ';return targets;})()', {Date}); +assert.strictEqual(JSON.stringify(descriptors.map(row => row.markers.length)), '[4,6,6,6,6]'); +for (let stage = 0; stage < descriptors.length; ++stage) { + const groups = descriptors[stage].markers.reduce((result, row) => { + (result[row.group] ||= []).push(row.sample); return result; + }, {}); + assert.strictEqual(JSON.stringify(groups['control-normal']), '[0,1]'); + assert.strictEqual(JSON.stringify(groups['control-sgr1']), '[0,1]'); + if (stage) assert.strictEqual(JSON.stringify(groups.sample), '[0,1]'); +} +const template = path.join(__dirname, 'raster_raw_reference.js'); +const contract = fs.readFileSync(path.join(__dirname, 'test_raster_raw_native.js'), 'utf8'); +function boundaryRequire(name) { + if (name !== 'fs') return require(name); + return {...fs, readFileSync(file, ...args) { + return path.resolve(file) === template ? generated : fs.readFileSync(file, ...args); + }}; +} +vm.runInNewContext(contract, {require: boundaryRequire, __dirname, process}, {filename: 'reviewed-raw-native-contract'}); diff --git a/research/ui/test_sgr1_reference.py b/research/ui/test_sgr1_reference.py new file mode 100644 index 00000000..23c5f8e9 --- /dev/null +++ b/research/ui/test_sgr1_reference.py @@ -0,0 +1,313 @@ +"""Public SGR1 plan and scalar-analysis seams; never launch the original.""" +from __future__ import annotations +import copy +import hashlib +import json +from pathlib import Path +import shutil +import socket +import subprocess +import sys +import tempfile +import time +import unittest + +ROOT = Path(__file__).resolve().parents[2] +BG, FG = 0xff101010, 0xffeeeeee +NORMAL, HEAVY = [BG, FG, BG, FG], [FG, FG, BG, FG] + + +def roi(group, sample, pixels, shape=(2, 2), background=None): + from research.ui.raster_raw_analysis import classify_pixels + return {"group": group, "sample": sample, "h_rect": [0, 0, *shape], + "space_rect": [0, 0, *shape], **classify_pixels(pixels, background or [BG] * len(pixels))} + + +def frame(pixels=HEAVY): + return [roi("sample", 0, pixels), roi("sample", 1, pixels), + roi("control-normal", 0, NORMAL), roi("control-normal", 1, NORMAL), + roi("control-sgr1", 0, HEAVY), roi("control-sgr1", 1, HEAVY)] + + +def capture_fixture(root): + """Create synthetic external records, not a replay of original pixels.""" + from research.ui.test_raster_raw_reference import fixture as raw_fixture + from research.ui.sgr1_reference import SOURCE_FILES, AUDIT_FILES, TARGETS, phase_records, build_probe_fragment + directory, plan_path, data = raw_fixture(root) + result = data.pop("raster-raw-result.json") + result.update(status="captured-five-sgr1-raster-phases", reason=None) + records = phase_records() + for index, capture in enumerate(result["captures"]): + capture.update(label=TARGETS[index]["label"], rois=[]) + capture["image"].update(viewport_width=128, width=128, viewport_height=2, height=2, grab_rect=[0, 0, 127, 1]) + labels = list(dict.fromkeys(row["label"] for row in TARGETS[index]["markers"])) + line = " ".join(labels) + terminal = capture["terminal"] + terminal.update(lines=[line], line_count=1, markers=[], is_alt=index in (1, 2, 3), is_main=index not in (1, 2, 3), + caret_rect={"x": 128, "y": 0, "width": 0, "height": 2}) + for ordinal, descriptor in enumerate(TARGETS[index]["markers"]): + label, group, sample = [descriptor[key] for key in ("label", "group", "sample")] + column = line.index(label) + descriptor["offset"] + h, space = [ordinal*4+2, 0, 2, 2], [ordinal*4, 0, 2, 2] + terminal["markers"].append({"ordinal": ordinal, "label": label, "group": group, "sample": sample, + "document_line": 0, "column": column, "position": 100+column, + "character": "H", "preceding_character": " ", + "h_rect": dict(zip(("x", "y", "width", "height"), h)), + "space_rect": dict(zip(("x", "y", "width", "height"), space))}) + pixels = HEAVY if group == "control-sgr1" or (group == "sample" and index == 4) else NORMAL + capture["rois"].append({"ordinal": ordinal, "group": group, "sample": sample, "h_rect": h, "space_rect": space, + "h_pixels": pixels.copy(), "space_pixels": [BG]*4}) + records[index]["cursor_reply"] = capture["cursor_reply"] + data["sgr1-raster-result.json"] = result + data["cleanup.json"] = {"active": 0, "total": 3, "terminated": 0} + data["peer.json"]["records"] = records + template = (ROOT / "research/ui/qt_r1_text.js").read_text(encoding="utf-8").split("// Scenario driver", 1)[0] + build_probe_fragment() + data["run.json"]["template_sha256"] = hashlib.sha256(template.encode()).hexdigest() + plan = json.loads(plan_path.read_text()) + plan.update(issue=146, case_id="sgr1-capture-v1", execution_authorized=True, phases=phase_records(), + rea_prepared_identity={"version": "6.7.0", "shim_sha256": "a"*64, "package_json_sha256": "b"*64, "entry_sha256": "c"*64}, + source_files_sha256={name: hashlib.sha256((ROOT/name).read_bytes()).hexdigest() for name in SOURCE_FILES}, + offline_audit_files_sha256={name: hashlib.sha256((ROOT/name).read_bytes()).hexdigest() for name in AUDIT_FILES}, + generated_capture_sha256=hashlib.sha256(build_probe_fragment().encode()).hexdigest()) + plan_path.write_text(json.dumps(plan), encoding="utf-8") + write_capture_records(directory, data) + return directory, plan_path, data + + +def write_capture_records(directory, data): + captured = data["sgr1-raster-result.json"] + messages = [{"type": "send", "payload": {"kind": "sgr1_raster_phase", **copy.deepcopy(row)}} for row in captured["captures"]] + messages.append({"type": "send", "payload": {"kind": "sgr1_raster_result", **copy.deepcopy(captured)}}) + data["evidence.json"]["data"]["evidence"]["normalized_result"]["messages"] = messages + for name, value in data.items(): + (directory/name).write_text(json.dumps(value), encoding="utf-8") + + +class Sgr1ReferenceTests(unittest.TestCase): + def test_distinct_repeated_same_frame_controls_classify_exact_ordered_sample(self): + from research.ui.sgr1_analysis import classify_frame + self.assertEqual(classify_frame(frame())["unique_control"], "SGR1-control-output") + self.assertEqual(classify_frame(frame(NORMAL))["unique_control"], "SGR0-control-output") + + def test_indistinguishable_controls_remain_unknown(self): + from research.ui.sgr1_analysis import classify_frame + values = frame(NORMAL) + values[-2:] = [roi("control-sgr1", n, NORMAL) for n in (0, 1)] + result = classify_frame(values) + self.assertIsNone(result["unique_control"]) + self.assertEqual(result["reason"], "controls-indistinguishable") + + def test_equal_histograms_with_different_pixel_order_cannot_pass_repeat_gate(self): + from research.ui.sgr1_analysis import classify_frame + values = frame() + values[3] = roi("control-normal", 1, [FG, BG, FG, BG]) + self.assertEqual(values[2]["h"]["histogram"], values[3]["h"]["histogram"]) + self.assertEqual(classify_frame(values)["reason"], "control-repeat-differs") + + def test_color_difference_and_tied_ink_preserve_exact_output_fact_without_weight_claim(self): + from research.ui.sgr1_analysis import classify_frame + for pixels in ([0xffdddddd] * 4, [0xffdddddd, FG, 0xffdddddd, FG]): + values = frame(pixels) + values[-2:] = [roi("control-sgr1", n, pixels) for n in (0, 1)] + result = classify_frame(values) + self.assertEqual(result["unique_control"], "SGR1-control-output") + self.assertFalse(result["internal_bold_verified"]) + self.assertIsNone(result["font_weight_mechanism"]) + self.assertIn(result["control_color_relation"]["dominant_ink"], ("different", "unknown")) + + def test_dimensions_missing_ink_and_sample_disagreement_do_not_infer_output_match(self): + from research.ui.sgr1_analysis import classify_frame + cases = [] + values = frame(); values[-1] = roi("control-sgr1", 1, HEAVY, (1, 4)); cases.append(values) + values = frame(); values[0] = roi("sample", 0, [BG] * 4); cases.append(values) + values = frame(); values[1] = roi("sample", 1, NORMAL); cases.append(values) + values = frame(); values[3] = roi("control-normal", 1, NORMAL, background=[BG, FG, BG, BG]); cases.append(values) + for values in cases: + with self.subTest(values=values): + self.assertIsNone(classify_frame(values)["unique_control"]) + + def test_partial_or_duplicated_control_identity_is_rejected(self): + from research.ui.sgr1_analysis import classify_frame + for values in (frame()[:-1], frame() + [frame()[-1]], [*frame()[:-1], frame()[-2]]): + with self.subTest(values=values), self.assertRaises(ValueError): + classify_frame(values) + + def test_false_plan_cannot_create_attempt_or_target_directory(self): + from research.ui.sgr1_reference import run_plan + with tempfile.TemporaryDirectory() as temporary: + path = Path(temporary) / "proposal.json" + path.write_text(json.dumps({"issue": 146, "case_id": "sgr1-capture-v1", "maximum_original_runs": 1, + "execution_authorized": False})) + with self.assertRaisesRegex(ValueError, "not been authorized"): + run_plan(path) + self.assertFalse(path.with_suffix(".attempted").exists()) + self.assertEqual([p.name for p in path.parent.iterdir()], ["proposal.json"]) + + def test_five_sources_and_generated_native_capture_keep_old_template_unchanged(self): + from research.ui.sgr1_reference import build_probe_fragment, phases, TARGETS + old = (ROOT / "research/ui/raster_raw_reference.js").read_bytes() + script = build_probe_fragment() + self.assertIn("sgr1_raster_phase", script) + self.assertIn("sgr1-raster-result.json", script) + self.assertIn("Date.now()-started<=41000", script) + self.assertIn("bounded-observation-timer'),42000", script) + self.assertEqual([len(row["markers"]) for row in TARGETS], [4, 6, 6, 6, 6]) + sources = [data for _, data in phases(25, 91)] + self.assertEqual(len(sources), 5) + self.assertTrue(sources[0].endswith(b"\x1b[1mB0 H H")) + self.assertTrue(sources[1].startswith(b"\x1b[?1049hE0 H H")) + self.assertTrue(sources[2].endswith(b"\x1b[1mAB H H")) + self.assertTrue(sources[3].startswith(b"\x1b[?1049hR0 H H")) + self.assertTrue(sources[3].endswith(b"\x1b[0m")) + self.assertTrue(sources[4].startswith(b"\x1b[?1049l M1 H H")) + self.assertEqual((ROOT / "research/ui/raster_raw_reference.js").read_bytes(), old) + + def test_structural_auditor_does_not_mutate_old_case_tables(self): + from research.ui import raster_raw_analysis + before = copy.deepcopy((raster_raw_analysis.MARKERS, raster_raw_analysis.GROUPS)) + from research.ui import sgr1_analysis + self.assertEqual((raster_raw_analysis.MARKERS, raster_raw_analysis.GROUPS), before) + self.assertIsNot(sgr1_analysis._audit_capture.__globals__, raster_raw_analysis.audit_capture.__globals__) + + @unittest.skipUnless(shutil.which("node"), "Node required for the synthetic native boundary") + def test_generated_capture_retains_reviewed_native_abi_and_failure_cleanup(self): + from research.ui.sgr1_reference import build_probe_fragment + with tempfile.TemporaryDirectory() as temporary: + source = Path(temporary) / "generated.js" + source.write_text(build_probe_fragment(), encoding="utf-8", newline="\n") + result = subprocess.run(["node", str(ROOT / "research/ui/test_sgr1_native_contract.js"), str(source)], + capture_output=True, text=True, timeout=10) + self.assertEqual(result.returncode, 0, result.stderr) + + def test_full_synthetic_capture_exports_identical_bytes_under_normal_and_optimized(self): + with tempfile.TemporaryDirectory() as temporary: + root = Path(temporary); directory, plan, _ = capture_fixture(root) + outputs = [] + for optimized in (False, True): + destination = root / ("optimized.json" if optimized else "normal.json") + process = subprocess.run([sys.executable, *(["-O"] if optimized else []), str(ROOT / "research/ui/export_sgr1_reference.py"), + "--directory", str(directory), "--plan", str(plan), "--destination", str(destination)], + capture_output=True, text=True, timeout=10) + self.assertEqual(process.returncode, 0, process.stderr) + outputs.append(destination.read_bytes()) + self.assertEqual(outputs[0], outputs[1]) + public = json.loads(outputs[0]) + self.assertTrue(public["raw_capture_complete"]) + self.assertEqual(public["observed_phase_count"], 5) + self.assertEqual([row["unique_control"] for row in public["same_frame_signature_comparisons"]], + [None, "SGR0-control-output", "SGR0-control-output", "SGR0-control-output", "SGR1-control-output"]) + self.assertIsNone(public["presented_done"]) + self.assertFalse(public["internal_bold_verified"]) + self.assertNotIn("h_pixels", outputs[0].decode()) + self.assertNotIn("space_pixels", outputs[0].decode()) + + def test_aliases_tiny_outside_roi_and_private_text_are_rejected_without_output(self): + changes = [lambda c: c["terminal"]["markers"][1].update(position=c["terminal"]["markers"][0]["position"]), + lambda c: c["terminal"]["markers"][1]["h_rect"].update(x=c["terminal"]["markers"][0]["h_rect"]["x"]), + lambda c: c["rois"][0]["h_rect"].__setitem__(2, 0), + lambda c: c["rois"][0]["h_rect"].__setitem__(0, 128), + lambda c: c["terminal"]["lines"].__setitem__(0, "PRIVATE-HOST-TEXT")] + from research.ui.export_sgr1_reference import export + for index, change in enumerate(changes): + with self.subTest(case=index), tempfile.TemporaryDirectory() as temporary: + root = Path(temporary); directory, plan, data = capture_fixture(root) + change(data["sgr1-raster-result.json"]["captures"][1]) + write_capture_records(directory, data) + destination = root / "public/result.json" + with self.assertRaises(ValueError): + export(directory, plan, destination) + self.assertFalse(destination.parent.exists()) + + def test_partial_capture_retains_observed_prefix_without_synthesizing_later_frames(self): + from research.ui.export_sgr1_reference import export + with tempfile.TemporaryDirectory() as temporary: + root = Path(temporary); directory, plan, data = capture_fixture(root) + captured = data["sgr1-raster-result.json"] + captured.update(status="partial-sgr1-raster-capture", reason="selection-endpoints-unavailable") + captured["captures"] = captured["captures"][:2] + capture = captured["captures"][-1] + capture.update(capture_valid=False, reason="selection-endpoints-unavailable", image=None, rois=[], + constructed=[], destroyed=[], grab_attempted=False) + capture["terminal"]["selection_anchor"] = None + capture["terminal"]["selection_caret"] = None + captured["grab_phases"] = [0] + data["peer.json"]["records"] = data["peer.json"]["records"][:2] + data["peer.json"]["received_hex"] = "1b5b313b3152" * 2 + data["peer.json"]["complete"] = False + (directory / "ack-1").unlink() + write_capture_records(directory, data) + destination = root / "public.json" + public = export(directory, plan, destination) + self.assertFalse(public["raw_capture_complete"]) + self.assertEqual(public["observed_phase_count"], 2) + self.assertIsNone(public["phases"][-1]["sgr1_signature_comparison"]) + + def test_stop_before_source_freeze_does_not_fabricate_a_grid_or_frame(self): + from research.ui.export_sgr1_reference import export + with tempfile.TemporaryDirectory() as temporary: + root = Path(temporary); directory, plan, data = capture_fixture(root) + data["sgr1-raster-result.json"].update(status="partial-sgr1-raster-capture", reason="first-run-guard", captures=[], grab_phases=[]) + peer = data["peer.json"] + peer.update(records=[], received_hex="", complete=False, columns=None, rows=None, naws_history=[]) + peer.pop("frozen_grid"); peer.pop("freeze_event_count") + write_capture_records(directory, data) + public = export(directory, plan, root / "public.json") + self.assertEqual(public["observed_phase_count"], 0) + self.assertIsNone(public["frozen_grid"]) + self.assertIsNone(public["freeze_event_count"]) + self.assertFalse(public["raw_capture_complete"]) + + @unittest.skipUnless(hasattr(socket, "SO_EXCLUSIVEADDRUSE"), "Windows exclusive-bind peer") + def test_byte_fragmented_peer_delivers_only_fixed_five_sources_after_each_ack(self): + from research.ui.sgr1_reference import Peer, phases + class OneByteConnection: + def __init__(self, connection): self.connection = connection + def __getattr__(self, name): return getattr(self.connection, name) + def recv(self, count): return self.connection.recv(min(count, 1)) + class OneByteListener: + def __init__(self, listener): self.listener = listener + def __getattr__(self, name): return getattr(self.listener, name) + def accept(self): + connection, address = self.listener.accept() + return OneByteConnection(connection), address + class FragmentedPeer(Peer): + def _serve(self): + self.listener = OneByteListener(self.listener) + super()._serve() + def read_exact(client, count): + result = bytearray() + while len(result) < count: + part = client.recv(count-len(result)) + self.assertTrue(part, "Peer closed before full fixed source") + result.extend(part) + return bytes(result) + def wait_until(predicate): + deadline = time.monotonic()+2 + while not predicate() and time.monotonic() < deadline: + time.sleep(.005) + self.assertTrue(predicate(), "Bounded synthetic peer condition failed") + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary); peer = FragmentedPeer(directory) + try: + with socket.create_connection(("127.0.0.1", peer.port), timeout=2) as client: + self.assertEqual(read_exact(client, 9), bytes([255,251,1,255,251,3,255,253,31])) + client.sendall(bytes([255,250,31,0,91,0,25,255,240])) + (directory / "fixture-ready").write_text("synthetic-ready") + for index, (_, source) in enumerate(phases(25, 91)): + self.assertEqual(read_exact(client, len(source)+4), source+b"\x1b[6n") + client.sendall(b"\x1b[1;1R") + wait_until(lambda: len(peer.state["records"]) > index and peer.state["records"][index].get("cursor_reply") == [1, 1]) + self.assertEqual(peer.state["phase"], index) + (directory / f"ack-{index}").write_text("captured") + wait_until(lambda: peer.state.get("complete")) + finally: + peer.close() + self.assertIsNone(peer.state.get("error")) + self.assertEqual(peer.state["frozen_grid"], [91, 25]) + self.assertEqual(peer.state["naws_history"], [[91, 25]]) + self.assertEqual(peer.state["freeze_event_count"], 1) + self.assertEqual(len(peer.state["records"]), 5) + + +if __name__ == "__main__": + unittest.main()