Stu Mason
Stu Mason

Activity

Pull Request Merged

PR #110 merged: fix(reports): jsonb_exists() instead of ? to avoid PDO clash

Root cause

Postgres's `?` jsonb-key-exists operator clashes with PDO positional placeholder `?`. Every leaderboard / chart query that filtered on `raw_json ? 'score'` silently returned 0 rows (caught by panel try/catch, rendered as "No data").

Fix

Replace `raw_json ? 'score'` with `jsonb_exists(raw_json, 'score')` across all reports. Same semantics, no PDO conflict.

Affected reports

  • /reports/predicting-hn — leaderboard + validation chart
  • /reports/scoreboard — leaderboard + stat grid + chart
  • /reports/claude-code-wars — leaderboard
+10
additions
-10
deletions
3
files changed