Files
kefu/deploy/protocol-file-identity-20260917/finish_report.py
T
2026-09-21 10:34:06 +08:00

27 lines
1.7 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import hashlib
import os
from pathlib import Path
import sys
root = Path(__file__).resolve().parent
target = root / 'TEST_REPORT.md'
installer = Path(sys.argv[1]).resolve(strict=True)
digest = hashlib.file_digest(installer.open('rb'), 'sha256').hexdigest()
detail = f'''- 1.4.17 使用生产构建环境 Python 3.12.14 打包,包含 `python312.dll`。
- 生产打包自检通过;独立检查冻结 PYZ 确认包含本次 `fstat` 修复,冻结函数在 Python 3.12 的临时文件哈希测试通过,UI 资源匹配,没有混入私有配置。
- 主程序 SHA256:`dceb8289a6d5d8a9fb5b6e14ce7acd5a1dd82399f3ea3e1d74ae0cb24cc7ac19`。
- **打包后真实验证**:用新 EXE 的 `--protocol-diagnostics` 隐藏运行只读诊断,退出码 0,错误列表为空,企业微信版本/当前登录/消息库均核对通过。协议构建校验约 2.33 秒;包含额外模块静态扫描的完整深度诊断共 10.69 秒,不能与普通按钮检测耗时直接对比。结果见 `frozen-protocol-diagnostics.json`。
- 打包版同样保留缺少真实回执时的首次发送验证要求。
- 安装包:`{installer}`。
- 安装包 SHA256:`{digest}`。
- 本次没有关闭用户当前 1.4.16 程序,没有替换正在使用的安装目录,也没有发布到服务器。退出旧版后安装 1.4.17,再点击“检测本机协议”;如提示首次发送验证,需按当前账号完成真实验证。
'''
old = '1.4.17 正在构建。打包程序的真实诊断及安装包校验结果完成后补充。'
content = target.read_text(encoding='utf-8')
assert old in content
temporary = target.with_suffix('.md.tmp')
temporary.write_text(content.replace(old, detail), encoding='utf-8')
os.replace(temporary, target)
print(str(target))
print(digest)