snipe/tests/trust
pyr0ball 05f845962f
Some checks failed
CI / Python tests (push) Has been cancelled
CI / Frontend typecheck + tests (push) Has been cancelled
Mirror / mirror (push) Has been cancelled
Release / release (push) Has been cancelled
fix(trust): soften established_bad_actor for high-volume sellers; add declining_ratio flag
Fixes a false-positive edge case (snipe#52) where sellers with 500+
lifetime feedback were hard-flagged as established_bad_actor when the
12-month ratio dipped below 80% — even though the 12-month window may
cover only a small recent sample relative to lifetime history.

Changes:
- established_bad_actor hard filter now only fires for accounts with
  20–500 lifetime feedback (unchanged behavior for moderate accounts)
- Accounts >500 feedback with ratio 60–80%: new declining_ratio soft flag
  (composite score penalised but not zeroed, no hard block)
- Accounts >500 feedback with ratio <60%: still established_bad_actor
  (catastrophically bad even for high-volume sellers)
- Two new constants: HARD_FILTER_BAD_RATIO_MAX_COUNT=500,
  HARD_FILTER_BAD_RATIO_HIGH_THRESHOLD=0.60

Note: buyer-feedback-only accounts (lifetime buyer history inflating
feedback_count for new sellers) requires profile-page scraping to detect
properly — tracked in snipe#52 as medium-term work.

Tests: 22 passed
2026-04-27 12:54:51 -07:00
..
__init__.py feat: add metadata scorer, photo hash dedup, and trust aggregator 2026-03-25 13:08:55 -07:00
test_aggregator.py fix(trust): soften established_bad_actor for high-volume sellers; add declining_ratio flag 2026-04-27 12:54:51 -07:00
test_metadata.py feat: add metadata scorer, photo hash dedup, and trust aggregator 2026-03-25 13:08:55 -07:00
test_photo.py feat: add metadata scorer, photo hash dedup, and trust aggregator 2026-03-25 13:08:55 -07:00