Files
cnc_wams/完善wasm/working/39-静态发布Python缓存清理Gate实施记录.md
2026-07-10 21:26:42 -04:00

27 lines
995 B
Markdown
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.
# 静态发布 Python 缓存清理 Gate 实施记录
## 目标
本文件落实 `ACC-051/INT-038`,防止 native/Python probes 在只读 LinuxCNC 树生成的 `__pycache__``.pyc``.pyo` 被 static build 复制进 Web 发布包。
## 实现
- `build-static.mjs` 为递归静态资产复制统一增加 filter排除 `__pycache__` 和 Python bytecode。
- 新增 `verify_static_release_hygiene.mjs`,递归扫描完整 dist发现任一缓存目录或字节码即失败。
- hygiene gate 位于 parity 的 static build 之后、其他 dist consumer 之前。
- manifest 单测锁定 build 先于 hygiene gate避免检查旧 dist。
## 验证输出
```text
gmoccapy_static_build=ok
static_release_python_cache_count=0
static_release_hygiene=ok
wrapped_rotary_static_assets=ok
web_software_parity_gate=ok
```
## 结论
`ACC-051/INT-038` 完成。静态发布包不再携带由本机 Python 版本产生的缓存文件,构建结果更可复现且不泄漏主机运行残留。