V10.386 harden Gemini compose defaults
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
This commit is contained in:
@@ -41,6 +41,16 @@ def test_core_runtime_services_keep_memory_limits_and_healthchecks():
|
||||
assert 'curl", "-f", "http://localhost:80/health"' in _service_block(compose, "momo-app")
|
||||
|
||||
|
||||
def test_core_runtime_services_pin_gemini_fallback_off_by_default():
|
||||
compose = DOCKER_COMPOSE.read_text(encoding="utf-8")
|
||||
core_services = ("momo-app", "scheduler", "telegram-bot")
|
||||
|
||||
for service_name in core_services:
|
||||
block = _service_block(compose, service_name)
|
||||
assert "- GEMINI_API_HARD_DISABLED=${GEMINI_API_HARD_DISABLED:-true}" in block
|
||||
assert "- GEMINI_FALLBACK_ENABLED=${GEMINI_FALLBACK_ENABLED:-false}" in block
|
||||
|
||||
|
||||
def test_optional_compose_services_stay_behind_profiles():
|
||||
compose = DOCKER_COMPOSE.read_text(encoding="utf-8")
|
||||
expected_profiles = {
|
||||
|
||||
@@ -608,6 +608,21 @@ def test_marketplace_matcher_bridges_maquillage_shiseido_counter_alias():
|
||||
assert "brand_conflict" not in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_promotes_kate_bare_lip_line_with_series_copy():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
diagnostics = score_marketplace_match(
|
||||
"即期品【KATE 凱婷】柔霧裸唇膏-東京夜喫茶系列(裸色系霧面唇膏/4色任選)",
|
||||
"【KATE 凱婷】柔霧裸唇膏 (2.3g)",
|
||||
momo_price=320,
|
||||
competitor_price=320,
|
||||
)
|
||||
|
||||
assert diagnostics.score >= 0.76
|
||||
assert diagnostics.hard_veto is False
|
||||
assert "shared_identity_anchor_kate_bare_lip" in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_rejects_refill_core_vs_case_only_pack():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
|
||||
Reference in New Issue
Block a user