Skip to content

[Repo Assist] test(tray): expand ActivityStreamService coverage with 20 new tests#535

Draft
github-actions[bot] wants to merge 1 commit into
masterfrom
repo-assist/improve-activitystreamservice-tests-2026-05-25-540e742131acc1e8
Draft

[Repo Assist] test(tray): expand ActivityStreamService coverage with 20 new tests#535
github-actions[bot] wants to merge 1 commit into
masterfrom
repo-assist/improve-activitystreamservice-tests-2026-05-25-540e742131acc1e8

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 This is an automated PR from Repo Assist.

Summary

ActivityStreamService is the central service for tray activity history (sessions, nodes, notifications, diagnostics). It had only 2 tests covering the max-items cap and BuildSupportBundle basics, leaving significant behaviour untested.

This PR adds 20 new tests covering all previously untested paths.

New test coverage

Area Tests added
Add field defaults (null/whitespace category → "general") 2
Add empty/whitespace title is rejected (no-op) 2
Add insertion order (newest-first) 1
Add stores all optional fields (details, icon, dashboardPath, sessionKey, nodeId) 1
GetItems maxItems limiting, zero-maxItems edge case 2
GetItems category filter: exact, dot-prefix sub-categories, case-insensitive 4
GetItems "all" selector returns every item 1
GetItems dot-prefix guard (e.g. "sessionsExtra" should not match "sessions") 1
Clear removes all items 1
Clear raises Updated event 1
Add raises Updated event 1
BuildSupportBundle maxItems param limits output 1
BuildSupportBundle includes session= and node= fields 1
BuildSupportBundle truncates long node IDs to 16 chars + ... 1
BuildSupportBundle omits session/node fields when absent 1

Test Status

Build: Linux environment — full ./build.ps1 requires Windows. dotnet build succeeded.

Passed! — Failed: 0, Passed: 22, Skipped: 0 — ActivityStreamService tests (all 22)

Pre-existing baseline: Failed: 10 in tray tests (infrastructure failures, unchanged by this PR).

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@97143ac59cb3a13ef2a77581f929f06719c7402a

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>
@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 25, 2026

Codex review: needs maintainer review before merge. Reviewed May 24, 2026, 9:37 PM ET / 01:37 UTC.

Summary
The branch adds 20 xUnit tests to ActivityStreamServiceTests covering Add, GetItems, Clear, Updated, and BuildSupportBundle behavior.

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: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Confirm ./build.ps1, shared tests, and tray tests on Windows or CI before merge.

Risk before merge

  • Repository-required Windows validation is not independently confirmed here; the PR body reports dotnet build and the focused ActivityStreamService tests, but also says ./build.ps1 was not run in the Linux environment and mentions pre-existing tray test failures.

Maintainer options:

  1. Decide the mitigation before merge
    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.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge
No automated repair is needed; the remaining action is ordinary CI and maintainer validation of a draft test-only PR.

Security
Cleared: The diff is test-only and does not touch scripts, dependencies, credentials, runtime routing, or packaged artifacts.

Review details

Best 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 ActivityStreamService behaviors, pending normal validation.

Codex review notes: model gpt-5.5, reasoning high; reviewed against ef6ac8acbab2.

Label changes

Label changes:

  • add P3: This is a low-risk test coverage expansion with no runtime behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable because this is an automated test-only bot PR with no runtime behavior change to demonstrate.

Label justifications:

  • P3: This is a low-risk test coverage expansion with no runtime behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable because this is an automated test-only bot PR with no runtime behavior change to demonstrate.
Evidence reviewed

What I checked:

Likely related people:

  • Scott Hanselman: git log -S ActivityStreamService shows the original activity-stream feature, instrumentation update, and current-version merge under this author, and blame for the current service points to the same history. (role: introduced behavior and recent area contributor; confidence: high; commits: 3025daaa712d, 6e2069d0adfd, c499c294b764; files: src/OpenClaw.Tray.WinUI/Services/ActivityStreamService.cs, tests/OpenClaw.Tray.Tests/ActivityStreamServiceTests.cs)
  • bkudiess: The current service/test version appears in merge commit c499c294..., whose message names bkudiess/feat/colorful-sidebar-icons; local grafted history obscures finer-grained authorship. (role: merged branch contributor; confidence: medium; commits: c499c294b764; files: src/OpenClaw.Tray.WinUI/Services/ActivityStreamService.cs, tests/OpenClaw.Tray.Tests/ActivityStreamServiceTests.cs)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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 keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels May 25, 2026
@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 25, 2026

ClawSweeper PR egg

✨ Hatched: 🌱 uncommon Neon Patch Peep

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

Rarity: 🌱 uncommon.
Trait: sleeps inside passing CI.
Image traits: location green-check meadow; accessory green check lantern; palette coral, mint, and warm cream; mood curious; pose waving from a small platform; shell matte ceramic shell; lighting moonlit rim light; background smooth stones and checkmarks.
Share on X: post this hatch
Copy: My PR egg hatched a 🌱 uncommon Neon Patch Peep in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. repo-assist status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants