mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-07-09 17:08:29 +00:00
Remove backup file count cap
Let backup creation and restore cleanup use unlimited pattern scans so archives for agents with more than 50,000 files are complete. Keep UI preview and dry-run paths bounded for responsiveness while making the dry-run truncated flag safe for optional limits. Add regression coverage for unlimited scans, backup creation, clean-before-restore, and restoring an archive entry past the old 50,000-file boundary.
This commit is contained in:
parent
b11818bfff
commit
7160747607
5 changed files with 182 additions and 10 deletions
|
|
@ -47,12 +47,13 @@ class BackupTest(ApiHandler):
|
|||
|
||||
backup_service = BackupService()
|
||||
matched_files = await backup_service.test_patterns(metadata, max_files=max_files)
|
||||
truncated = max_files is not None and len(matched_files) >= max_files
|
||||
|
||||
return {
|
||||
"success": True,
|
||||
"files": matched_files,
|
||||
"total_count": len(matched_files),
|
||||
"truncated": len(matched_files) >= max_files
|
||||
"truncated": truncated
|
||||
}
|
||||
|
||||
except Exception as e:
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
- `BackupTest` defines `requires_auth(...)`.
|
||||
- `BackupTest` defines `requires_loopback(...)`.
|
||||
- Imported dependency areas include: `helpers.api`, `helpers.backup`.
|
||||
- The `truncated` response flag is true only when a finite `max_files` limit is supplied and the result reaches that limit.
|
||||
|
||||
## Key Concepts
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue