feat(activity): implement CRUD operations for daily activity cache #293
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/steeper!293
Loading…
Reference in a new issue
No description provided.
Delete branch "phase01-crud"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Three new methods on
*Cacheincache.go, completing Phase 1 of the activity view feature.API
INSERT ... ON CONFLICT DO UPDATE SETfor idempotent upsertsActivityWindowwith days sorted ASCfetched_atfor the context, or zero time if no dataCompleted
References: #175, #172, #173, #174
Testing
golangci-lint run ./internal/activity/— 0 issuesgo vet ./internal/activity/— 0 issuesgo build ./... && go test ./...— all passReview
Result: Approved — no blocking issues.
Summary: Completes Phase 1 data layer. Adds three CRUD methods to
*Cache:UpsertDailyActivity(INSERT ON CONFLICT DO UPDATE SET),GetActivityWindow(7-day window, ASC order, RFC3339 parsing),GetLastFetchTimestamp(MAX fetched_at, zero when empty). 11 new subtests (33 total) — upsert round-trip, update, context isolation, empty window, last fetch with/without data, multi-day ordering. ROADMAP2.md updated — Phase 1 fully complete.Non-blocking:
Checklist: