Skip to content

chore: remove unused backfill scripts (SIT-302)#33

Merged
onamfc merged 1 commit into
mainfrom
brandon/sit-302-remove-backfill-scripts
Jul 1, 2026
Merged

chore: remove unused backfill scripts (SIT-302)#33
onamfc merged 1 commit into
mainfrom
brandon/sit-302-remove-backfill-scripts

Conversation

@onamfc

@onamfc onamfc commented Jul 1, 2026

Copy link
Copy Markdown
Member

What

Removes the two one-time backfill scripts and their npm entries:

  • src/scripts/backfill-bot-flags.ts
  • src/scripts/backfill-attribution.ts

Why

They're dead weight:

  • Undocumented — nothing references them, so no operator would run them.
  • Unnecessary — retention (cleanupOldAnalytics) already prunes click_events/install_events (and the rollup) per tier, so un-flagged legacy rows age out on their own within a retention window.
  • backfill:bot-flags was also incomplete — it fixed raw click_events but left already-built rollup days stale, so it never fully worked anyway.

Steady state is correct without them: new clicks are classified at ingestion (lib/bot-detection.ts). isbot is retained (used by the live classifier). Also updated one stale comment in database.ts that referenced the removed backfill.

Typecheck clean; no residual references.

These one-time backfill scripts were dead weight: undocumented, so no
operator would run them, and unnecessary — retention already deletes
click_events/install_events (and the rollup) per tier, so un-flagged
legacy rows age out on their own. The bot backfill was also incomplete
(it left already-built rollups stale). Steady state is correct without
them: new clicks are classified at ingestion.

Removes src/scripts/backfill-bot-flags.ts, src/scripts/backfill-attribution.ts,
and their npm script entries. isbot stays (used by the live classifier).
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/lib/database.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@onamfc onamfc merged commit 5b8b047 into main Jul 1, 2026
11 of 13 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant