|
|
@@ -74,18 +74,18 @@ def test_replay_id45_baseline_gemini_score(tmp_path):
|
|
|
# M3 受控变化: 画像门槛退役,改 Gemini 相关性 + 平台热度打分。
|
|
|
# 默认 FakeGeminiVideoClient 返回 fit_senior_50plus=true / relevance_score=0.85
|
|
|
# → relevance=60(满分)。平台热度按各 item digg_count 对数归一化:
|
|
|
- # real_id45 digg=[72459,20801,491098,24]。digg 491098 → heat≥0.8 → 40 → 总分100,
|
|
|
- # digg 72459 → heat≈0.4 → 20 → 总分80(两条 ≥70 进池);digg 20801、24 热度过低
|
|
|
- # → 0 → 总分60(两条落 60-69 复看)。无拒、无 pending。
|
|
|
+ # R3 第二步(2026-06-12): 抖音热度改 赞+评+转+藏 四字段复合后,
|
|
|
+ # 高转发高收藏的 content_732018(赞仅 2.1万 但转 3689/藏 1.5万)heat 0.38→总分 70,
|
|
|
+ # 从复看升进池 → 3 进池(491098/72459/20801)+1 复看(content_907506 赞 24 全低)。
|
|
|
artifacts = replay_case("real_id45", runtime_root=tmp_path / "rt")
|
|
|
assert artifacts.state["status"] == "success"
|
|
|
- assert artifacts.summary["pooled_content_count"] == 2
|
|
|
- assert artifacts.summary["review_content_count"] == 2
|
|
|
+ assert artifacts.summary["pooled_content_count"] == 3
|
|
|
+ assert artifacts.summary["review_content_count"] == 1
|
|
|
assert artifacts.summary["rejected_content_count"] == 0
|
|
|
assert artifacts.summary["pending_content_count"] == 0
|
|
|
assert _decision_counts(artifacts) == {
|
|
|
- "ADD_TO_CONTENT_POOL": 2,
|
|
|
- "KEEP_CONTENT_FOR_REVIEW": 2,
|
|
|
+ "ADD_TO_CONTENT_POOL": 3,
|
|
|
+ "KEEP_CONTENT_FOR_REVIEW": 1,
|
|
|
}
|
|
|
# 全部命中相关性+热度打分门(旧画像 reason_code 已退役)。
|
|
|
assert {d.get("decision_reason_code") for d in artifacts.decisions} == {
|
|
|
@@ -115,9 +115,9 @@ def test_replay_synthetic_review_case(tmp_path):
|
|
|
|
|
|
|
|
|
def test_replay_id45_walk_obeys_decisions_after_m4(tmp_path):
|
|
|
- # M3 受控变化: 画像门槛退役后 real_id45 拿到 2 进池 + 2 复看(原全 KEEP)。
|
|
|
+ # R3 第二步受控变化: 四字段热度复合后 real_id45 = 3 进池 + 1 复看。
|
|
|
# 进池内容驱动正常预算扩散——query 翻页、tag 扩词、作者抓作品均 success/normal;
|
|
|
- # 仅 2 条复看内容触发 budget_downgrade(low_budget)。动作仍全部带归属包与执行事实。
|
|
|
+ # 仅 1 条复看内容触发 budget_downgrade(low_budget)。动作仍全部带归属包与执行事实。
|
|
|
artifacts = replay_case("real_id45", runtime_root=tmp_path / "rt")
|
|
|
walk_actions = artifacts.files["walk_actions.jsonl"]
|
|
|
|
|
|
@@ -130,12 +130,11 @@ def test_replay_id45_walk_obeys_decisions_after_m4(tmp_path):
|
|
|
skipped_tags = [row for row in tag_actions if row["walk_status"] == "skipped"]
|
|
|
assert executed_tags
|
|
|
assert all(row["budget_tier"] == "normal" for row in executed_tags)
|
|
|
- # R8 受控变化(2026-06-12): 预算/资格拦下的标签候选不再静默;
|
|
|
- # R7 放宽 tag 预算 1→3 后,3 个名额被进池内容的标签占满,
|
|
|
- # 仍有 1 条进池内容排不上队(budget_exhausted)、2 条复看内容无资格(deny)。
|
|
|
+ # R8/R7 + R3 第二步: tag 预算 3 个名额被进池内容占满,executed 3;
|
|
|
+ # 现在 3 进池内容,2 条排不上队(budget_exhausted)、1 条复看内容无资格(deny)。
|
|
|
assert sorted(row["reason_code"] for row in skipped_tags) == [
|
|
|
"budget_exhausted",
|
|
|
- "review_tag_expansion_disabled",
|
|
|
+ "budget_exhausted",
|
|
|
"review_tag_expansion_disabled",
|
|
|
]
|
|
|
assert len(executed_tags) == 3
|
|
|
@@ -146,7 +145,7 @@ def test_replay_id45_walk_obeys_decisions_after_m4(tmp_path):
|
|
|
assert all(row["budget_tier"] == "normal" for row in author_actions)
|
|
|
|
|
|
downgrades = [row for row in walk_actions if row["edge_id"] == "budget_downgrade"]
|
|
|
- assert len(downgrades) == 2
|
|
|
+ assert len(downgrades) == 1
|
|
|
assert all(row["budget_tier"] == "low_budget" for row in downgrades)
|
|
|
assert all(row["reason_code"] == "content_score_review" for row in downgrades)
|
|
|
# M4 砍包受控变化:Budget 包及 binding 已删,KEEP 的戳回退内容包(=executed_rule_pack_id)。
|