Skip to content

fix: distinguish per-category PR checks and correct D1 database binding#58

Merged
tbjers merged 1 commit into
mainfrom
fix/checkrun-category-naming
Jul 7, 2026
Merged

fix: distinguish per-category PR checks and correct D1 database binding#58
tbjers merged 1 commit into
mainfrom
fix/checkrun-category-naming

Conversation

@tbjers

@tbjers tbjers commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • postCheckRun() now names the Check Run Coverage Tracker (<category>) for any non-default category (Coverage Tracker unchanged for default). Previously both the backend and frontend jobs posted an identically-named Coverage Tracker check, so a PR showed two indistinguishable checks — the exact distinction the category feature exists to provide. Rebuilt dist/index.js to ship the change.
  • wrangler.json's D1 binding pointed database_name at "coverage" — a stale, empty database — instead of "coverage-demo", which holds the actual production data (9 projects, 23 coverage runs). This caused the live dashboard at demo.coveragetracker.dev to show no data after a deploy. Already fixed live: applied migration 0003_categories.sql to coverage-demo (all rows correctly backfilled to category='default', no data lost) and redeployed with the corrected binding. This commit brings the checked-in config in sync with what's now running in production.

Test plan

  • npm test (.github/actions/report) — 105/105 passing, including 2 new tests covering the category-suffixed check name
  • npm run typecheck (.github/actions/report) — clean
  • Verified live: coverage-demo has migration 0003 applied and all 9 projects / 23 runs intact; wrangler deploy output confirms env.DB (coverage-demo); demo.coveragetracker.dev dashboard confirmed showing data again

🤖 Generated with Claude Code

- postCheckRun() now names the Check Run "Coverage Tracker (<category>)"
  for non-default categories instead of always "Coverage Tracker", so
  backend and frontend PR checks no longer collide under one identical
  name with no way to tell them apart.
- wrangler.json's D1 binding pointed at "coverage" (a stale, empty
  database) instead of "coverage-demo" (the database actually holding
  production data). Already corrected live via manual migration +
  deploy; this commits the config fix so the repo matches production.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
demo-coveragetracker-dev 502e3e4 Commit Preview URL

Branch Preview URL
Jul 07 2026, 01:44 AM

@tbjers
tbjers merged commit 0b26f98 into main Jul 7, 2026
8 checks passed
@tbjers
tbjers deleted the fix/checkrun-category-naming branch July 7, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant