Skip to content

armgit / bento

Public Imported from GitHub
0

Bento, the office suite that fits in a file

docs: DECISIONS correction — file:// documents share one storage origin (#585)

nyblnet2667b44f16af
diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md
index c577426c..32ca1910 100644
--- a/docs/DECISIONS.md
+++ b/docs/DECISIONS.md
@@ -7501,6 +7501,29 @@ rigs treat a drawn arrow as a deliberate difference: named in
`test-maths-lite.ts`, counted with the identical ones in the coverage floor.
Cost: +966 B of shell.
+## 2026-10-04 — CORRECTION: `file://` documents share one storage origin
+
+The 2026-08-02 entry "bento/home is closed; the host is a WebExtension" says
+the browser "treats `file://` as a unique origin per file — per-document
+isolation for free". That is wrong for storage. Measured in Chrome on
+2026-09-19: every document opened from disk shares one origin for
+IndexedDB and localStorage, so anything one local document stores, any other
+local HTML file can read.
+
+What follows:
+
+- **With bento/home installed**, data a document keeps beside itself
+ (recovery, version history, keys) belongs in the extension's own origin,
+ partitioned by the file path the browser reports for the sender
+ (`sender.url`). The page never names its own path or partition, and a
+ document id the page supplies is never a key. That partition is the
+ isolation the 2026-08-02 entry assumed `file://` provided.
+- **Without the extension**, the page's own storage is shared, and is
+ designed for as such (kernel's storage work), not treated as private.
+- **The WebExtension choice still stands** on that entry's other
+ measurements (a directory grant covers files never picked; a handle cannot
+ cross origins). This premise is no longer one of its reasons, and should not
+ be cited as a reason against a native host.
## 2026-10-04 — Android: a save from a read-only document remembers where it went, and one picker answers every write
The `ACTION_VIEW` route (a document handed over by Files, Drive or Gmail) was