Skip to content

Design: fleet kv — namespaced key-value store (local + global), blob offload to content-addressed R2 #10359

Open

Description

@dezren39

Design: fleet kv — a namespaced key-value store (local + global), blob offload to content-addressed R2

Origin: Drew, 2026-11-14. This is the fleet-tooling face of the ID
project's data plane — coordinate with #9107 (ID core epic:
namespaces, ID shapes), #9120 (content-addressed namespace spec), and
#9084 (content-addressed media/data plane: R2 dedup, reference-based
access) so this lands as one system, not a parallel one.

What Drew asked for

  1. A KV verb family in the fleet binary (fleet kv get/set/list,
    namespaced) for arbitrary data — explicitly not the secrets
    store, though nothing forbids a short-lived secret from landing
    there; the secrets verb remains the proper home for credentials.
  2. Local + global stores. Each host has a local store (which is
    backed up). There is also a global (central) store. Read path:
    local first; on a miss, fall back to global. A local value
    overrides the same key in global. An explicit global operation
    (fleet kv --global …, exact surface TBD) always addresses the
    central store directly.
  3. Namespaces. Keys live in namespaces; a "global namespace" is
    just a namespace designated global — no separate mechanism.
    Namespaces map to the ID project's namespace concept (epic(id): Part A — ID core: namespaces, ID shapes, triples, user attributes #9107 /
    design(id): content-addressed namespace (core a) spec #9120), not a fleet-private reinvention.
  4. Session partitions + sweep. A session's local partition does
    not evaporate at disconnect: a sweeper pushes it into the central
    store keyed under the owning user id (+ context id — see the
    context-propagation design filed the same day), so work product
    survives the session.
  5. Per-group databases. Every fleet-launched session — and other
    partitions/groupings (a repo, the fleet project itself, the mcpx
    namespace) — can be handed its own small database, likely Turso.
    The embedded-replica model is the attraction: fast local reads,
    automatic sync. Open question the design must answer with a
    workload sketch: five agents concurrently pulling (and writing?)
    a shared mid-size namespace — replica sync semantics, writer
    topology, and conflict behaviour must be stated, not assumed.
  6. Values of any size, blobs out of the database. Values are
    arbitrary bytes. Above a configurable threshold (Drew named 250 KB
    / 500 KB / 1 MB / 1 GB as the shape of the knob), a push keeps the
    blob local-working as usual but, on sync to the central side,
    routes the bytes through a trusted Cloudflare endpoint into
    the content-addressed R2 bucket; the database row stores key,
    namespace, name, and the content hash + bucket link instead of the
    bytes (design(pm-stack): content-addressed media/data plane — R2 dedup, reference-based access, GC when the last reference drops #9084's reference-based pattern). Later expansion: lists and
    tables on the same substrate — design the key/value layer so they
    are additive.

Non-goals for v1

  • Replacing the secrets verb or its broker.
  • A general SQL surface (per-group Turso DBs in item 5 are handed
    out as-is; fleet kv itself stays KV-shaped).
  • Public/anonymous access — everything rides the existing fleet
    auth (broker tokens, context ids).

Questions the design must answer

  • Local store technology per host (embedded libSQL replica vs
    SQLite file vs the host's Turso DB) and its backup story —
    "sandbox has their own local store that maybe we back up and
    merge" (Drew).
  • Merge semantics for the disconnect sweep: last-writer-wins per
    key, or versioned? What does the central store do with two
    sessions sweeping the same key?
  • The threshold knob: per namespace? per push flag? both?
  • How the trusted Cloudflare endpoint authenticates a pusher and
    who may read a blob back by hash (reference-based access, design(pm-stack): content-addressed media/data plane — R2 dedup, reference-based access, GC when the last reference drops #9084).

Acceptance (design phase)

  • Decision record: store layout (local/global/namespace),
    read/override/sweep semantics, blob threshold + R2 reference
    format, and the five-agent shared-namespace sync answer.
  • Build issues split out: fleet kv verbs + local store first;
    global sync + sweep second; blob offload third.

Activity

  1. added
    kind/designA design proposal (design-architect): multi-step, phased, decision-bearing
    on Nov 14, 2026
  2. developing-today commented on Nov 14, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up + triaged

  4. added
    priority/normalOrdinary priority (the default)
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    status/triagedTriaged and routed (see agent note)
    on Nov 17, 2026
  5. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    Picked up — design #10359 (task 20571, lane oc-code-01).

    Revalidating prior parked reason: #10359 is a design-mill item. Its decision record must settle store layout, sweep/merge semantics, the five-agent shared-namespace sync answer, blob authorization/reference format, and ID namespace alignment, then split three phased build issues. This requires one summit owner and is not unattended lane work.

  6. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    Parked — design #10359 (task 20571, lane oc-code-01).

    Design-mill item requiring a summit owner to settle storage topology, merge/sweep semantics, the five-agent shared-namespace sync answer, blob authorization/reference format, and ID namespace alignment before filing the three phased build issues. Not unattended lane work. Resume when an explicit summit-route owner handoff/reroute is recorded.

  7. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: parked
    task: 20571
    lane: oc-code-01 (OpenChamber scheduled lane, worker repo-worker-code)
    stage: fresh_revalidation -> parked

    Fresh 2026-11-18 verification: #10359 remains OPEN, assigned to dezren39, labeled queue/queued + effort/l, with no matching PR and no sub-issues. No design decision record or phase issue set is recorded in the recent issue history; no explicit Summit-route owner handoff/reroute exists. This is a 45-minute design-mill deliverable spanning storage topology, sweep/merge semantics, concurrent sync, blob authorization, ID namespace coordination, and three implementation phases; it requires one summit owner, not unattended lane execution. No edits or artifacts started. Park task and sync issue labels; resume only after explicit owner handoff/reroute, then revalidate.

    backlog_updated: false

  8. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed on Nov 18, 2026
  9. 2 remaining items

  10. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: parked
    task: 20571
    lane: any-n (OpenChamber scheduled lane, worker repo-worker-code)
    stage: fresh_revalidation -> parked

    Fresh verification: #10359 remains OPEN and assigned to dezren39; no matching PRs were found. The decision record spans storage topology, sweep/merge semantics, concurrent sync, blob authorization/reference format, ID namespace coordination, and three implementation phases. It requires one summit-route design owner, not unattended scheduled-lane execution. No edits or artifacts started. Resume only after an explicit summit-route owner handoff/reroute is recorded, then revalidate.

    backlog_updated: false

  11. added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 18, 2026
  12. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    lane: oc-code-05 (openchamber scheduled), worker repo-worker-code, task 20571
    state: blocked (escalated-to-user)
    reason: this is a summit-owned design-mill item (one summit session owns the decision record). It is assigned to dezren39 and is not authorized for unattended design execution from a scheduled lane. No design doc or PR was started.
    decision needed: explicit owner handoff or reroute to a summit-route session.

  13. removed their assignment
    on Nov 20, 2026
  14. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    lane: code-j (OpenChamber scheduled), worker repo-worker-code, task 20571
    state: picked-up
    stage: claimed -> fresh_revalidation

    Claimed atomically in this run. Fresh GitHub verification: #10359 remains OPEN; no held, user/owned, do-not-auto-edit or do-not-merge labels; no matching PRs. The prior status/blocked and queue/blocked labels are stale from the earlier route escalation. The deliverable is a multi-part design-mill item; per routing policy, one Summit session owns such a design end-to-end. This code-j scheduled lane cannot become that Summit owner in-session, so I will park for route capacity, not wait for an owner decision. No design work started.

  15. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/blockedQueue or user escalation state
    queue/blockedQueue or user escalation state
    on Nov 22, 2026
  16. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    lane: code-j (OpenChamber scheduled), worker repo-worker-code, task 20571
    state: parked
    stage: fresh_revalidation -> parked

    Fresh verification on 2026-11-21: issue OPEN, no matching PRs, and no hard-stop labels. This multi-part design-mill deliverable requires one Summit-route session to own the design end-to-end; this scheduled code-j lane is not that Summit owner and cannot switch route in-session. Parked 30 minutes for route capacity; this is not waiting for an owner decision or handoff. No design artifacts were started. Resume by revalidating and continuing with one Summit-route executor.

    backlog_updated: false

  17. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: routed
    task: 20571
    lane: agent-next-01
    worker: agent-next-01
    origin: fleet-agent-next

    Fresh routing action: issue #10359 requires one Summit-route design-mill owner end-to-end. This workhorse lane cannot switch routes in-session, so I launched a fresh opencode-route/summit session with the reason recorded in its prompt. Summit launch task 21123 / tracking issue #12892 owns the design execution; this lane will not write design prose or implementation. Queue task 20571 is parked on task 21123 reaching terminal completion.

  18. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Agent note — route-capacity park (task 20571, lane agent-next-17-local)

    Fresh verification: Summit owner task 21123 remains parked and tracking issue #12892 remains OPEN. The routing policy requires one Summit session to own this multi-part design-mill item end-to-end; this workhorse lane cannot switch routes in-session, so it made no design or source changes.

    Resume condition: task 21123 reaches done or fails; then re-check the Summit-owned decision record and #10359 acceptance. This is a route-capacity condition, not a human approval gate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lLarge: multi-day or open-ended; expect staged check-insepic/fleet-orchestrationReprioritization program epic (2026-11-12)kind/designA design proposal (design-architect): multi-step, phased, decision-bearingpriority/normalOrdinary priority (the default)queue/parkedQueue task is parked (waiting on CI, time, or an event)status/parkedDeliberately paused with a recorded resume conditionstatus/triagedTriaged and routed (see agent note)work/assignedQueue worker lifecycle state

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions