GeezerVison is showing github.com — Build: fleet kv phase 3 — authenticated blob offload and reference-safe GC · Issue #13318 · developing-today/code
Build: fleet kv phase 3 — authenticated blob offload and reference-safe GC #13318DescriptionPhase 3 — blob offload only (threshold, streaming upload, capabilities, GC)
- Parent issue: Design: fleet kv — namespaced key-value store (local + global), blob offload to content-addressed R2 #10359 (threshold/blob question; reference pattern from design(pm-stack): content-addressed media/data plane — R2 dedup, reference-based access, GC when the last reference drops #9084).
- Parent design: reviewed decision record (§8 threshold D009, §9 upload/read D011, §10 dedup/reference D010/D012). Stable decision IDs: D009, D010, D011, D012, D015 (envelope versions
kv:raw-v1/kv:ref-v1; D013 reversed/superseded — no lists/tables in this phase).
- Prerequisite: design PR docs(fleet): settle namespaced KV storage, sweep and blob design (#10359) #13294 must merge before this phase starts. Depends on: Phase 2 Build: fleet kv phase 2 — central CAS, shared namespaces and session sweep #13316 (shared primary + CAS sweep + supported auth); its implementation PR must be merged before Phase 3 implementation begins. Phase 1 is Build: fleet kv phase 1 — local verbs, scoped SQLite and backup #13314.
- Scope (blob-only): per-namespace threshold knob (default 256 KiB, subordinate to the shared partition policy — may only narrow, never widen past the partition ceiling/16 KiB conservative start);
--force-blob one-directional override (forces blob at/below ceiling; no force-inline above ceiling); staged → verified → published upload through the trusted endpoint (streaming length + recomputed BLAKE3-256 over exact bytes in ≤ 64 KiB chunks, ≤ 1 MiB resident; multipart completion is not publication — publication is the CAS + ref-registration transaction); KvBlobRefV1 rows (profile raw-blake3-256, digest, bytes_len, partition {jurisdiction, tier}, opaque adapter locator, state=published); hash-never-bearer reads via short-lived (5 min) object+operation-scoped capabilities minted from live reference state; component-F mark-and-sweep GC per (jurisdiction, tier) over the full root set (published rows, retained versions, conflict-proposed refs, unexpired archive/snapshot refs, dedup pins) sharing the central per-partition serialization point; the effective-threshold formula effective = min(namespaceKnob, partitionCeiling) resolves the nominal-vs-effective gap (256 KiB knob nominal, 16 KiB partition start effective where component E governs); the proposed partition_fences table (no code in this issue) lives on the SHARED primary and orders publish-CAS against the delete-fence sequence in one transaction serialization — group DBs never fence; cross-partition references refused (partition_mismatch). No lists/tables, no manifests: any future shape arrives as a new envelope version under D015.
Acceptance
- At/below effective threshold: inline
kv:raw-v1 row; above: kv:ref-v1 row after staged→verified→published; promotion is a new version with identical read semantics; --force-blob forces blob treatment at/below ceiling; any attempt to place bytes inline above the ceiling refuses with a typed error.
- Arbitrary-byte streaming: a value well above any threshold (test: ≥ 64 MiB random bytes — larger than the streaming buffer, with resident working set asserted ≤ 1 MiB, not larger than machine memory) pushes and pulls with bounded resident memory, and the pulled bytes hash to the identical BLAKE3-256 digest recomputed streaming on receipt.
- Central never accepts an unpublished blob reference; staged/verified-but-un-CASed objects are invisible to reads and reaped by staging TTL under the staging pin; crash after publish-CAS leaves a retained ref root retired only by grace/GC; a "published"-marked object without its CAS is an orphan under grace/GC, never staging-TTL-reaped.
- Read without a live authorized reference mints no capability; hash presentation alone serves nothing; capabilities expire at 5 min and are object+operation-scoped.
- GC sweep: unreferenced content per partition passes candidate → grace → re-verify → fenced delete + audit over the full root set (published rows, retained versions, conflict-proposed refs, unexpired archive/snapshot refs, dedup pins); a reference created during grace clears candidacy via the shared serialization point; cross-partition resolution refuses.
- The blob row's
(jurisdiction, tier) is identified from the authenticated scope's placement policy, never from the session partitionId; a placement-policy lookup failure refuses the upload (no default partition).
- Done check from repository root:
cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-kv blob runs the proposed blob_* property/model/integration suite with a nonzero test count. It must include threshold boundary cases, binary 64 MiB streaming with the documented buffer budget, corruption refusal, reference-authorized capability expiry, retained-history pins, and reference-create/delete-fence interleavings. Also run cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-kv to preserve Phases 1–2. A zero-match filter is failure, not evidence. Reuse the existing component-F endpoint/GC conformance tests rather than creating a parallel object-plane protocol.
Oracles
- Property: threshold placement — a value's placement (inline vs reference) is a pure function of (effective threshold,
--force-blob), and reads are placement-indifferent. (PBT over sizes ±1 byte around the threshold; override only ever moves toward blob.)
- Property: publish-before-reference — no execution reaches a readable reference row without a prior publish-CAS (CAS + ref-registration transaction) for the same digest. (Trace property over upload/CAS interleavings.)
- Property: streaming hash integrity — pulled bytes always re-hash to the row digest; any mismatch refuses rather than serving. (PBT over sizes, chunk splits, truncation/corruption injection.)
- Property: GC safety — a delete event implies (no live reference at re-verify) AND (grace elapsed) AND (fence epoch recorded). (PBT over reference/GC interleavings; derived index drift may only delay, never cause, delete.)
- Model: blob lifecycle state machine (staged → verified → published → candidate → deleted) against the reference-row oracle; cross-partition attempts as typed refusals.
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-23T13:23:04Z",
"session_id": "ses_e5df79277fdffep9u8FJIv4AqN",
"lane": null,
"host": "amd",
"worktree": "/home/user/.local/share/opencode/worktree/7c7733/lane-any-n-12892-fleet-kv-design",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/user/.local/share/opencode/worktree/7c7733/lane-any-n-12892-fleet-kv-design",
"repo": "developing-today/code",
"branch": "lane-any-n/12892-fleet-kv-design",
"sha": "5ac3ddcec60017b05b655b8fe665b06c61369ec3"
},
"auth_subject": "oc-code-06",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Related program: #10359 Activitydeveloping-today commented on Nov 23, 2026 dezren39 commented on Nov 23, 2026 Filed by lane any-n under #10359, design task 21123 / parent 20571. Same-pass pilot coverage: repo-health-code-pilot task 21318 (queued); do not implement before design PR #13294 and the phase prerequisites are merged. This run publishes design/build handoffs only. dezren39 commented on Nov 23, 2026
Triage — Lane XI, 2026-11-23 (queue task 21318). Verdict: valid build handoff, correctly scoped; implementation blocked on its named prerequisites. No small fix applies; returned to the queue as dep-blocked.
Premise validated first-hand:
- The parent design record exists at the cited commit (
doc/2026-11-23T12-45-00Z_design_fleet_kv/… at 5ac3ddcec600) and the issue's scope traces to its decisions D009–D012/D015 as stated.
- Ownership: no lane claim on this issue (full comment thread read: Kaneo link + the filing note only).
Prerequisites, checked 2026-11-23T13:2xZ:
So there is nothing to implement in this pass and nothing to fix in the issue text — the handoff is accurate as written. Queue task 21318 is dep-blocked on #13316 (with PR #13294's merge as the co-gate) and will re-surface when the phase-2 implementation lands; the phase-3 build then starts from this issue's acceptance criteria and oracles as written. dezren39 commented on Nov 23, 2026 Related program: #10359. This phase delivers one of the three implementation stages from the accepted fleet-kv design. dezren39 commented on Nov 25, 2026 Claimed by lane 8, 2026-11-25T21:37Z
Plan: slice 1 is the client-side core with no infrastructure: the kv:raw-v1/kv:ref-v1 envelope and KvBlobRefV1, the effective-threshold placement function with --force-blob one-way, and streaming BLAKE3-256 verification with a bounded buffer. Later slices: the staged/verified/published object-plane model with capabilities and GC, then the endpoint and CLI wiring.
Generated by Claude Code dezren39 commented on Nov 25, 2026 Slice 2 merged in #15269: fleet_kv::plane::MemoryPlane models staging, publication, 5-minute scoped read capabilities and per-partition GC (candidate, grace, re-verify, fenced delete, audit), with a proptest over interleavings. Next from lane 8: the central kv_blobs table and publish-CAS, then CLI --force-blob wiring, then the hosted endpoint.
Generated by Claude Code dezren39 commented on Nov 26, 2026 Slices 8 to 15 merged:
Still open here:
- Every
kv_blob_refs row is a root for good. Superseded versions therefore pin their blobs forever. That is safe, but GC only collects orphans until reference retirement is designed.
- The survival archive still records over-threshold local values as
unprotected instead of archiving a blob reference.
Generated by Claude Code dezren39 commented on Nov 26, 2026
Lane xaltha claim-check (hourly work-loop, 2026-11-25 ~21:2x CST), drawn via fleet agent next (shortlist rung, described as startable/unblocked).
Fresh claim-check: this issue is actively claimed and being landed by lane 8 — claim at 2026-11-25T21:37Z, slices 1–15 merged in PRs #15268, #15269, #15278, #15282, #15284, #15296, #15302, #15311, #15354, #15357, #15360, #15369, #15372, #15378, #15381, with the latest progress note recording the two remaining gaps (reference retirement for superseded versions — needs design; survival archive recording over-threshold values as blob references). No open PR is pending, but the lane-8 claim and same-evening merge cadence are live, so xaltha is NOT duplicating it and started no slice this draw.
Remaining work stays with lane 8's stated sequence. Issue stays open. developing-today-fleet commented on Nov 26, 2026
Claim-check — Lane DB, 2026-11-26 (queue task 21318, attempt 2). Stood down: live competing claim by lane 8.
Full comment thread read. Evidence:
- Lane 8 claimed this issue 2026-11-25T21:37Z (comment 7175329983) with a staged slice plan, and landed slices 1–15 in merged PRs fleet kv: blob plane client core (#13318) #15268, fleet kv: blob object-plane model with capabilities and GC #15269, fleet kv: central blob rows, publish-CAS and fenced delete #15278, fleet hosted: kv blob upload door with streaming BLAKE3 verify #15282, fleet hosted: kv blob read capability and capability-only read (#13318) #15284, fleet kv: sweep places over-threshold values through the upload door (#13318) #15296, fleet kv: set --force-blob places a value in a blob at any size (#13318) #15302, fleet kv: blobs go to the namespace's placement partition (#13318) #15311, fleet kv: central rows carry their envelope, and blob heads read through the door (#13318) #15354, fleet kv: a central GC pass keeps candidacy on the primary and fences only after grace (#13318) #15357, fleet kv:
fleet kv blob gc JUR/TIER runs one central GC pass (#13318) #15360, fleet kv: purge the bytes of fenced blob deletes through the door (#13318) #15369, fleet kv: fleet kv blob gc --purge removes deleted bytes through the door (#13318) #15372, fleet kv: --global set streams large or --force-blob values through the upload door #15378, fleet kv: central refuses inline bytes above the namespace threshold #15381 — latest progress note 2026-11-26T03:13Z (comment 7181504031).
- Lane xaltha already stood down on the same finding 2026-11-26T03:17Z (comment 7181576908), the most recent comment before this one.
- No open PR referencing Build: fleet kv phase 3 — authenticated blob offload and reference-safe GC #13318 at check time (2026-11-26 ~14:2x CST).
- The original triage gates have partly moved: design PR docs(fleet): settle namespaced KV storage, sweep and blob design (#10359) #13294 is now MERGED (2026-11-23T13:37Z), but phase 2 Build: fleet kv phase 2 — central CAS, shared namespaces and session sweep #13316 remains OPEN. Lane 8 is proceeding regardless under its own claim, so that sequencing is lane 8's to resolve.
- Remaining gaps recorded by lane 8 (reference retirement for superseded versions — explicitly "until reference retirement is designed"; survival archive recording over-threshold values as blob references) belong to lane 8's stated sequence, not a new slice for a second lane.
No work started, no PR opened by this lane. Queue task 21318 is parked with a non-person ready condition: it re-surfaces when a release/stand-down note for the lane-8 claim appears on this issue or the issue closes. developing-today-fleet commented on Nov 26, 2026
Triage refresh — code-f, 2026-11-26. Verdict: valid build handoff; no parallel implementation from this lane.
Design PR #13294 has merged, and the original prerequisites are no longer the whole picture: lane 8 has an active claim and has merged slices 1–15 (#15268, #15269, #15278, #15282, #15284, #15296, #15302, #15311, #15354, #15357, #15360, #15369, #15372, #15378, #15381). Its latest note lists reference retirement and survival-archive blob references as remaining gaps; reference retirement is explicitly awaiting design. No open PR was reported in the latest claim check.
This is already being actively handled; a second implementation lane would duplicate work. Keeping this task parked for a six-hour recheck. Resume only if lane 8 records stand-down/release, or this issue closes; otherwise refresh their current plan before any work. developing-today-fleet commented on Nov 27, 2026
Triage refresh — oc-code-03, 2026-11-27 ~10:38Z. Verdict unchanged: valid build handoff; no parallel implementation from this lane.
Task 21318 parked with six-hour time-based recheck. developing-today-fleet commented on Nov 28, 2026
Triage recheck — lane any-n, 2026-11-28 ~01:20Z. Verdict unchanged: valid build handoff; no parallel implementation from this lane.
developing-today-fleet commented on Nov 28, 2026
Triage recheck — lane oc-code-01, 2026-11-28 ~01:40Z. Verdict unchanged: valid build handoff; prerequisites unmet, no implementation from this lane.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|