[Dashboard] Prune incompatible-schema run directories
- 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
`DashboardRunStore.LoadRuns` excludes metadata whose schema version differs from the current version. `PruneRuns` only iterates the successfully loaded `_runs` snapshot.
After a Dashboard schema upgrade, older-schema run directories become invisible to both selection and retention, so storage can grow beyond the advertised run limit.
### Expected Behavior
Incompatible historical runs should remain non-selectable but still participate in retention cleanup.
### Steps To Reproduce
1. Create `Run` history with one Dashboard schema version.
2. Start a Dashboard whose schema version has advanced.
3. Create enough new runs to trigger retention.
4. The old-schema directories are never selected as pruning candidates.
### Exceptions (if any)
N/A
### Aspire doctor output
```plain
Aspire CLI 13.6.0-pr.18924.g5ee63941
Windows 10.0.26200 and Ubuntu 24.04.3
```
### Anything else?
Related to #18924. Source: `src/Aspire.Dashboard/ServiceClient/DashboardRunStore.cs:336-369,440-465`. This was mentioned during PR review and remains on current `main`.
Contributor guide
Research direction
Start in src/Aspire.Dashboard/ServiceClient/DashboardRunStore.cs, especially LoadRuns and PruneRuns at lines 336-369 and 440-465. Trace how incompatible schema metadata is excluded from _runs, then verify that retention cleanup still considers those directories while leaving them non-selectable. Done means old-schema run directories are removed when the run limit is exceeded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100