{
  "version": 1,
  "fileId": "file:lqr4h8:ingestebookcommandhandler-cs",
  "fingerprint": "rczvd8",
  "path": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
  "absolutePath": "c:/Users/micht/source/repos/Nexus.Reader/src/NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
  "shortLabel": "IngestEbookCommandHandler",
  "longLabel": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
  "purpose": "Handles ingestion of an uploaded ebook: saves files to storage, resolves/creates author, creates Ebook entity and persists it to the repository, returning the new Ebook Id or a failure result.",
  "classification": {
    "role": "handler",
    "layer": "application",
    "confidence": 0.9,
    "evidence": [
      "Command pattern",
      "Class implements MediatR IRequestHandler",
      "Uses IEbookRepository and IBookStorageService to orchestrate storage + persistence"
    ]
  },
  "className": "IngestEbookCommandHandler",
  "domainConcepts": [
    "Ebook",
    "Author",
    "File storage",
    "Tenant",
    "User"
  ],
  "patterns": [
    "Repository",
    "Command Handler",
    "Dependency Injection"
  ],
  "keyDetails": "Two-phase ingestion: first persist files to storage (with I/O error mapping), then create/resolve author and persist Ebook in DB (with DB error mapping). Uses MediatR IRequestHandler and repository/service abstractions to keep side effects encapsulated.",
  "coverage": {
    "symbolCount": 3,
    "executableSymbolCount": 2,
    "executableSymbolsWithControlFlowCount": 2,
    "groundedEdgeCount": 3,
    "unresolvedReferenceCount": 12,
    "controlFlowFragmentCount": 2,
    "unresolvedJumpCount": 6,
    "unsupportedConstructCount": 0,
    "controlFlowCoverage": 1,
    "requiredDiagramCount": 2,
    "generatedDiagramCount": 3,
    "missingRequiredDiagramCount": 0
  }
}