docs(hygiene): таблица владельцев файлов — в ARCHITECTURE, не во входе (#680)

Предыдущий коммит перенёс таблицу классификации файлов при сборке
(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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018qZfe7YS4rqEMKoVeS3GKd
This commit is contained in:
Claude
2026-09-27 22:35:02 +03:00
parent fdde46541e
commit 72ce15bfa1
2 changed files with 15 additions and 19 deletions
+15
View File
@@ -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
-19
View File
@@ -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.