From 72ce15bfa1cc7aeb7e884f9fd27fa453c05af4ce Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 27 Sep 2026 22:35:02 +0300 Subject: [PATCH] =?UTF-8?q?docs(hygiene):=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8?= =?UTF-8?q?=D1=86=D0=B0=20=D0=B2=D0=BB=D0=B0=D0=B4=D0=B5=D0=BB=D1=8C=D1=86?= =?UTF-8?q?=D0=B5=D0=B2=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2=20=E2=80=94?= =?UTF-8?q?=20=D0=B2=20ARCHITECTURE,=20=D0=BD=D0=B5=20=D0=B2=D0=BE=20?= =?UTF-8?q?=D0=B2=D1=85=D0=BE=D0=B4=D0=B5=20(#680)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Предыдущий коммит перенёс таблицу классификации файлов при сборке (HP-1465-01) из ARCHITECTURE в SCOPE.md › Standing rule, а SCOPE — первый файл обоих маршрутов входа: +211 слов маршрута автора и ревьюера — ровно перенос, которого задача не допускает. Правило остаётся в SCOPE, таблица — в ARCHITECTURE › Integration WS API › Files. entry-cost: автор 5 196, ревьюер 4 074. Issue: #680 User-Visible: no Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018qZfe7YS4rqEMKoVeS3GKd --- docs/ARCHITECTURE.md | 15 +++++++++++++++ docs/SCOPE.md | 19 ------------------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index f0daf1fe..5a7821bf 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -423,6 +423,21 @@ still recognised in stored config but no longer served newly referenced internal plan must exist (`missing_plan`; import also checks attachments). A usable `Content-Length` is checked before streaming, the staged size again under `upload_lock`, which also serialises image decoding. + Collection classifies by **owner**, not by "is it referenced" (HP-1465-01); + nothing is deleted for being old except `up_*` staging after + `PLAN_ORPHAN_TTL_S` (1 h), and `plans/list`/`plans/delete` make "we never + delete" livable: + + | Case | Rule | + |---|---| + | Space in both, plan A → plan B (the user picked another image) | removed immediately | + | Space in both, plan → none (detached; one click undoes it) | **kept** | + | Space gone (the image was imported and may be nowhere else) | **kept** | + | Space has a plan plus another file of its own (a rejected save) | **kept** — ageing these out raced the retry | + | Marker in both, attachment dropped from its list | removed immediately | + | Marker gone | **kept** | + | Attachment in `up_*` (a dialog never saved) | removed after `PLAN_ORPHAN_TTL_S` | + | Marker there, file it never listed (a rejected upload) | **kept** | - *Import preview* streams ≤8 MiB, rejects duplicate/prototype keys, non-finite numbers and future model versions, and keeps the candidate in memory for 10 min behind a token bound to the user, candidate digest and diff --git a/docs/SCOPE.md b/docs/SCOPE.md index 4f22051d..3089319c 100755 --- a/docs/SCOPE.md +++ b/docs/SCOPE.md @@ -98,25 +98,6 @@ The asymmetry is the whole argument. Wasted disk is visible, cheap and reversible; a deleted file is none of those. Where the evidence is weak, keep the file — and if a future version wants to reclaim that space, it asks. -Collection classifies by **owner**, not by "is it referenced" (HP-1465-01): -`config/set` removes only what its own commit replaced. - -| Case | What it means | Rule | -|---|---|---| -| Space in both, plan A → plan B | the user picked another image | removed immediately | -| Space in both, plan → none | detached; one click undoes it | **kept** | -| Space gone | deliberate, but the image was imported and may be nowhere else | **kept** | -| Space has a plan, plus another file of its own | an upload whose save was rejected | **kept** — ageing these out raced the retry that referenced them | -| Marker in both, attachment dropped from its list | a trash button, promising nothing | removed immediately | -| Marker gone | same call as a deleted space's plan | **kept** | -| Attachment in `up_*` | a dialog that was never saved; no device owns it | `PLAN_ORPHAN_TTL_S` (1 h) | -| Marker there, file it never listed | a rejected upload | **kept**, same reason | - -Nothing is deleted for being old except a per-dialog staging folder (`up_*`) -after `PLAN_ORPHAN_TTL_S`; `houseplan/plans/list` and `houseplan/plans/delete` -(refusing while a space still references the plan) make "we never delete" -livable. - ## Out of scope — never build, point users to the right tool - Automations, scenes, scripts, notifications → HA core.