feat: PLANNING体系首版(00路线图/02任务总表/03执行协议/I-03/I-04/registry42口径)+M1止血交付

This commit is contained in:
2026-09-12 14:25:25 +08:00
commit 39af400fc8
472 changed files with 36277 additions and 0 deletions
@@ -0,0 +1,26 @@
"""迷你计算库 —— dim4 fixture(内含 3 处缺陷,供被测模型修复)。"""
from __future__ import annotations
def add(a: float, b: float) -> float:
return a + b
def div(a: float, b: float) -> float:
# 缺陷 1:除数为 0 时未按规格抛 ValueError
return a / b
def average(values: list[float]) -> float:
# 缺陷 2:空列表时未按规格返回 0.0
return sum(values) / len(values)
def clamp(value: float, lo: float, hi: float) -> float:
# 缺陷 3:上下界次序写反,越界时不收敛
if value < lo:
return hi
if value > hi:
return lo
return value