Skip to content

Prune stale atomic report temp files - #3846

Merged
thomhurst merged 1 commit into
mainfrom
fix-stale-report-temp-cleanup
Aug 4, 2026
Merged

Prune stale atomic report temp files#3846
thomhurst merged 1 commit into
mainfrom
fix-stale-report-temp-cleanup

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Follow-up to #3831 review feedback.\n\n## Summary\n- prune owned atomic-write temp files older than 24 hours after successful history saves\n- retain recent temp files to avoid racing concurrent writers\n- leave unrelated temp files untouched\n- document the cleanup behavior\n\n## Validation\n- RunReportTests: 51 passed\n- focused post-main test: 1 passed\n- ModularPipelines.slnx Release build: 0 warnings, 0 errors

@thomhurst

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@claude

claude Bot commented Aug 4, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Scope reviewed: AtomicFileWriter.cs, FileSystemRunHistoryStore.cs, RunReportTests.cs, run-reports.md.

  • Pattern anchoring (.modularpipelines-*.tmp) correctly matches only files this store owns; unrelated .tmp files are left alone.
  • Staleness comparison (GetLastWriteTimeUtc <= UtcNow - 1 day) is directionally correct and UTC-consistent.
  • Deletion happens only after a successful save, with IOException/UnauthorizedAccessException caught and logged per-file rather than failing the save.
  • New test covers the three cases (stale owned, recent owned, unrelated) that matter for this change.
  • No CLAUDE.md violations — changes stay within the core solution scope, no generated files touched, test placed correctly under test/ModularPipelines.UnitTests/.

@thomhurst
thomhurst merged commit 665a85e into main Aug 4, 2026
14 checks passed
@thomhurst
thomhurst deleted the fix-stale-report-temp-cleanup branch August 4, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant