Skip to content

Create SQLite DB for dashboard metrics - #157

Draft
binamkayastha wants to merge 3 commits into
masterfrom
154-create-sqlite-db-for-dashboard
Draft

Create SQLite DB for dashboard metrics#157
binamkayastha wants to merge 3 commits into
masterfrom
154-create-sqlite-db-for-dashboard

Conversation

@binamkayastha

Copy link
Copy Markdown
Collaborator

Summary

  • Adds metrics.sqlite as a persisted workflow artifact (downloaded/uploaded alongside database.json)
  • main.py initializes the DB on startup with posts and post_metrics tables (CREATE TABLE IF NOT EXISTS)
  • collect_metrics now writes engagement snapshots to post_metrics in SQLite instead of appending to database.json
  • record_publish_results upserts new posts to the SQLite posts table in addition to database.json

Closes #154

Test plan

  • All existing tests pass (tests/test_main.py, tests/test_collect_metrics_orchestration.py, tests/test_record_publish_results.py)
  • Dev workflow run produces a metrics.sqlite artifact
  • Subsequent workflow run downloads the previous metrics.sqlite and appends new metric rows

🤖 Generated with Claude Code

binamkayastha and others added 3 commits August 4, 2026 20:19
Creates a metrics.sqlite artifact (persisted across workflow runs) with
posts and post_metrics tables. collect_metrics now writes to SQLite
instead of database.json; record_publish_results syncs new posts to
both. Workflows download/upload metrics.sqlite alongside database.json.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
collect_metrics now appends snapshots to database.json (original
behavior) and also inserts rows into post_metrics in SQLite, so
existing consumers of database.json are unaffected during the transition.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Base automatically changed from engagement_metrics_collector to master August 12, 2026 00:17
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