ctx.storage: enumeration + lifecycle for module_kv rows #39

Closed
opened 2026-08-16 00:24:31 +02:00 by julian · 0 comments
Owner

Follow-up from the #38 review (non-blocking items deferred there).

Today ctx.storage caps each value (8 MB) but nothing bounds a module's total footprint: unbounded keys are allowed, there is no list/deleteAll, and rows belonging to a module that was removed or renamed stay in /data forever with no surface able to see them. updated_at_ms is written and never read.

What this issue wants:

  • Enumeration: a way to see what is stored — per module key listing (key, size, updated_at_ms), plus an admin-facing view of totals per module (natural home: the /system page, which already exists for exactly this class of diagnostics).
  • Cleanup: deleteAll(module) or equivalent, so rows for a removed/renamed module can be dropped deliberately.
  • Optionally a per-module total bound, once the enumeration exists to make it observable.

Explicitly NOT wanted (from the review): auto-delete on module load failure — a module that failed to clone this boot must not lose its state. Cleanup stays a deliberate, human-triggered act.

Follow-up from the #38 review (non-blocking items deferred there). Today `ctx.storage` caps each **value** (8 MB) but nothing bounds a module's total footprint: unbounded keys are allowed, there is no `list`/`deleteAll`, and rows belonging to a module that was removed or renamed stay in `/data` forever with no surface able to see them. `updated_at_ms` is written and never read. What this issue wants: - **Enumeration**: a way to see what is stored — per module key listing (key, size, `updated_at_ms`), plus an admin-facing view of totals per module (natural home: the `/system` page, which already exists for exactly this class of diagnostics). - **Cleanup**: `deleteAll(module)` or equivalent, so rows for a removed/renamed module can be dropped deliberately. - **Optionally** a per-module total bound, once the enumeration exists to make it observable. Explicitly NOT wanted (from the review): auto-delete on module load failure — a module that failed to clone this boot must not lose its state. Cleanup stays a deliberate, human-triggered act.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
OpsDeck/core#39
No description provided.