Fetching metadata from the HF Docker repository... 2 days ago
-
v3.1.0: Part B architecture migration — eliminate Hugging Face inference credit dependency
Z User
- Change 1+2: new app/ml/local_scorer.py — in-process transformers
zero-shot pipeline (DistilBERT-class default
typeform/distilbert-base-uncased-mnli), device=-1, lazy load, fail-open
- Change 3: app/ml/hf_scorer.py -> app/ml/risk_scorer.py; the remote
router.huggingface.co HTTP path is REMOVED; AIRiskScorer now scores via
LocalRiskScorer with circuit breaker (model-load failure opens it
permanently) + PII-free feature-string TTL score cache (spec §2.2)
- Change 4: Dockerfile bakes model weights at build (HF_HOME=/app/models);
a running container makes zero network calls for scoring
- Change 5: HF_INFERENCE_TOKEN / ML_HF_TOKEN removed from config, .env,
.env.example, runtime.py and health status — no HF token exists in the
deployment surface
- runtime.py: EmailRiskModel drops token param (public Hub download only)
- tests: test_hf_scorer.py -> test_risk_scorer.py with local-only
architecture pins (no httpx, no remote endpoints, no token attr);
332 tests pass
- Part … -
v3.0.0: fully autonomous engine — remove MillionVerifier, add DoH DNS worker, AI risk scorer (HF PRO, circuit breaker), i18n, normalized verdicts, remote SMTP worker
FortyDN Dev
- Autonomy: MillionVerifierProvider + mv_api_key/prefer_api_provider removed
by design; mailbox verdicts come only from the built-in SMTP engine or the
new remote SMTP probe worker (SMTP_WORKER_URL, shared-secret guarded).
- DNS/MX worker (spec 3.2/7.3): DNS-over-HTTPS on Google + Cloudflare with a
dual-resolver consistency check (dns_inconsistent), 24h MX / 1h negative
TTL cache, Punycode normalization; legacy dnspython stays as fallback.
- AI Risk Scorer (spec 3.4/Phase 4/6): HF Inference API (zero-shot NLI or
text-classification), circuit breaker (429/402/quota open permanently,
transient failures open after threshold), rule-based heuristic fallback,
PII-free feature strings, burn-rate instrumentation at /metrics/inference.
- i18n (spec 7.1/7.2): Punycode via idna, EAI/SMTPUTF8 deterministic refusal
(unsupported_eai) instead of fake verdicts.
- Normalized verdict (spec Phase 5) on ValidationResult: deterministic_verdict,
ai_risk_score, ai_label, fallback_used, cach…