Release archive
3.2.30

Corporate Trust Score Breakdown & Sentiment Column Drift

Release v3.2.30 focuses on Corporate Trust Score Breakdown, Sentiment Column Drift, and Review ID Instability.

FixedInternal
Corporate Trust Score Breakdown & Sentiment Column Drift

Release digest

Fixed

  • Corporate Trust Score Breakdowncalculate_trust_score() now returns {score, breakdown} dict as canonical single source of truth. Eliminated hardcoded breakdown values (source_diversity: 5, consistency: 10) and hardcoded 60% sentiment across 7 callers in 4 files (agent_tools.py, chat_service.py, corporate_tools.py, db_utils.py).
  • Sentiment Column Drift — Normalized sentimentai_sentiment_label in SQL queries for schema consistency across agent_tools.py and chat_service.py.
  • Review ID Instability — Replaced Python hash() with deterministic hashlib.sha256()[:16] in google_reviews_harvester.py and glassdoor_harvester.py. Prevents duplicate reviews on re-scrape across different Python processes.
  • Forensic Error Leak — Removed last str(e) exposure in forensic_service.py contract analysis error handler.

Internal

  • Chat Prompt Weights — Corrected corporate weights from 30/25/20/15/10 to canonical 25/25/15/15/10/10. Fixed crypto weights from ranges to fixed 20/20/20/15/15/10.
  • Risk Level Thresholds — Updated from 75/50/25 to canonical 80/60/40.
  • Anti-Conditional Rule — Added "NEVER say 'if'" instruction to prevent speculative language.
  • Forensic Score Clamping — AI-returned trust_score now clamped to 0-100. Added _validate_risk_level() for canonical risk level normalization.
  • 4 new test files: test_prompt_audit.py (23), test_forensic_validation.py (11), test_corporate_trust_score.py (22), test_review_id_stability.py (10)
  • Full regression: 66/66 tests passed
  • Updated PROJECT_CONTEXT.md §A2 Source Diversity mapping
  • Updated knowledge-base/docs/features/trust-score.md Runtime Contract

Technical notes