test(09-01): add failing tests for retention cleanup service

- Test cleanup deletes expired snapshots
- Test snapshots within retention window are kept
- Test deleted count is returned
- Test empty table handled gracefully

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-12 23:32:20 -05:00
parent be41add4e9
commit 00bdde9975
3 changed files with 145 additions and 15 deletions

View File

@@ -41,7 +41,7 @@
- [x] **UI-01**: Device page shows Configuration History section below Remote Access
- [x] **UI-02**: Timeline displays change entries with component, summary, and timestamp
- [x] **UI-03**: Diff viewer shows unified diff with add/remove highlighting
- [ ] **UI-04**: User can download snapshot as `router-{device_name}-{timestamp}.rsc`
- [x] **UI-04**: User can download snapshot as `router-{device_name}-{timestamp}.rsc`
### Observability
@@ -90,7 +90,7 @@
| UI-01 | Phase 7: Config History UI | Complete |
| UI-02 | Phase 7: Config History UI | Complete |
| UI-03 | Phase 8: Diff Viewer & Download | Complete |
| UI-04 | Phase 8: Diff Viewer & Download | Pending |
| UI-04 | Phase 8: Diff Viewer & Download | Complete |
| OBS-01 | Phase 10: Audit & Observability | Pending |
| OBS-02 | Phase 10: Audit & Observability | Pending |

View File

@@ -3,15 +3,15 @@ gsd_state_version: 1.0
milestone: v9.6
milestone_name: milestone
status: completed
stopped_at: Completed 08-01-PLAN.md
last_updated: "2026-03-13T04:21:58.035Z"
last_activity: 2026-03-13 -- Completed 07-01 config history UI timeline component
stopped_at: Completed 08-02-PLAN.md
last_updated: "2026-03-13T04:24:44.396Z"
last_activity: 2026-03-13 -- Completed 08-02 snapshot download
progress:
total_phases: 10
completed_phases: 7
completed_phases: 8
total_plans: 12
completed_plans: 11
percent: 100
completed_plans: 12
percent: 92
---
# Project State
@@ -25,12 +25,12 @@ See: .planning/PROJECT.md (updated 2026-03-12)
## Current Position
Phase: 8 of 10 (Diff Viewer & Download)
Plan: 1 of 2 in current phase
Status: Plan 08-01 complete
Last activity: 2026-03-13 -- Completed 08-01 diff viewer component
Phase: 8 of 10 (Diff Viewer & Download) -- COMPLETE
Plan: 2 of 2 in current phase
Status: Phase 08 complete
Last activity: 2026-03-13 -- Completed 08-02 snapshot download
Progress: [█████████] 92%
Progress: [█████████] 100%
## Performance Metrics
@@ -59,6 +59,7 @@ Progress: [█████████░] 92%
| Phase 06 P02 | 2min | 2 tasks | 3 files |
| Phase 07 P01 | 3min | 2 tasks | 3 files |
| Phase 08 P01 | 1min | 2 tasks | 3 files |
| Phase 08 P02 | 1min | 1 tasks | 3 files |
## Accumulated Context
@@ -92,6 +93,7 @@ Recent decisions affecting current work:
- [Phase 07]: 60s refetchInterval polling for near-real-time config change visibility
- [Phase 08]: DiffViewer rendered inline above timeline (not modal) for context preservation
- [Phase 08]: Line classification function for unified diff: +green, -red, @@blue, ---/+++ muted
- [Phase 08]: Blob URL download pattern consistent with existing exportMyData and auditLogsApi.exportCsv patterns
### Pending Todos
@@ -103,6 +105,6 @@ None yet.
## Session Continuity
Last session: 2026-03-13T04:21:58.032Z
Stopped at: Completed 08-01-PLAN.md
Last session: 2026-03-13T04:24:44.393Z
Stopped at: Completed 08-02-PLAN.md
Resume file: None