From ebd67d5abf37178116acbaee1b6da5b26e324694 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 13 Nov 2026 15:29:56 +0000 Subject: [PATCH] docs(requirements): pin PATCH with expect and 409 in 007 and 008 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 007 now names the view store's PATCH body with set and expected values and its 409 on a stale expectation, and 008's integration box requires that 409 for the pins, so two tabs never overwrite each other's layout. 🎯 Fix: 95 % 💥 Break: 1 % 💸 Cost: 100 % ⏱️ Time: 100 % 🛡️ Security: 100 % 🏆 Score: 94 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 --- docs/requirements/007-resources-view.md | 13 ++++++++++--- docs/requirements/008-home-dashboard.md | 3 ++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/requirements/007-resources-view.md b/docs/requirements/007-resources-view.md index f7d7576..b95d92e 100644 --- a/docs/requirements/007-resources-view.md +++ b/docs/requirements/007-resources-view.md @@ -54,9 +54,16 @@ flowchart TD ### View store -- [ ] A GET and PUT of `/api/view` round-trip; a malformed body, an unknown - key or more than 64 KiB answers 400 and stores nothing. -- [ ] A PUT needs no passkey and leaves the signed settings file +- [ ] A GET and a PATCH of `/api/view` round-trip; a PATCH sets only the + paths it names, each against the value the page last saw there (409 + when another browser changed it meanwhile); a malformed body, an + unknown key, a body over 129 KiB (both values of a path at the cap + plus 1 KiB) or a document that would grow past 64 KiB answers 400 and + stores nothing, while a list at the cap can still shrink. Lists change + only by a function re-run on the stored value, scalars by replacement. + A page restored from the back-forward cache fetches the view again; a + change sent while leaving the page is dropped when it meets a 409. +- [ ] A PATCH needs no passkey and leaves the signed settings file byte-identical. - [ ] The store is written atomically with mode 0600 and survives a hub restart. diff --git a/docs/requirements/008-home-dashboard.md b/docs/requirements/008-home-dashboard.md index 3a5d776..549d48f 100644 --- a/docs/requirements/008-home-dashboard.md +++ b/docs/requirements/008-home-dashboard.md @@ -87,7 +87,8 @@ flowchart TD - [ ] Unit: registry lookup, layout validation, reorder math. - [ ] Integration: `/api/view` accepts the pins schema and refuses an - oversize or malformed one. + oversize or malformed one; a PATCH whose `expect` no longer matches + the stored pins gets 409, so two tabs never overwrite each other. - [ ] E2E: Chromium and Firefox at 1920, 1366 and 390: star and unstar, resize, reorder by drag and keyboard, the gone tile, the start tab; screenshots for the checkpoint.