58 lines
4.0 KiB
Python
58 lines
4.0 KiB
Python
from pathlib import Path
|
||
import hashlib
|
||
import json
|
||
import shutil
|
||
|
||
folder = Path(__file__).parent
|
||
root = Path('C:/wechat_rpa')
|
||
change = Path('C:/kefu/deploy/customer-picker-20260918')
|
||
read = lambda name: json.loads((folder / name).read_text(encoding='utf-8-sig'))
|
||
ui = read('frozen-customers-tests.json')
|
||
notifications = read('frozen-customer-notifications.json')
|
||
frozen = read('frozen-release-qa.json')
|
||
integrity = read('nsis-payload-integrity.json')
|
||
assert ui['tests_run'] == 90 and not ui['failures'] and not ui['errors'] and not ui['skipped'] and not ui['blocked_external_actions']
|
||
assert notifications['ok'] and notifications['passed'] == 52 and not notifications['skipped'] and not notifications['blocked_external_actions']
|
||
assert frozen['sourceManifestMatches'] and frozen['privateFilesExcluded'] and frozen['uiAssetsMatchSource']
|
||
assert integrity['crcPassed'] and integrity['completeDeflateStream'] and not integrity['missingFiles']
|
||
manifest = read('build-source-manifest.json')
|
||
for name, digest in manifest.items():
|
||
assert hashlib.sha256((root / name).read_bytes()).hexdigest() == digest, name
|
||
old = root / 'releases/甄AI客服-安装包-v1.4.25.exe'
|
||
assert hashlib.sha256(old.read_bytes()).hexdigest() == 'bd58b73c7f4b1c87a810e380867ed7caffa65337200371e85b256d25c0efc62f'
|
||
installer = root / 'dist/installer/甄AI客服-安装包-v1.4.26.exe'
|
||
release = root / 'releases' / installer.name
|
||
digest = hashlib.sha256(installer.read_bytes()).hexdigest()
|
||
assert digest == integrity['installerSha256']
|
||
if release.exists():
|
||
assert hashlib.sha256(release.read_bytes()).hexdigest() == digest, 'Existing release differs'
|
||
else:
|
||
shutil.copy2(installer, release)
|
||
assert hashlib.sha256(release.read_bytes()).hexdigest() == digest
|
||
report = {'version': '1.4.26', 'installer': str(release), 'bytes': release.stat().st_size,
|
||
'sha256': digest, 'frozenUiAndContactsTests': 90, 'frozenNotificationTests': 52,
|
||
'frozenTestsPassed': 142, 'realMessagesSent': 0, 'existingSettingsChanged': False,
|
||
'installed': False, 'cloudDeploymentNeeded': False, 'oldInstallerPreserved': True,
|
||
'actualCachedCustomerCount': 2, 'actualCachedWecomCustomerChats': 2,
|
||
'unrelatedAddressbookRowsExcluded': 214}
|
||
(folder / 'release-v1.4.26.json').write_text(json.dumps(report, ensure_ascii=False, indent=2), encoding='utf-8')
|
||
(folder / 'RESULT.md').write_text(f'''# 客户联系人选择修复 v1.4.26
|
||
|
||
联系人来源改为当前托管企业微信账号的“通讯录 → 我的客户”,支持真实企业微信客户 S 单聊及属于客户关系的 M 单聊;不再混入私人微信通讯录。默认展示全部客户,支持备注/昵称/编号搜索和排序;选中后保留蓝色高亮、客户类型与完整编号详情。
|
||
|
||
只有用户手动指定的一位联系人可作为医疗助理收件人。原配置不会自动替换,更换后提醒默认关闭;开启及发送前均再次核验当前账号和有效客户关系。无实际会话或状态未核验的客户只展示并解释原因,不推导发送地址。
|
||
|
||
生产和源目录已定向更新。真实缓存只读核验为 2 位客户、2 个企业微信单聊、昵称均可读,排除 214 条私人通讯录;数据库主文件哈希未变化。状态 2049/2057 仅作为当前适配构建已核验值,未知状态保持不可选。
|
||
|
||
包内实际冻结代码已通过 90 项客户/界面和 52 项提醒测试(共 142 项),零失败、零跳过、零真实外部操作。冻结代码/网页资源与最终源文件一致,安装包 CRC、完整压缩流及全部应用文件哈希验证通过;不包含联系人数据库、账号配置或凭证。
|
||
|
||
安装包:`{release}`
|
||
|
||
SHA256:`{digest}`
|
||
|
||
旧版 1.4.25 保留。未安装、重启用户客户端或发送真实消息;本轮不需要管理端部署。安装新版后,打开“自动化设置 → 医疗助理审核提醒 → 更换助理联系人”,从“我的客户”选择并核对助理,再手动开启提醒。
|
||
|
||
代码备份与只读验证报告位于 `{change}`。
|
||
''', encoding='utf-8')
|
||
print(json.dumps(report, ensure_ascii=False))
|