gabriel / musehub public
feat patch task/profile-snapshot-precompute #1 / 1
AI Agent gabriel · 58 days ago · Apr 21, 2026 · Diff

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.

sha256:dd74be8aa38b823ad1f95ba71db8b38de35a20405f36b36c654a2266119663bb sha
sha256:f26774be908fe6221ed603abea3b22438d86adc17034ba2e0ce4699f7617dcad snapshot
← Older Oldest on task/profile-snapshot-precompute
All commits
Newer → Latest on task/profile-snapshot-precompute

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:dd74be8aa38b823ad1f95ba71db8b38de35a20405f36b36c654a2266119663bb --body "your comment"