Stelle den Frontend-MVP und die v0.3-API auf develop bereit, damit Dev API und PWA zusammen deployen.
Deploy Development / deploy (push) Successful in 1m19s
Test Suite / pytest-backend (push) Successful in 31s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-checks (push) Successful in 28s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-04 13:04:59 +02:00
1 parent 827e6a2a11
commit b276758ee1
152 files changed
+25846 -34

No files matched your search

@@ -0,0 +1,48 @@
from decimal import Decimal
from app.discovery.ranking import rank_candidates
def test_shortlist_uses_product_score_only(profile, scoring_model, definitions):
ranked = rank_candidates(
profile=profile,
scoring_model=scoring_model,
definitions=definitions,
shortlist_size=1,
candidates=[
{
"id": "a",
"manufacturer": "Example",
"source_title": "Example Mobile 13 32GB",
"normalized_attributes": {
"ram_gb": 32,
"storage_gb": 1024,
"weight_kg": 1.2,
"battery_score": 90,
"display_score": 90,
"cpu_score": 90,
},
},
{
"id": "b",
"manufacturer": "Example",
"source_title": "Example Mobile 13 8GB",
"normalized_attributes": {
"ram_gb": 8,
"storage_gb": 1024,
"weight_kg": 1.2,
"battery_score": 90,
"display_score": 90,
"cpu_score": 90,
},
},
],
)
assert ranked[0]["id"] == "a"
assert ranked[0]["eligible"] is True
assert ranked[0]["candidate_status"] == "SHORTLISTED"
assert ranked[0]["product_score"] == Decimal("90.21")
assert ranked[1]["eligible"] is False
assert ranked[1]["candidate_status"] == "CANDIDATE"
assert "deal_score" not in ranked[0]
assert "price_score" not in ranked[0]