3.3 KiB
3.3 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01-database-measurements | Database footprint measurements | completed | 1 | plan.md |
|
|
|
Task 01: Database footprint measurements
Summary
Implement the read-only database and backup reader, then wire both sources through cached and progressive overview responses.
In scope
- Both sources measure configured local locations and preserve independent failures, cancellation, and unsupported-driver behavior.
- Overview responses and progress include both sources, with cache reuse and explicit per-file overlap attribution.
- Tests exercise main-file/sidecar sizes, manual backups, relative/custom paths, symlinks, unavailable reads, and no mutation.
Out of scope
New cleanup behavior, retention changes, remote database measurement, and unrelated storage categories.
Acceptance
- Both sources measure configured local locations and preserve independent failures, cancellation, and unsupported-driver behavior.
- Overview responses and progress include both sources, with cache reuse and explicit overlap attribution. Partial nested overlap retains the full row footprint and reports only distinct counted bytes, while attribution uses effective scan roots only.
- Tests exercise main-file/sidecar sizes, manual backups, relative/custom paths, symlinks, unavailable reads, and no mutation.
Verification
Run from apps/backend:
rtk go test ./internal/system/storage/...
rtk go test ./internal/backendapp -run 'TestStorage|TestSummary|TestOverview' -count=1
Files likely touched
apps/backend/internal/system/storage/databasestore/provider.goapps/backend/internal/system/storage/databasestore/provider_test.goapps/backend/internal/system/storage/handler.goapps/backend/internal/system/storage/analysis_state.goapps/backend/internal/system/storage/overview_cache.goapps/backend/internal/system/storage/overview_cache_progress_test.goapps/backend/internal/backendapp/storage_maintenance.goapps/backend/internal/backendapp/storage_maintenance_test.go
Dependencies
None.
Risks
Backup rotation can race reads. Use deterministic injected failures for permission tests, since root can read mode-restricted fixtures.
Parallelism
sequential
Inputs
- Requirements, active requirement
REQ-SYSTEM-PAGE-STORAGE-MAINTENANCE-002. - System design.
- Existing storage provider, overview cache, resource rows, and mobile storage tests.
Results
Implemented the SQLite database and sibling backup measurements, source progress, cache projection, overlap attribution, unsupported-driver states, and regression coverage. The exact backend verification commands passed: 214 storage-package tests and 9 targeted backend-app tests.