from pathlib import Path def test_runtime_code_does_not_read_old_walk_strategy_json(): text = "\n".join(path.read_text(encoding="utf-8") for path in Path("content_agent").rglob("*.py")) assert "douyin_available_" + "walk_strategy.v1.json" not in text def test_p6_json_does_not_copy_p5_rule_evaluator_structures(): text = Path("product_documents/抖音游走策略/douyin_walk_strategy.v1.json").read_text( encoding="utf-8" ) assert "hard_gates" not in text assert "scorecard" not in text assert "thresholds" not in text def test_default_tests_do_not_assign_real_service_secrets(): text = "\n".join(path.read_text(encoding="utf-8") for path in Path("tests").rglob("*.py")) assert "CONTENTFIND_OPENROUTER_" + "API_KEY=" not in text assert "CONTENT_SUPPLY_DB_" + "PASSWORD=" not in text