fix(data): vintage自检补覆盖率撕裂告警——VPS真数实测暴露v1盲区:cashflow洗库中段8%vs两表100%但max_period同为Q2'26,仅看max报了OK漏掉撕裂;补=三报表coverage最大-最小>50pp告警(三报表同批披露稳态应同步,中段/某表大面积失败即触发);+1真形态测试 [vps]
CI/CD / test (push) Successful in 7s
CI/CD / nas-deploy (push) Successful in 6s
CI/CD / nas-verify (push) Successful in 10s

This commit is contained in:
2026-09-01 19:17:03 +08:00
parent 5d0a0bf6d3
commit 8bcca3146b
2 changed files with 23 additions and 1 deletions
@@ -76,6 +76,19 @@ class TestCheckAll:
_, alerts = svc.check_all(tmp_path)
assert alerts == []
def test_coverage_tear_alert(self, tmp_path):
"""max_period 相同但覆盖率撕裂 (洗库中段形态): 某表大面积滞后 → 告警。
09-01 晚真数实测暴露的 v1 盲区: cashflow 洗到 8% vs 两表 100%,
max 同为 Q2'26, 仅看 max 会漏报。
"""
_mk_table(tmp_path, "balance", {"a": ["2026-06-30"], "b": ["2026-06-30"]})
_mk_table(tmp_path, "income", {"a": ["2026-06-30"], "b": ["2026-06-30"]})
_mk_table(tmp_path, "cashflow", {
"a": ["2026-06-30"], "b": ["2026-03-31"], "c": ["2026-03-31"]})
_, alerts = svc.check_all(tmp_path)
assert any("覆盖率撕裂" in a and "cashflow=33%" in a for a in alerts)
def test_valuation_stale_alert(self, tmp_path):
"""估值表 (每日 ak-eod) 超 48h 未刷新 → 断更告警。"""
_mk_table(tmp_path, "balance", {"a": ["2026-06-30"]})