feat(activity): handle extremely active contexts with truncation and warning #317

Merged
fuzzy merged 1 commit from phase06-high-activity into main 2026-07-07 11:34:46 +00:00
Owner

What

Add high activity detection, logging, and display, completing #246.

Changes

  • HighActivity field on DailyActivity — set to true when raw event count for a day exceeds 500
  • AggregateActivityByDay — tracks eventCount per day, sets flag and logs log.Printf warning when > 500 events in a day
  • View.HasHighActivity() — returns true if any day in the window is flagged
  • View.HighActivityDays() — returns dates of flagged days
  • statusLine — shows ! high activity indicator
  • Existing maxEvents=500 truncation in FetchActivityEvents limits total fetch volume (first 500 events across all days)

References: #246, #243, #244, #245

Testing

  • 4 new tests: 501 events triggers high (aggregation), 500 does not, View HasHighActivity with status line, View no high activity
  • go test -race ./... — all pass
## What Add high activity detection, logging, and display, completing #246. ### Changes - **HighActivity** field on `DailyActivity` — set to true when raw event count for a day exceeds 500 - **AggregateActivityByDay** — tracks `eventCount` per day, sets flag and logs `log.Printf` warning when > 500 events in a day - **View.HasHighActivity()** — returns true if any day in the window is flagged - **View.HighActivityDays()** — returns dates of flagged days - **statusLine** — shows `! high activity` indicator - Existing `maxEvents=500` truncation in `FetchActivityEvents` limits total fetch volume (first 500 events across all days) References: #246, #243, #244, #245 ## Testing - [x] 4 new tests: 501 events triggers high (aggregation), 500 does not, View HasHighActivity with status line, View no high activity - [x] `go test -race ./...` — all pass
feat(activity): handle extremely active contexts with truncation and warning
All checks were successful
Test and Release / lint (pull_request) Successful in 3m46s
Test and Release / test (pull_request) Successful in 9m52s
92410f85e3
- HighActivity bool field on DailyActivity, set when raw event count
  per day exceeds 500 (threshold)
- AggregateActivityByDay: tracks eventCount per day, sets HighActivity
  flag and logs warning when threshold exceeded
- View.HasHighActivity() / View.HighActivityDays(): query methods
- Status line shows '! high activity' indicator
- Existing maxEvents=500 truncation already limits total fetch volume
- 4 new tests: aggregation for 501 events (high), 500 events (not),
  View HasHighActivity status line, View no high activity

Ref: #246, #243, #244, #245
fuzzy added this to the Steeper project 2026-07-07 11:25:13 +00:00
fuzzy self-assigned this 2026-07-07 11:25:15 +00:00
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-07 11:25:17 +00:00
the.auditor left a comment

Review

Result: Approved — no blocking issues.

Summary: Adds high activity detection (>500 events/day). DailyActivity.HighActivity flag set during aggregation in AggregateActivityByDay, with log.Printf warning. View.HasHighActivity() and View.HighActivityDays() expose state to callers. Status line shows ! high activity indicator when flagged. ROADMAP2.md updated.

Non-blocking:

  • #318 — Add godocs for exported HasHighActivity and HighActivityDays; note log.Printf vs centralized logger

Checklist:

  • Correctness: Threshold check correct (>500), flag propagated through aggregation → view → status line
  • Completeness: Closes #246 — truncation (existing maxEvents=500), logging (log.Printf), display indicator
  • Test coverage: 4 tests (501 triggers, 500 doesn't, view HasHighActivity with indicator, view no high activity)
  • Race-safe: go test -race passes
## Review **Result: Approved** — no blocking issues. **Summary:** Adds high activity detection (>500 events/day). `DailyActivity.HighActivity` flag set during aggregation in `AggregateActivityByDay`, with `log.Printf` warning. `View.HasHighActivity()` and `View.HighActivityDays()` expose state to callers. Status line shows `! high activity` indicator when flagged. ROADMAP2.md updated. **Non-blocking:** - #318 — Add godocs for exported `HasHighActivity` and `HighActivityDays`; note `log.Printf` vs centralized logger **Checklist:** - Correctness: ✅ Threshold check correct (>500), flag propagated through aggregation → view → status line - Completeness: ✅ Closes #246 — truncation (existing maxEvents=500), logging (log.Printf), display indicator - Test coverage: ✅ 4 tests (501 triggers, 500 doesn't, view HasHighActivity with indicator, view no high activity) - Race-safe: ✅ `go test -race` passes
fuzzy merged commit 92410f85e3 into main 2026-07-07 11:34:46 +00:00
fuzzy deleted branch phase06-high-activity 2026-07-07 11:34:46 +00:00
Sign in to join this conversation.
No reviewers
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/steeper!317
No description provided.