feat: 商业版第一步·个人版包收尾(决策 228)——build_portable 三坑修复(cp315 cffi 版本错配→本地 wheels 离线安装、get-pip 在线自举卡死弃用、--no-cache-dir 绕权限)、gate 放行 /api/version* 版本状态口、强制更新冒烟断言、决策 228 与协作改进补记、误入库 pip 临时文件清理

This commit is contained in:
lianjianwei2024
2026-10-27 12:58:53 +08:00
parent 380a39f8db
commit 2726454298
10 changed files with 572 additions and 4511 deletions

View File

@@ -68,3 +68,12 @@ def test_no_build_or_empty_manifest_skips_check(reset):
gate.BUILD = SimpleNamespace(INTEGRITY={})
gate._check_build_integrity()
assert gate._INTEGRITY_FAIL == ""
def test_version_endpoints_pass_even_when_locked(reset):
"""锁定态(enforce+未激活)版本状态口也放行:排障 + 强制更新页轮询(2026-10-27 5.9)。"""
gate._cfg.update({"enforce": True})
assert gate.intercept("GET", "/api/version_info") is None
assert gate.intercept("GET", "/api/version") is None
r = gate.intercept("GET", "/api/admin/summary")
assert r is not None and r.get("code") == 403 # 其他 API 照拦,口径不变