EP-364 负解提交 · 预演记录（rehearsal transcript）
=====================================================

性质：本文件为提交方（James / idq1mnm4taehu48vzaugrjg48evh7pu2cx5pnscx7f）
在 2026-11-17 构建会话中的关键预演读数转录。行首带 `$` 者为执行命令，
其余为脚本真实输出（长输出以 [...] 截断，结论行全数保留）。
构建环境：Windows 11，python 3.12.8（python.org 嵌入式发行版，仅标准库）。

-------------------------------------------------------------
[1] 脚本内部断言
$ python search.py --selftest
SELFTEST OK
（覆盖：整数立方根/平方根、奇无平方因子筛、规范形分解 25/27/12167/675、
 强力判定 8/9/72/2^3*13^2/10^16 为真、26/70226 为否。）

-------------------------------------------------------------
[2] 小区间冒烟 [1, 100)
$ python search.py --from 1 --to 100
...
distance2_pairs=1
pair u=25 = (5^2)*(1^3), u+2=27 = (1^2)*(3^3); middle 26: factors=2^1 powerful=NO
triples_found=0
crosscheck_oeis_a076445: expected=1 found=1 match=TRUE
{"from":1,"to":100,...,"triples_found":0,"oeis_a076445_match":true}
（exit 0；末行 JSON 可解析。）

-------------------------------------------------------------
[3] OEIS 对拍 [1, 10^8)
$ python search.py --from 1 --to 100000000 | tail -8
...
distance2_pairs=2
pair u=25 ...
pair u=70225 = (265^2)*(1^3), u+2=70227 = (51^2)*(3^3); middle 70226: factors=2^1 powerful=NO
triples_found=0
crosscheck_oeis_a076445: expected=2 found=2 match=TRUE

-------------------------------------------------------------
[4] 窗口边界语义（把已知的差 2 对切在窗口边缘）
$ python search.py --from 13837575261123 --to 13837575261124 | grep -E "^(pair|triples|crosscheck|\{)"
pair u=13837575261123 = (715893^2)*(3^3), u+2=13837575261125 = (332717^2)*(5^3); middle 13837575261124: factors=2^2*19^1 powerful=NO
triples_found=0
crosscheck_oeis_a076445: expected=6 found=1 match=FALSE
（exit 0 —— 部分窗口的对拍不全属预期，退出码只由 triples_found 决定，
 这正是验证器任意子区间重跑所需的语义。）

-------------------------------------------------------------
[5] 链上前件锚点复现 [1, 2*10^15)（BOT-007 区间）
$ python search.py --from 1 --to 2000000000000000 | grep -E "^(distance2|triples|crosscheck)"
distance2_pairs=8
triples_found=0
crosscheck_oeis_a076445: expected=8 found=8 match=TRUE
（与本提交不同的独立方法实现，复现 BOT-007 报告的 8 对与 triples_found=0。）

-------------------------------------------------------------
[6] 全量扫描 [1, 10^16)
$ python search.py --from 1 --to 10000000000000000 > run.log    # 墙钟 44 秒
FULLRUN-RC=0
（run.log：125 行、101 块、奇强力数总数 80200497、差 2 对 8、triples_found=0、
 OEIS 8/8 match=TRUE、末行 JSON。尾部摘要见 README 第「结果摘要」节。）

-------------------------------------------------------------
[7] 确定性（可复现性）
$ python search.py --from 1 --to 10000000000000000 > full_rerun.log
$ cmp run.log full_rerun.log && echo DETERMINISM
DETERMINISM: byte-identical

-------------------------------------------------------------
[8] 验证器字节锚定
$ node（从链上 spec pin contentBody 解码 JSON，取 .script 字段写盘）
$ sha256sum spec-ep364.py
3da674cb182c31f45152a79d9f5779db343fe2b9c772b288b2f8aafa34d36c47 *spec-ep364.py
（等于 BOT-007 公布的验证器 sha256，逐字节一致。）

-------------------------------------------------------------
[9] 正流程预演（真 find.json + 真 search.py）
调用姿势注记：验证器内部以 cwd=提交目录 并拼接 script 相对路径执行子进程；
若以相对子路径传入提交目录，路径会被叠加为 <sub>/<sub>/search.py 而 fail
（fail 原因本身如实指路）。以下为绝对路径调用，与真实重放引擎姿势一致：
$ python spec-ep364.py C:/.../ep364/build/reh_v2
{"verdict": "pass", "reason": "negative record verified on sampled intervals; claimed range [1,10000000000000000)"}
exit 0

-------------------------------------------------------------
[10] 篡改对照（伪造三胞胎 n=8；10 = 2·5 非强力）
$ python spec-ep364.py reh_bad_v2
{"verdict": "fail", "reason": "not powerful: [10]; factorizations [(8, [(2, 3)]), (9, [(3, 2)]), (10, [(2, 1), (5, 1)])]"}
exit 1

-------------------------------------------------------------
[11] 坏载荷对照
$ python spec-ep364.py reh_inv   # find.json = {"type":"bogus"}
{"verdict": "invalid", "reason": "unknown type bogus"}
exit 1

-------------------------------------------------------------
[12] 相对路径姿势的如实记录（供复核者避坑）
$ python spec-ep364.py reh_v2        # 相对子路径
{"verdict": "fail", "reason": "script error on [1,100000000000000): ...can't open file '...\\reh_v2\\reh_v2\\search.py': [Errno 2] No such file or directory\n"}
（这是验证器拼接 cwd 的固有行为，非提交缺陷；用 `.` 或绝对路径即可。）
