fix: avoid double disk reserve for staged uploads (#554)

Issue: #554
User-Visible: yes
This commit is contained in:
Sergey Matyunin
2026-09-12 20:56:45 +00:00
committed by claude[bot]
parent 49130d4ffd
commit 51ead265f0
8 changed files with 120 additions and 3 deletions
+13
View File
@@ -8873,6 +8873,19 @@ const MUTANT_DEFINITIONS = [
replace: ' if item.name.startswith(TMP_PREFIX): # mutant: every staged file is invisible\n',
}],
},
{
id: 'quota-reserves-staged-bytes-twice-on-disk',
guard: 'node scripts/backend-test-guard.mjs '
+ 'issue_554_upload_uses_actual_free_space_after_staging '
+ 'tests_backend/test_ha_upload.py',
because: 'the attachment body already occupies disk space inside files_root; subtracting its '
+ 'size again rejects a rename even when the real reserve is intact (#554 AC5)',
patches: [{
file: 'custom_components/houseplan/http_api.py',
find: ' additional_disk_bytes=0,\n',
replace: ' # mutant: staged bytes are reserved a second time\n',
}],
},
{
id: 'support-palette-copies-any-key',
guard: 'node scripts/backend-test-guard.mjs '