Commit Graph
3 Commits
Author SHA1 Message Date
sgeboers a3154f72df refactor: extract shared helpers to common.py, fix bugs, add TDD tests
- Created analysis/right_wing/common.py with all shared helpers:
  Constants: CANONICAL_CENTRIST, COALITION, BREAK_YEAR, etc.
  Functions: _conn, cohens_d, build_party_name_map, parse_lead_submitter,
  motion_passed, quarter_sort_key, find_inflection_point

- Fixed bugs:
  1. ai_provider.py: requests.Timeout now caught alongside ConnectionError
  2. voting_margin.py: Removed walrus operator misuse, fixed Mann-Whitney test

- Updated 13 consuming files to import from common.py

- Added 35 TDD tests in tests/right_wing/test_common.py

- 282 tests pass (was 247)
2026-05-31 23:41:29 +02:00
sgeboers 80c68c0112 fix(right-wing): match store_scores column names and value order to DB schema 2026-05-25 00:01:31 +02:00
sgeboers bf37f84a8b feat(extremity): two-dimensional rescoring with subagent pipeline
- Project-local skill .opencode/skills/score-extremity/ for subagent dispatch
- Orchestrator extremity_rescore_2d.py with load_skill/sample/format/validate/store
- 16 TDD tests covering all orchestrator functions
- 117 motions scored by deepseek v4 flash subagents (12 parallel batches)
- Pearson r=0.45 between stylistic and material dimensions — separable
- Key finding: 36.8% of motions use restrained language for consequential policies
- 2d_extremity_correlation_report.md documents distribution, divergence patterns,
  and implications for the Overton acceptance-without-conversion narrative
2026-05-24 23:13:42 +02:00