XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEEDToolBox

【WinUI】XFE精英危险工具箱

公开
关注 0 Fork 0 Star 0
UTF-8
"""Record the original images and detail crops inspected during the cache repair."""
import hashlib
import json
from pathlib import Path

root = Path("work/visual/market-recovery").resolve()
def evidence(path):
    path = Path(path).resolve()
    return {"path": str(path), "sha256": hashlib.sha256(path.read_bytes()).hexdigest()}

images = [evidence(root / name) for name in (
    "reopen-1/market.png", "reopen-1/overview.png", "reopen-2/market.png",
    "final-details/status-2x.png", "final-details/table-2x.png", "running-client/capture.png")]
reports = [evidence(root / name) for name in ("reopen-1/report.json", "reopen-2/report.json", "normal-client.json")]
checks = [
    ("no-cache-error", "已查看最终构建的商品页、概览原图与 2 倍状态区;顶部没有红色缓存错误条。另查看已重启正常客户端的后台截图,概览同样没有错误条;实际绑定 HasError=false,错误文本为空。", [images[0], images[1], images[3], images[5], *reports]),
    ("real-market", "原图和 2 倍详情中显示 15,110 个站点、2,266,775 条报价,三条完整商品行有站点、售价、供需与采集时间。OCR 的计数与实际 XAML 绑定和数据库统计吻合,局部英文/数字存在 OCR 误识别,以原图及探针交叉验证。", [images[0], images[3], images[4], evidence(root / "final-ocr.json"), reports[0]]),
    ("reopen-stable", "两个最终客户端进程均独立打开真实库,每次进行两轮六种排序、站点商品过滤、有效坐标站点的区域查询,返回 150 行且无错误。随后通过启动脚本重启正常客户端,60 秒四次采样接收 922 条消息、接受 35 批行情,均无错误;探针不连接游戏,正常客户端导航保持 Idle。", [images[0], images[2], images[5], *reports]),
]
review = {
    "capture": str(root / "final-capture/capture.json"),
    "preparations": [str(root / "final-details/prepare.json")],
    "scope": {"target": "XFE ED 工具箱最终构建的实际商品缓存与重启后的正常客户端", "state": "错误恢复、真实非空行情、重复启动及持续接收的限定验收;不涵盖实飞或整套界面审美", "identity_confirmed": True, "freshness_confirmed": True, "coverage_complete": True},
    "inspected_images": images,
    "checks": [{"id": name, "status": "pass", "observation": observation, "evidence": files} for name, observation, files in checks],
}
(root / "review.json").write_text(json.dumps(review, ensure_ascii=False, indent=2), encoding="utf-8")