fix(storage): expire historical inline images with bounded TTL cleanup

- Apply media retention to inline images while preserving text and URLs
- Persist per-workspace cursors atomically with payload updates
- Bound candidate scans and verify event ownership before loading payloads
- Add cleanup indexes and regression tests, and fix Windows path assertions
This commit is contained in:
BiFangKNT
2026-10-18 09:58:04 +08:00
parent cbc849d4e2
commit d610d64c67
14 changed files with 568 additions and 7 deletions
@@ -396,9 +396,8 @@ class TestMaintenanceServiceGetStorageAnalysis:
result = await service.get_storage_analysis(TEST_CONTEXT)
assert result['total_size_bytes'] == 125
assert (
next(section for section in result['sections'] if section['key'] == 'skills')['path']
== '/core/skills/tenants/test'
assert next(section for section in result['sections'] if section['key'] == 'skills')['path'] == str(
Path('/core/skills/tenants/test')
)
assert result['processes'][1]['directories'][0]['key'] == 'artifacts'
assert result['processes'][2]['directories'][1]['key'] == 'mcp'