mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-17 10:51:59 +00:00
完善口径管理、主动调查与后台任务,修复通用问题
- 完善口径编辑、只读试运行、统一质量验证与执行语义指纹 - 增加可执行指标约束、有预算的主动调查和过程评测 - 提取发布检查、证据读取与起草服务,支持任务停止、重试和检查点恢复 - 增加版本传递影响分析,修复并发覆盖、敏感值遮罩、异常评分及页面状态问题 - 修复 SQLite 复合查询追溯和 microVM 可选依赖缺失处理 - 纳入当前设计文档及部署配置调整 验证:相关主回归 3822 项通过,4 项跳过、8 项预期失败;补充回归通过。 前端构建、文案检查及 git diff --check 通过。 全量检查仍有环境权限、PostgreSQL 可选依赖和既有部署配置、SQLite 文件基线差异导致的未通过项。
This commit is contained in:
@@ -24,7 +24,7 @@ async def rate(rows, **params):
|
||||
|
||||
async def test_small_samples_use_fisher_and_say_it_may_be_noise():
|
||||
result = await rate([["西南", 2, 40], ["华东", 5, 230]])
|
||||
assert result["method"] == "differ.rate@1"
|
||||
assert result["method"] == "differ.rate@2"
|
||||
assert result["verdict"] == {"code": "no_evidence", "subjects": [["西南"], ["华东"]], "direction": None}
|
||||
assert result["values"]["test"] == "fisher" and result["values"]["n_a"] == "40" and result["values"]["n_b"] == "230"
|
||||
assert Fraction(result["values"]["p"]) == pytest.approx(stats.fisher_exact(2, 38, 5, 225), rel=1e-9)
|
||||
@@ -91,7 +91,7 @@ async def test_means_from_sums_and_squares_use_welch():
|
||||
assert Fraction(result["values"]["p"]) == pytest.approx(expected.p, rel=1e-9)
|
||||
assert result["verdict"]["code"] == "differs" and result["values"]["test"] == "welch"
|
||||
assert result["phrase"] == "线上的客单价(50)高于线下(40),差异站得住"
|
||||
assert result["method"] == "differ.welch@1" and result["settings"] == {"differ_alpha": 0.05, "min_n": 30}
|
||||
assert result["method"] == "differ.welch@2" and result["settings"] == {"differ_alpha": 0.05, "min_n": 30}
|
||||
|
||||
|
||||
async def test_means_from_mean_sd_and_n_and_small_samples():
|
||||
@@ -111,7 +111,7 @@ async def test_rows_mode_flags_a_single_value_that_flips_the_verdict():
|
||||
online[-1] = ["线上", "231.3"]
|
||||
s = snap("Q1", "SELECT channel, amount FROM orders", ["channel", "amount"], online + base)
|
||||
result = await analyze("differ", "rows", snaps=[s], query="Q1", by="channel", value="amount", label="客单价")
|
||||
assert result["method"] == "differ.welch_rows@1"
|
||||
assert result["method"] == "differ.welch_rows@2"
|
||||
assert result["verdict"]["code"] == "differs"
|
||||
note = next(c for c in result["caveats"] if c["code"] == "outlier_sensitive")
|
||||
assert note["text"] == "去掉最大的一笔后,差异不再站得住"
|
||||
|
||||
Reference in New Issue
Block a user