test_p6_drift_guards.py 841 B

123456789101112131415161718192021222324
  1. from pathlib import Path
  2. def test_runtime_code_does_not_read_old_walk_strategy_json():
  3. text = "\n".join(path.read_text(encoding="utf-8") for path in Path("content_agent").rglob("*.py"))
  4. assert "douyin_available_" + "walk_strategy.v1.json" not in text
  5. def test_p6_json_does_not_copy_p5_rule_evaluator_structures():
  6. text = Path("product_documents/抖音游走策略/douyin_walk_strategy.v1.json").read_text(
  7. encoding="utf-8"
  8. )
  9. assert "hard_gates" not in text
  10. assert "scorecard" not in text
  11. assert "thresholds" not in text
  12. def test_default_tests_do_not_assign_real_service_secrets():
  13. text = "\n".join(path.read_text(encoding="utf-8") for path in Path("tests").rglob("*.py"))
  14. assert "CONTENTFIND_OPENROUTER_" + "API_KEY=" not in text
  15. assert "CONTENT_SUPPLY_DB_" + "PASSWORD=" not in text