{
  "concept": "7D",
  "decision": "separate IndexedDB database with metadata and bytes object stores",
  "database": "atom-artifacts",
  "version": 1,
  "stores": {
    "metadata": "versioned GeneratedReportArtifact metadata envelopes keyed by artifact_id",
    "bytes": "immutable report bytes keyed by artifact_id"
  },
  "why": [
    "Keeps generated bytes out of ProjectV2 and atom-planning-workspace.",
    "Keeps metadata listing cheap without hydrating report bodies.",
    "Works offline and needs no backend, database server, object store, or authentication.",
    "Preserves the additive migration boundary established by Concept 7C."
  ],
  "rejected_for_7d": {
    "workspace_indexeddb": "would mix evidence bytes with project metadata and violate the storage boundary",
    "filesystem_access_api": "not consistently available across browsers and requires permission prompts",
    "metadata_only": "would not support durable later-download behavior",
    "remote_object_storage": "outside local-first scope"
  },
  "relation_model": "ReportDefinition remains project/domain metadata; GeneratedReportArtifact metadata and bytes remain artifact-store evidence. Runs are not mutated. RunArtifactReference is a future/read-only relation concept, while current artifact metadata carries run_ids.",
  "export_boundary": "ProjectV2 export does not include artifact bytes; a future evidence bundle may include report bytes, metadata, Run summaries, fingerprints, and a checksum manifest.",
  "failure_policy": {
    "missing_bytes": "metadata is marked missing and download is blocked",
    "hash_mismatch": "metadata is marked corrupt and bytes are never served as valid evidence",
    "storage_write_failure": "generated bytes remain available to the current download/print action and the UI states that local retention failed",
    "quota": "use navigator.storage.estimate when available; warn near 80 percent, fail explicitly at the browser quota, never evict silently"
  }
}
