[Dashboard] Console log replay bypasses clear filtering for live subscribers
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
`SqliteResourceRepository.AddConsoleLogsAsync` correctly filters duplicate, replayed, and pre-clear rows before writing to SQLite, but publishes the original unfiltered batch to active subscribers.
As a result, cleared lines can reappear in an open Console Logs page and replayed lines can be displayed twice even though the database correctly excluded them.
### Expected Behavior
Live subscribers should receive the same filtered set of console lines that is accepted for persistence.
### Steps To Reproduce
1. Persist console lines 1 and 2 and subscribe to the resource's console logs.
2. Clear that resource's console logs.
3. Add a batch containing a replayed line, a timestamped line from before the clear, and one valid new line.
4. The subscriber receives all three lines instead of only the valid new line.
### Exceptions (if any)
An assertion expecting one subscriber item receives three items.
### Aspire doctor output
```plain
Aspire CLI 13.6.0-pr.18924.g5ee63941
Windows 10.0.26200
```
### Anything else?
Related to #18924. Source: `src/Aspire.Dashboard/ServiceClient/SqliteResourceRepository.cs:314-383`. A focused test reproduced this deterministically, and the same implementation remains on current `main`.
Contributor guide
Research direction
Start in src/Aspire.Dashboard/ServiceClient/SqliteResourceRepository.cs around SqliteResourceRepository.AddConsoleLogsAsync (lines 314-383), then inspect the focused test that reproduces the issue. Verify that active subscribers receive the same filtered console-line set accepted for SQLite, with replayed and pre-clear lines excluded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100