Skip to content

feat: data-cost and storage UX — footprint, sync/timestamp bytes, wifi-only (R-03/R-18/R-19)#29

Open
ChelseaKR wants to merge 1 commit into
mainfrom
roadmap/data-cost-and-storage-ux-r-03-r-18-r-19-8
Open

feat: data-cost and storage UX — footprint, sync/timestamp bytes, wifi-only (R-03/R-18/R-19)#29
ChelseaKR wants to merge 1 commit into
mainfrom
roadmap/data-cost-and-storage-ux-r-03-r-18-r-19-8

Conversation

@ChelseaKR

Copy link
Copy Markdown
Owner

A tenant on a low-end device with a metered link should never be surprised by
what habitable stores or sends. This adds three linked transparency features.

R-03 storage footprint: Vault.storage_footprint() walks the vault and returns a
StorageFootprint (sealed originals, the by-design shared-copy doubling, metadata,
total, and per-capture sizes). habitable status prints a plain "storage:" line
("… total — … sealed originals + … shared copies (originals are kept twice by
design)"), AppServer.status() surfaces the raw bytes, and the app renders them
with a one-line explanation of the doubling (EN/ES). A new human_bytes() helper
formats decimal (SI) sizes on both the Python and JS sides.

R-18 data-cost transparency: SyncResult now carries bytes_sent/bytes_received
(counted for both LocalDirTransport and the relay path); habitable sync prints
"data: sent X, received Y". Rfc3161HttpTSA records request/response byte counts,
and resolve/retimestamp print the total network bytes used. Docs note a
timestamp is typically a few KB.

R-19 Wi-Fi-only / metered options: a new additive [network] allow_metered
(default true, schema stays v1) plus --wifi-only / --allow-metered flags on
resolve, retimestamp, and sync. Because a desktop CLI cannot detect a metered
link, this is an explicit gate: when wifi-only is in effect and the operation
would hit the network (relay transport, or a real RFC 3161 authority — dev/local
authorities and directory sync are free), it refuses with a clear message. The
setting is exposed read-only in AppServer.status().

Tests in tests/test_datacost.py cover footprint math, human_bytes, sync byte
counters over LocalDirTransport, [network] parsing, and the CLI refusal/allow
paths. Docs/mobile.md gains a footprint-and-data-cost section; the persona
backlog marks R-03/R-18/R-19 done. make test/lint/type + i18n gates green.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com


Backfill PR for a completed roadmap item (roadmap/data-cost-and-storage-ux-r-03-r-18-r-19-8, 1 commit(s) over main). Part of the portfolio roadmap batch.

…i-only (R-03/R-18/R-19)

A tenant on a low-end device with a metered link should never be surprised by
what habitable stores or sends. This adds three linked transparency features.

R-03 storage footprint: `Vault.storage_footprint()` walks the vault and returns a
StorageFootprint (sealed originals, the by-design shared-copy doubling, metadata,
total, and per-capture sizes). `habitable status` prints a plain "storage:" line
("… total — … sealed originals + … shared copies (originals are kept twice by
design)"), `AppServer.status()` surfaces the raw bytes, and the app renders them
with a one-line explanation of the doubling (EN/ES). A new human_bytes() helper
formats decimal (SI) sizes on both the Python and JS sides.

R-18 data-cost transparency: SyncResult now carries bytes_sent/bytes_received
(counted for both LocalDirTransport and the relay path); `habitable sync` prints
"data: sent X, received Y". Rfc3161HttpTSA records request/response byte counts,
and `resolve`/`retimestamp` print the total network bytes used. Docs note a
timestamp is typically a few KB.

R-19 Wi-Fi-only / metered options: a new additive `[network] allow_metered`
(default true, schema stays v1) plus `--wifi-only` / `--allow-metered` flags on
resolve, retimestamp, and sync. Because a desktop CLI cannot detect a metered
link, this is an explicit gate: when wifi-only is in effect and the operation
would hit the network (relay transport, or a real RFC 3161 authority — dev/local
authorities and directory sync are free), it refuses with a clear message. The
setting is exposed read-only in AppServer.status().

Tests in tests/test_datacost.py cover footprint math, human_bytes, sync byte
counters over LocalDirTransport, [network] parsing, and the CLI refusal/allow
paths. Docs/mobile.md gains a footprint-and-data-cost section; the persona
backlog marks R-03/R-18/R-19 done. make test/lint/type + i18n gates green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants