hub: review fix 5 — a window request the hub cannot read is 400; every answer says accepts_ended (version skew)
- POST /offsite/window-open answered 200 on a body it could not parse and decided the window on „count 0”; now 400 (the empty body of the oldest boxes is still „no count”). - Every answer carries accepts_ended, granted or not: a box sends its end records only to a hub that said so, so a new box never sends a large request to an older hub that reads 4 KiB. Carries the red-proof of both halves (the controller's is the next commit there). Tests seen red; 3 hub mutations seen red, 1 after a redo. Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
6d2d4bd09d
commit
45848f6ee4
8 files changed
+168
-5
No files matched your search
@@ -921,7 +921,7 @@ method (405), so a token gets 403.
|
||||
| `/configs/{id}/edit` | `customers:read` | **session only** | Edit can change the household's e-mail — and a new e-mail auto-mails the self-bind link (ruling 13:20). |
|
||||
| `/offsite/remove-unpinned/{id}` | — | **session only** | |
|
||||
| `/offsite/abandon-cancel/{id}` | — | **session only** | Cancelling a pending set-aside deletion: no group names it; until the operator places it, session only. |
|
||||
| `/offsite/window-grant/{id}` | — | `offsite:write` | The one-shot clean-up window: the script address AND the customer page's „Backup & DR" card (R-1299, hub v0.174.0): `from=page` + `confirm=1` from the form; `cancel=1` removes a waiting grant; a limit above the store's snapshot count is refused. **Built, not released (D72/D84, `07` §8.2f):** the box-facing `POST /api/v1/offsite/window-open/{id}` also takes the box's due off-site end records (`ended`) and answers `ended_allowed` / `ended_refused` — ids of removed apps' snapshots the hub agrees to from its own records, beside the window's cap; `window-close` takes `removed_for_ended_apps`. The card's „Last window” shows what was agreed, removed and refused. |
|
||||
| `/offsite/window-grant/{id}` | — | `offsite:write` | The one-shot clean-up window: the script address AND the customer page's „Backup & DR" card (R-1299, hub v0.174.0): `from=page` + `confirm=1` from the form; `cancel=1` removes a waiting grant; a limit above the store's snapshot count is refused. **Built, not released (D72/D84, `07` §8.2f):** the box-facing `POST /api/v1/offsite/window-open/{id}` also takes the box's due off-site end records (`ended`) and answers `ended_allowed` / `ended_refused` — ids of removed apps' snapshots the hub agrees to from its own records, beside the window's cap; `window-close` takes `removed_for_ended_apps`. Every window-open answer carries `accepts_ended` (a box sends `ended` only to a hub that said it), and a request the hub cannot read is answered 400. The card's „Last window” shows what was agreed, removed and refused. |
|
||||
| `/offsite/windows-enabled` | — | `offsite:write` | |
|
||||
| `/os/{id}` | `os:read` | `os:write` | |
|
||||
| `/offsite/key-audit` | — | `offsite:read` | Runs the daily key check now: it reads keys and reports, it changes none. |
|
||||
|
||||
@@ -1917,7 +1917,7 @@ notification address gets no mail: the page is all it has.** A blocked household
|
||||
| A record with a date in the past, written by a box the hub does not agree with | Refused: the hub never reads the box's dates | hub `TestD84_AgreeEnded…`, `TestD72_ReportFeedsTheHubsOwnAppRecord` |
|
||||
| An app removed with „delete backup data” BEFORE this is built | No record exists, so nothing is deleted. The off-site list shows the app with „delete in 30 days”: the household starts the clock itself | `TestD72_RestorePageShowsTheEndPerBranch` |
|
||||
| The guard refuses the window (a future-dated snapshot, a plan above the cap) | The ended apps wait with everything else | `TestD84_OneGuard_AndTheAllowanceIsBesideTheCap` |
|
||||
| The hub does not know ended apps (an older hub), or the box does not (an older controller) | Nothing of an ended app is removed; each side is releasable alone | `TestD84_TheBoxRemovesOnlyWhatTheHubAgreedTo` |
|
||||
| The hub does not know ended apps (an older hub), or the box does not (an older controller) | Nothing of an ended app is removed, and the ordinary weekly clean-up goes on: the box sends its end records only to a hub whose last window answer said `accepts_ended` (an older hub reads 4 KiB of the request and would stall on more); a hub answers 400 on a request it cannot read; one request carries at most 5000 ids | `TestD84_ANewBoxWithAnOlderHub_NothingEndedIsSentAndTheCleanUpStillRuns`, `TestD84_OneRequestCarriesABoundedNumberOfIds`, hub `TestD84_WindowOpen_ABodyTheHubCannotReadIs400` |
|
||||
| The app has no copy in the store at all | The due record is closed with no history line; nothing is asked of the hub | `TestD72_ARecordWithNoCopiesIsClosedQuietly` |
|
||||
| A take-back or an install while the window is being prepared (the hub answers, the dry run, the guard) | The window reads the records AGAIN immediately before the forget; an id whose record is gone or changed is not removed. A take-back during the forget itself is answered „not marked, or already deleted”. **Not covered:** an install during the forget | `TestD72_ATakeBackDuringTheWindowKeepsTheCopies`, `TestD72_AnInstallDuringTheWindowKeepsTheCopies`, `TestD72_ATakeBackDuringTheForgetIsNotAnsweredKept` |
|
||||
| The app is installed again by an import, or by a restore that installs from a unit | The record is deleted at the ONE point every install passes (`stacks.SaveAppConfig`) | `TestD72_AnImportDeletesTheEndRecord`, `TestD72_ARestoreIntoAnInstallDeletesTheEndRecord`, `TestD72_TheInstallWritersAreListed` |
|
||||
|
||||
Reference in new issue
Block a user