From 7cf6fda6252135cb514997a74edbb8a432805768 Mon Sep 17 00:00:00 2001 From: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com> Date: Fri, 30 Oct 2026 17:50:15 +0800 Subject: [PATCH 1/3] ci(conpty): record the Server 2022 handle growth instead of gating refs #21 The 2022 job sets TERMFORGE_CONPTY_RECORD_HANDLES so a platform-duplicated Job handle per session is recorded, while every other contract still gates. --- .github/workflows/conpty-compat.yml | 3 +++ experiments/conpty/run.py | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conpty-compat.yml b/.github/workflows/conpty-compat.yml index eb35b28f..6b28fd9e 100644 --- a/.github/workflows/conpty-compat.yml +++ b/.github/workflows/conpty-compat.yml @@ -14,6 +14,9 @@ jobs: timeout-minutes: 10 env: PYTHONUTF8: '1' + # #21: this platform duplicates one Job handle per session inside the host + # process, so the batch records the counts instead of gating on zero growth. + TERMFORGE_CONPTY_RECORD_HANDLES: '1' TERMFORGE_TEST_ARTIFACTS: ${{ github.workspace }}/build/test-artifacts steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/experiments/conpty/run.py b/experiments/conpty/run.py index 077cbc4e..840c2b45 100644 --- a/experiments/conpty/run.py +++ b/experiments/conpty/run.py @@ -104,12 +104,22 @@ def binary_path() -> Path: return ROOT / "build/conpty/Release/termforge_conpty_probe.exe" +# #21: Server 2022 duplicates one Job handle per ConPTY session inside the host +# process, so a non-startup sample can never be "steady" there. With this flag +# the batch records the counts instead of gating on them; every other contract +# still applies. +RECORD_HANDLE_GROWTH = os.environ.get("TERMFORGE_CONPTY_RECORD_HANDLES") == "1" + + def check_sample(row): """Validate telemetry independently of the native boolean result.""" - assert row["valid"] is True, row + if RECORD_HANDLE_GROWTH: + assert row["error"] == "", row + else: + assert row["valid"] is True, row assert row["ready"] and row["echo"] and row["resized"] assert row["child_signaled"] and row["active_children_after"] == 0 - if not row["startup"]: + if not row["startup"] and not RECORD_HANDLE_GROWTH: assert row["steady_resources"] assert row["handles_after"] == row["handles_before"] assert row["threads_after"] == row["threads_before"] From 75535d31341b582f3dcc315016817bcb26d7b41f Mon Sep 17 00:00:00 2001 From: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com> Date: Sat, 31 Oct 2026 10:49:03 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix(ci):=20=E5=90=8C=E6=AD=A5=20c0-settings?= =?UTF-8?q?=20=E5=BF=AB=E7=85=A7=E4=B8=AD=20run.py=20=E7=9A=84=E6=BA=90?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=93=88=E5=B8=8C=20(#228)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 本分支修改了 experiments/conpty/run.py(2022 基线改为记录制),但没有同步 benchmarks/tools/results/2026-10-29-c0-settings-*/ 里 source_files_sha256 记录的哈希, 导致 Windows 回归的 windterm_c0_settings_contract 断言失败: 54fb4187…(快照记录)!= 3766879c…(工作区实际) 三处同步为当前 run.py 的 SHA-256(3766879c…): - 2026-10-29-c0-settings-proposal/plan.json - 2026-10-29-c0-settings-reference/plan.json - 2026-10-29-c0-settings-reference/validation.json 不变的是契约本身:断言仍然要求快照与工作区一致,只是把记录更新到该分支的实际内容。 --- .../tools/results/2026-10-29-c0-settings-proposal/plan.json | 2 +- .../tools/results/2026-10-29-c0-settings-reference/plan.json | 2 +- .../results/2026-10-29-c0-settings-reference/validation.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmarks/tools/results/2026-10-29-c0-settings-proposal/plan.json b/benchmarks/tools/results/2026-10-29-c0-settings-proposal/plan.json index 4e9ffe07..26241efe 100644 --- a/benchmarks/tools/results/2026-10-29-c0-settings-proposal/plan.json +++ b/benchmarks/tools/results/2026-10-29-c0-settings-proposal/plan.json @@ -56,7 +56,7 @@ "research/ui/launch.py": "6970e0d4f2fe5e7ec4827df7aa1026cd0e74aeb828cdc9b7a0b42b3c887eb4e6", "research/ui/r1_launch.py": "54fb41872c6abcc48242a0938044184854b016785cc13659c66b1bf404da0d8a", "benchmarks/tools/play.py": "1c83f400d45f94f4d7100c177c7cf42f98d0add037c5d31f232092f4dd6b9fea", - "experiments/conpty/run.py": "c8eef1e36b6d200b2d508cef91eaa5ca79a91fa87c5daf6265b2475c31dce329" + "experiments/conpty/run.py": "3766879cafe38aabf53cfac8ab2f62985b1976b6fa24c8b6031258bdc914258f" }, "composed_template_sha256": "314e7320146bb3422e4488a41b9af1bc22b52c920b6b73e078d2c0e0761017fc", "helper_prefix_sha256": "ca8057c1979d700957eceb829e12b2d866c64eff7d3ae04daa9c95abea11299e", diff --git a/benchmarks/tools/results/2026-10-29-c0-settings-reference/plan.json b/benchmarks/tools/results/2026-10-29-c0-settings-reference/plan.json index d21be2a6..2947b32a 100644 --- a/benchmarks/tools/results/2026-10-29-c0-settings-reference/plan.json +++ b/benchmarks/tools/results/2026-10-29-c0-settings-reference/plan.json @@ -56,7 +56,7 @@ "research/ui/launch.py": "6970e0d4f2fe5e7ec4827df7aa1026cd0e74aeb828cdc9b7a0b42b3c887eb4e6", "research/ui/r1_launch.py": "54fb41872c6abcc48242a0938044184854b016785cc13659c66b1bf404da0d8a", "benchmarks/tools/play.py": "1c83f400d45f94f4d7100c177c7cf42f98d0add037c5d31f232092f4dd6b9fea", - "experiments/conpty/run.py": "c8eef1e36b6d200b2d508cef91eaa5ca79a91fa87c5daf6265b2475c31dce329" + "experiments/conpty/run.py": "3766879cafe38aabf53cfac8ab2f62985b1976b6fa24c8b6031258bdc914258f" }, "composed_template_sha256": "314e7320146bb3422e4488a41b9af1bc22b52c920b6b73e078d2c0e0761017fc", "helper_prefix_sha256": "ca8057c1979d700957eceb829e12b2d866c64eff7d3ae04daa9c95abea11299e", diff --git a/benchmarks/tools/results/2026-10-29-c0-settings-reference/validation.json b/benchmarks/tools/results/2026-10-29-c0-settings-reference/validation.json index 96142a6c..7797c14d 100644 --- a/benchmarks/tools/results/2026-10-29-c0-settings-reference/validation.json +++ b/benchmarks/tools/results/2026-10-29-c0-settings-reference/validation.json @@ -373,7 +373,7 @@ "research/ui/launch.py": "6970e0d4f2fe5e7ec4827df7aa1026cd0e74aeb828cdc9b7a0b42b3c887eb4e6", "research/ui/r1_launch.py": "54fb41872c6abcc48242a0938044184854b016785cc13659c66b1bf404da0d8a", "benchmarks/tools/play.py": "1c83f400d45f94f4d7100c177c7cf42f98d0add037c5d31f232092f4dd6b9fea", - "experiments/conpty/run.py": "c8eef1e36b6d200b2d508cef91eaa5ca79a91fa87c5daf6265b2475c31dce329" + "experiments/conpty/run.py": "3766879cafe38aabf53cfac8ab2f62985b1976b6fa24c8b6031258bdc914258f" }, "plan_sha256": "d1678750af02c27e60dec373b38ca49cca8cedd254a0c3708ea9e1b841494afc", "module_sha256": { From 129942363b3fc818d0659c9c3d9b435b26dc4c46 Mon Sep 17 00:00:00 2001 From: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com> Date: Sat, 31 Oct 2026 10:55:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix(ci):=20=E5=8F=AA=E6=9B=B4=E6=96=B0=20pl?= =?UTF-8?q?an.json=20=E7=9A=84=E6=BA=90=E6=96=87=E4=BB=B6=E5=93=88?= =?UTF-8?q?=E5=B8=8C=EF=BC=8C=E4=BF=9D=E6=8C=81=20validation=20=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E4=B8=8D=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 上一提交同时改了 c0-settings-reference/validation.json。那是该次运行的固定记录, 不是计划快照:契约测试断言的是 plan['source_files_sha256'],没有理由改写运行记录。 本次回退该文件,只保留两个 plan.json 的哈希更新。 --- .../results/2026-10-29-c0-settings-reference/validation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/tools/results/2026-10-29-c0-settings-reference/validation.json b/benchmarks/tools/results/2026-10-29-c0-settings-reference/validation.json index 7797c14d..96142a6c 100644 --- a/benchmarks/tools/results/2026-10-29-c0-settings-reference/validation.json +++ b/benchmarks/tools/results/2026-10-29-c0-settings-reference/validation.json @@ -373,7 +373,7 @@ "research/ui/launch.py": "6970e0d4f2fe5e7ec4827df7aa1026cd0e74aeb828cdc9b7a0b42b3c887eb4e6", "research/ui/r1_launch.py": "54fb41872c6abcc48242a0938044184854b016785cc13659c66b1bf404da0d8a", "benchmarks/tools/play.py": "1c83f400d45f94f4d7100c177c7cf42f98d0add037c5d31f232092f4dd6b9fea", - "experiments/conpty/run.py": "3766879cafe38aabf53cfac8ab2f62985b1976b6fa24c8b6031258bdc914258f" + "experiments/conpty/run.py": "c8eef1e36b6d200b2d508cef91eaa5ca79a91fa87c5daf6265b2475c31dce329" }, "plan_sha256": "d1678750af02c27e60dec373b38ca49cca8cedd254a0c3708ea9e1b841494afc", "module_sha256": {