rdmsm4x-changelog-20260903-1542-tyrell-activity-burst-cache-and-heatmap
rdmsm4x-changelog-20260903-1542-tyrell-activity-burst-cache-and-heatmap
Resolved Tyrell Observatory heatmap truncation and event burst handling by eliminating the hardcoded /api/activity limit and introducing in-memory ring-buffer caching and background bucketing.
Scope
- Hosts:
rdmsm4x(fleet hub) - Project: Tyrell (
/Users/richh/dev/apps/Tyrell) - Worktree:
/Users/richh/dev/_worktrees/tyrell-issue31-activity-burst-cache-20260903 - Branch:
agy/tyrell-issue31-activity-burst-cache-20260903(commit472215e) - Associated Tickets:
ISSUE-20260903-31(claimed and resolved),ISSUE-20260903-30(filed)
Files Touched
Package.swift: ExcludedActivityfromTyrellRemoteSupporttarget to preserve build boundaries.Sources/TyrellCore/Activity/ActivityEventBufferActor.swift: Created in-memory ring-buffer actor (capacity 5,000) with sub-millisecond filtering and O(N) heatmap bucket calculation.Sources/TyrellCore/StateStore.swift: AddedrecentEvents(since:limit:)with backward-compatible protocol extension.Sources/TyrellCore/SQLiteStateStore.swift: Initialized and warmedactivityBufferon startup; converted row-by-row pruning into periodic pruning (every 100 writes) to eliminate SQLite write contention during event bursts.Sources/TyrellCore/StatusModel.swift: AddedEquatableconformance toFleetHostRow.Sources/tyrelld/Daemon.swift: Removed hardcodedlimit: 100from/api/activity, added query param filtering (since,limit,host), and added/api/activity/heatmapendpoint.Sources/TyrellAppSupport/ObservatoryModels.swift: AddedObservatoryPrecomputedStateandObservatoryDataProcessorfor single-pass bucketing across all 5 metrics.Sources/tyrell-app/AppStatusFeed.swift: Added in-memory deduplication cache and detached background bucketing.Sources/tyrell-app/ObservatoryView.swift: Offloaded heatmap and metric rendering from MainActor to read precomputed state in O(1) time.Tests/TyrellCoreTests/ActivityEventBufferActorTests.swift: Added unit test coverage for ring buffer, burst throughput, and SQLite integration.Tests/TyrellAppSupportTests/ObservatoryDataProcessorTests.swift: Added unit test coverage for single-pass metric aggregation.
Commands Run
swift test --filter ActivityEventBufferActorTests(passed)swift test --filter ObservatoryDataProcessorTests(passed)swift test --filter TyrellCoreTests && swift test --filter TyrellAppSupportTests(passed)swift test(full worktree test suite passed, exit 0)ticket comment ISSUE-20260903-31 ...ticket export-html --out /Users/richh/dev/sites/dev.ecs0.net/wiki/issues//Users/richh/bin/agent_msg.zsh send --to claude@rdmsm4x --topic tyrell/issue31-coordination ...
Verification Evidence
- Full test suite passed without warnings or failures.
ActivityEventBufferActorTests: 1,000-event burst simulation verified query latency < 1 ms.- Git worktree isolation verified zero collision with active
claude@rdmsm4xBuild 20 worktree (tyrell-build20-supervisor-approvals-20260903). Canonicalmainatrdmsm4x:~/dev/apps/Tyrellremains frozen and clean at79e3034.
Undo / Rollback
- Switch or delete worktree
/Users/richh/dev/_worktrees/tyrell-issue31-activity-burst-cache-20260903. - Branch
agy/tyrell-issue31-activity-burst-cache-20260903can be cleanly fast-forwarded or integrated when ready.