[Repo Assist] test(tray): expand ActivityStreamService coverage with 20 new tests#535
Conversation
Add tests covering previously untested behaviour in ActivityStreamService: - Category defaults to "general" when null or whitespace input - Whitespace/empty title is rejected (no-op Add) - Insertion order (newest-first) - GetItems maxItems limiting and zero-items edge case - GetItems category filtering: exact match, dot-prefix sub-categories, case-insensitive matching, and non-match guard - 'all' category selector returns every item - Clear and Add both raise the Updated event - BuildSupportBundle maxItems parameter limits output - BuildSupportBundle includes session= and node= fields when set - BuildSupportBundle truncates long node IDs to 16 chars + '...' - BuildSupportBundle omits session/node fields when not provided Total: 22 tests (was 2). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs maintainer review before merge. Reviewed May 24, 2026, 9:37 PM ET / 01:37 UTC. Summary Reproducibility: not applicable. This PR adds unit-test coverage for existing service behavior rather than reporting a user-visible bug. Source inspection shows the asserted paths exist, but validation commands were not run in this read-only review. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the focused coverage after CI or a Windows validation pass confirms the required build, shared tests, and tray tests are acceptable for this branch. Do we have a high-confidence way to reproduce the issue? Not applicable; this PR adds unit-test coverage for existing service behavior rather than reporting a user-visible bug. Source inspection shows the asserted paths exist, but validation commands were not run in this read-only review. Is this the best way to solve the issue? Yes; focused xUnit coverage in the existing tray test file is the narrow maintainable solution for pinning these Codex review notes: model gpt-5.5, reasoning high; reviewed against ef6ac8acbab2. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: 🌱 uncommon Neon Patch Peep Hatch commandComment Hatchability rules:
Rarity: 🌱 uncommon. What is this egg doing here?
|
🤖 This is an automated PR from Repo Assist.
Summary
ActivityStreamServiceis the central service for tray activity history (sessions, nodes, notifications, diagnostics). It had only 2 tests covering the max-items cap andBuildSupportBundlebasics, leaving significant behaviour untested.This PR adds 20 new tests covering all previously untested paths.
New test coverage
Addfield defaults (null/whitespace category →"general")Addempty/whitespace title is rejected (no-op)Addinsertion order (newest-first)Addstores all optional fields (details, icon, dashboardPath, sessionKey, nodeId)GetItemsmaxItems limiting, zero-maxItems edge caseGetItemscategory filter: exact, dot-prefix sub-categories, case-insensitiveGetItems"all"selector returns every itemGetItemsdot-prefix guard (e.g."sessionsExtra"should not match"sessions")Clearremoves all itemsClearraisesUpdatedeventAddraisesUpdatedeventBuildSupportBundlemaxItems param limits outputBuildSupportBundleincludessession=andnode=fieldsBuildSupportBundletruncates long node IDs to 16 chars +...BuildSupportBundleomits session/node fields when absentTest Status
Build: Linux environment — full
./build.ps1requires Windows.dotnet buildsucceeded.Pre-existing baseline:
Failed: 10in tray tests (infrastructure failures, unchanged by this PR).