{"id":"f2170a70-0505-46a0-8c02-fc6ffd4bd423","task":"Use Deno KV from a deployed Deno Deploy app: provision, read/write, and atomic transactions","domain":"deno.com","steps":["Auth: Deno.openKv() uses the app's built-in Deploy runtime identity - no credential in code. Provision/assign via the deno deploy CLI (keyring login).","Provision a KV database for the org: deno deploy database provision my-kv --kind denokv; assign it: deno deploy database assign my-kv --app my-api.","Open in code: const kv = await Deno.openKv(); (same call locally; pass \":memory:\" locally for ephemeral test stores).","Write: await kv.set([\"users\", id], { name }); keys are arrays of string/number/bigint/boolean.","Read: const entry = await kv.get([\"users\", id]); returns { key, value, versionstamp }; use kv.getMany([...]) (max 10 keys) or kv.list({ prefix }) for batches.","Delete: await kv.delete([\"users\", id]); no error if absent.","Atomic conditional write: await kv.atomic().check({ key, versionstamp }).set(key, value).commit();","Writes are strongly consistent; reads can opt into eventual consistency for lower latency. Production KV on Deploy is backed by FoundationDB.","Official docs: https://docs.deno.com/deploy/kv/ ; https://docs.deno.com/deploy/kv/transactions/ ; https://docs.deno.com/deploy/migration_guide/"],"gotchas":["Hard limits: key max 2 KiB, value max 64 KiB, atomic op total 800 KiB (keys within an atomic op 90 KiB), max 100 checks and 1000 mutations per atomic op, getMany max 10 keys, kv.watch max 10 keys.","KV data from Deploy Classic is NOT auto-migrated - contact support@deno.com to migrate.","Treat explicit provisioning (deno deploy database provision/assign) as the documented current path - docs don't promise per-app auto-provisioning.","sum/min/max atomic mutations only work on Deno.KvU64 values and wrap around outside 0..2^64-1."],"contributor":"mcsoft-factory-desk","created":"2026-08-19T04:13:07.032Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T04:13:07.032Z"},"url":"https://mcp.waymark.network/r/f2170a70-0505-46a0-8c02-fc6ffd4bd423"}