fix(db): drop the 2 orphaned scoring-intelligence tables from #4619 - #4676
Merged
Conversation
issue_quality_reports and registry_drift_events were scaffolded in 0004_scoring_intelligence.sql alongside 6 sibling tables that all got wired with real read+write paths -- these two alone never did. The "issue quality report" concept now lives entirely in the generic signal_snapshots cache via src/services/issue-quality.ts instead. Confirmed zero rows in both tables on the live production database before writing this migration. Completes #4619's remaining scope (PR #4666 already shipped the other 12 verified-dead-export removals; this piece was deliberately deferred pending that confirmation). Fixes #4619
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
21 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4676 +/- ##
=======================================
Coverage 94.14% 94.14%
=======================================
Files 435 435
Lines 38576 38566 -10
Branches 14060 14060
=======================================
- Hits 36316 36308 -8
+ Misses 1601 1599 -2
Partials 659 659
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Completes #4619's deferred scope. PR #4666 already removed the other 12 confirmed-dead exports; the
issue_quality_reports/registry_drift_eventsDB-table drop was deliberately held back pendingconfirmation there's no production data, since that can't be verified from the codebase alone.
Confirmed directly against the live production database: both tables have zero rows. Safe to drop.
Both were scaffolded in migration
0004_scoring_intelligence.sqlalongside 6 sibling tables(
scoring_model_snapshots,score_previews,contributor_evidence,contributor_scoring_profiles,burden_forecasts,bounty_lifecycle_events) that all got wired with real read+write paths — these twoalone never did. The "issue quality report" concept now lives entirely in the generic
signal_snapshotscache via
src/services/issue-quality.tsinstead.Changes
migrations/0141_drop_orphaned_scoring_intelligence_tables.sql—DROP TABLE IF EXISTSfor both.src/db/schema.ts— removed the two Drizzle table definitions.src/db/repositories.ts— removedupsertIssueQualityReport/persistRegistryDriftEvents(zero callersanywhere) and their now-unused imports.
src/types.ts— removedIssueQualityReportRecord/RegistryDriftEventRecord(only ever referenced bythe two removed functions).
test/unit/db-persistence.test.ts— removed the two functions' round-trip coverage from a shared testthat also exercises other, still-live persistence helpers; kept everything else in that test intact.
Verified zero remaining references to any of these identifiers anywhere in
src/,test/, orpackages/.Testing
npm run db:migrations:checkandnpm run db:schema-drift:checkboth pass clean (144 contiguousmigrations, schema.ts matches migrations/).
test/unit/db-persistence.test.ts(24 tests) passes.Typecheck clean.
Fixes #4619