feat: pre-compute profile snapshots via background worker
Phase 1 — MusehubProfileSnapshot ORM model (handle PK, data_json, computed_at, is_stale) + Alembic migration profile_snapshot_precompute.
Phase 2 — ProfileSnapshotProvider: computes stats, repos, heatmap, agent_fleet, badges, footprint, activity_canvas and upserts musehub_profile_snapshots. Special worker handler for profile.snapshot jobs (like gc).
Phase 3 — enqueue_profile_snapshot() in musehub_jobs.py; wired into musehub_wire.py push path alongside enqueue_push_intel.
Phase 4 — SSR profile route reads snapshot first (24-hour TTL); falls back to live computation on miss/stale and enqueues a refresh job inline.
Phase 5 — 11 TDD tests: ORM persistence, provider compute/upsert/idempotency, no-op for unknown handles, enqueue idempotency, SSR fast-path, stale fallback, missing fallback, HTML 200 with snapshot.
0 comments
muse hub commit comment sha256:dd74be8aa38b823ad1f95ba71db8b38de35a20405f36b36c654a2266119663bb --body "your comment"
No comments yet. Be the first to start the discussion.