[
  {
    "fragmentId": "method:jlw375:ingestebookcommandhandler__fragment",
    "ownerFileId": "file:lqr4h8:ingestebookcommandhandler-cs",
    "ownerSymbolId": "method:jlw375:ingestebookcommandhandler",
    "ownerSymbolName": "IngestEbookCommandHandler",
    "entryNodeId": "method:jlw375:ingestebookcommandhandler__entry",
    "exitNodeIds": [
      "method:jlw375:ingestebookcommandhandler__implicit_return"
    ],
    "nodes": [
      {
        "id": "method:jlw375:ingestebookcommandhandler__entry",
        "kind": "entry",
        "label": "IngestEbookCommandHandler entry",
        "line": 15,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.99,
        "detail": "Constructor; receives repository and storage service via DI and assigns to fields."
      },
      {
        "id": "method:jlw375:ingestebookcommandhandler__action_19_assignment_19__linear",
        "kind": "statement",
        "label": "Assign DI dependencies",
        "line": 19,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "_ebookRepository = ebookRepository; _storageService = storageService;"
      },
      {
        "id": "method:jlw375:ingestebookcommandhandler__implicit_return",
        "kind": "return",
        "label": "return",
        "line": 21,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.72,
        "detail": "Implicit method exit inferred from method boundary."
      }
    ],
    "edges": [
      {
        "id": "method:jlw375:ingestebookcommandhandler__entry__method:jlw375:ingestebookcommandhandler__action_19_assignment_19__linear",
        "from": "method:jlw375:ingestebookcommandhandler__entry",
        "to": "method:jlw375:ingestebookcommandhandler__action_19_assignment_19__linear",
        "kind": "next",
        "line": 19,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:jlw375:ingestebookcommandhandler__action_19_assignment_19__linear__implicit_return",
        "from": "method:jlw375:ingestebookcommandhandler__action_19_assignment_19__linear",
        "to": "method:jlw375:ingestebookcommandhandler__implicit_return",
        "kind": "return",
        "line": 21,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.72
      }
    ],
    "jumpTargets": [],
    "exceptionTargets": [],
    "loopBackEdges": [],
    "mergeNodeIds": [],
    "language": "csharp",
    "confidence": 0.76,
    "lineSpan": {
      "start": 15,
      "end": 21
    },
    "unsupportedConstructs": [],
    "evidence": [
      {
        "path": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "line": 15,
        "summary": "Control-flow fragment extracted for method IngestEbookCommandHandler.",
        "kind": "file-summary"
      }
    ]
  },
  {
    "fragmentId": "method:gy7qh:handle__fragment",
    "ownerFileId": "file:lqr4h8:ingestebookcommandhandler-cs",
    "ownerSymbolId": "method:gy7qh:handle",
    "ownerSymbolName": "Handle",
    "entryNodeId": "method:gy7qh:handle__entry",
    "exitNodeIds": [
      "method:gy7qh:handle__action_38_handle_return_38_4__return",
      "method:gy7qh:handle__action_42_handle_return_42_6__return",
      "method:gy7qh:handle__action_75_handle_return_75_12__return",
      "method:gy7qh:handle__action_75_return_75__return",
      "method:gy7qh:handle__action_79_handle_return_79_14__return"
    ],
    "nodes": [
      {
        "id": "method:gy7qh:handle__entry",
        "kind": "entry",
        "label": "Handle entry",
        "line": 23,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.99,
        "detail": "Orchestrates ebook ingestion: saves epub/cover to storage, resolves or creates author, constructs Ebook entity, persists it and returns the created Ebook Id or failure."
      },
      {
        "id": "method:gy7qh:handle__action_28_try_catch_28__linear",
        "kind": "statement",
        "label": "Storage save with I/O and generic exception handling",
        "line": 28,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "Try saving epub and optional cover; catch IOException -> return storage I/O failure Result.Fail; catch Exception -> return storage failure Result.Fail"
      },
      {
        "id": "method:gy7qh:handle__action_28_handle_try_28_0__try",
        "kind": "try",
        "label": "Begins protected execution",
        "line": 28,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.84,
        "detail": "try"
      },
      {
        "id": "method:gy7qh:handle__action_31_handle_await_31_1__await",
        "kind": "await",
        "label": "Waits for async work",
        "line": 31,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.81,
        "detail": "epubPath = await _storageService.SaveEbookAsync(request.EpubData, $\"{request.Title}.epub\");"
      },
      {
        "id": "method:gy7qh:handle__call_31_SaveEbookAsync",
        "kind": "call",
        "label": "SaveEbookAsync",
        "line": 31,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.88,
        "detail": "request.EpubData, filename = \"{request.Title}.epub\""
      },
      {
        "id": "method:gy7qh:handle__action_32_branch_32__condition",
        "kind": "condition",
        "label": "request.CoverImage != null && request.CoverImage.Length > 0",
        "line": 32,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "Conditional call to SaveCoverAsync when image present"
      },
      {
        "id": "method:gy7qh:handle__action_32_branch_32__true",
        "kind": "branch-true",
        "label": "save cover and set coverUrl",
        "line": 32,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_32_branch_32__false",
        "kind": "branch-false",
        "label": "no cover (coverUrl = null)",
        "line": 32,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_32_branch_32__merge",
        "kind": "statement",
        "label": "merge",
        "line": 32,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_33_handle_await_33_2__await",
        "kind": "await",
        "label": "Waits for async work",
        "line": 33,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.81,
        "detail": "? await _storageService.SaveCoverAsync(request.CoverImage, $\"{request.Title}_cover.jpg\")"
      },
      {
        "id": "method:gy7qh:handle__call_33_SaveCoverAsync",
        "kind": "call",
        "label": "SaveCoverAsync",
        "line": 33,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.88,
        "detail": "request.CoverImage, filename = \"{request.Title}_cover.jpg\" (called only if CoverImage present)"
      },
      {
        "id": "method:gy7qh:handle__action_36_handle_catch_36_3__catch",
        "kind": "catch",
        "label": "catch IOException ex",
        "line": 36,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.86,
        "detail": "catch (IOException ex)"
      },
      {
        "id": "method:gy7qh:handle__action_38_handle_return_38_4__return",
        "kind": "return",
        "label": "Returns result",
        "line": 38,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "return Result.Fail(new Error($\"Storage I/O failure: {ex.Message}\").CausedBy(ex));"
      },
      {
        "id": "method:gy7qh:handle__action_40_handle_catch_40_5__catch",
        "kind": "catch",
        "label": "catch Exception ex",
        "line": 40,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.86,
        "detail": "catch (Exception ex)"
      },
      {
        "id": "method:gy7qh:handle__action_42_handle_return_42_6__return",
        "kind": "return",
        "label": "Returns result",
        "line": 42,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "return Result.Fail(new Error($\"Storage failure: {ex.Message}\").CausedBy(ex));"
      },
      {
        "id": "method:gy7qh:handle__action_45_handle_try_45_7__try",
        "kind": "try",
        "label": "Begins protected execution",
        "line": 45,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.84,
        "detail": "try"
      },
      {
        "id": "method:gy7qh:handle__action_48_guard_clause_48__condition",
        "kind": "condition",
        "label": "string.IsNullOrWhiteSpace(request.AuthorName)",
        "line": 48,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "Sets authorName to 'Unknown Author' if missing, else trimmed value"
      },
      {
        "id": "method:gy7qh:handle__action_48_guard_clause_48__true",
        "kind": "branch-true",
        "label": "use 'Unknown Author'",
        "line": 48,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_48_guard_clause_48__false",
        "kind": "branch-false",
        "label": "use trimmed request.AuthorName",
        "line": 48,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_48_guard_clause_48__merge",
        "kind": "statement",
        "label": "merge",
        "line": 48,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_52_handle_await_52_9__await",
        "kind": "await",
        "label": "Waits for async work",
        "line": 52,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.81,
        "detail": "var author = await _ebookRepository.FindAuthorByNameAsync(authorName, cancellationToken);"
      },
      {
        "id": "method:gy7qh:handle__action_52_handle_repository_read_52_8__linear",
        "kind": "db-read",
        "label": "Reads repository or persistence state",
        "line": 52,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.86,
        "detail": "var author = await _ebookRepository.FindAuthorByNameAsync(authorName, cancellationToken);"
      },
      {
        "id": "method:gy7qh:handle__action_52_external_repository_read_52__linear",
        "kind": "statement",
        "label": "Find author case-insensitively (via repository)",
        "line": 52,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "Calls FindAuthorByNameAsync and branches on null"
      },
      {
        "id": "method:gy7qh:handle__call_52_FindAuthorByNameAsync",
        "kind": "call",
        "label": "FindAuthorByNameAsync",
        "line": 52,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.88,
        "detail": "authorName (trimmed or 'Unknown Author'), cancellationToken"
      },
      {
        "id": "method:gy7qh:handle__action_53_handle_branch_53_10__condition",
        "kind": "condition",
        "label": "author == null",
        "line": 53,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.78,
        "detail": "if (author == null)"
      },
      {
        "id": "method:gy7qh:handle__action_53_handle_branch_53_10__true",
        "kind": "branch-true",
        "label": "true",
        "line": 53,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.78
      },
      {
        "id": "method:gy7qh:handle__action_53_handle_branch_53_10__false",
        "kind": "branch-false",
        "label": "false",
        "line": 53,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.78
      },
      {
        "id": "method:gy7qh:handle__action_53_handle_branch_53_10__merge",
        "kind": "statement",
        "label": "merge",
        "line": 53,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.78
      },
      {
        "id": "method:gy7qh:handle__action_53_branch_fallback_53__linear",
        "kind": "statement",
        "label": "Create missing author",
        "line": 53,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "Adds new Author to repository when not found"
      },
      {
        "id": "method:gy7qh:handle__call_56_AddAuthor",
        "kind": "call",
        "label": "AddAuthor",
        "line": 56,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.88,
        "detail": "new Author { Name = authorName } (when author not found)"
      },
      {
        "id": "method:gy7qh:handle__action_60_entity_construction_60__linear",
        "kind": "statement",
        "label": "Construct Ebook entity",
        "line": 60,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "Populate Title, Author, FilePath, CoverUrl, Description, UserId, TenantId, AddedDate = DateTime.UtcNow"
      },
      {
        "id": "method:gy7qh:handle__action_72_repository_write_72__linear",
        "kind": "db-write",
        "label": "Add ebook and persist",
        "line": 72,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "Calls AddEbook and SaveChangesAsync to persist the new entity"
      },
      {
        "id": "method:gy7qh:handle__call_72_AddEbook",
        "kind": "call",
        "label": "AddEbook",
        "line": 72,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.88,
        "detail": "ebook (Ebook entity constructed from request + paths + metadata)"
      },
      {
        "id": "method:gy7qh:handle__action_73_handle_await_73_11__await",
        "kind": "await",
        "label": "Waits for async work",
        "line": 73,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.81,
        "detail": "await _ebookRepository.SaveChangesAsync(cancellationToken);"
      },
      {
        "id": "method:gy7qh:handle__call_73_SaveChangesAsync",
        "kind": "call",
        "label": "SaveChangesAsync",
        "line": 73,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.88,
        "detail": "cancellationToken"
      },
      {
        "id": "method:gy7qh:handle__action_75_handle_return_75_12__return",
        "kind": "return",
        "label": "Returns result",
        "line": 75,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "return Result.Ok(ebook.Id);"
      },
      {
        "id": "method:gy7qh:handle__action_75_return_75__return",
        "kind": "return",
        "label": "Return success with Ebook Id",
        "line": 75,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "Result.Ok(ebook.Id) returned on successful save"
      },
      {
        "id": "method:gy7qh:handle__action_77_handle_catch_77_13__catch",
        "kind": "catch",
        "label": "catch Exception ex",
        "line": 77,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.86,
        "detail": "catch (Exception ex)"
      },
      {
        "id": "method:gy7qh:handle__action_77_try_catch_77__linear",
        "kind": "statement",
        "label": "Database error handling during persistence",
        "line": 77,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "Wraps persistence in try/catch; on Exception returns Result.Fail with database error"
      },
      {
        "id": "method:gy7qh:handle__action_79_handle_return_79_14__return",
        "kind": "return",
        "label": "Returns result",
        "line": 79,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7,
        "detail": "return Result.Fail(new Error($\"Database error during ingestion: {ex.Message}\").CausedBy(ex));"
      }
    ],
    "edges": [
      {
        "id": "method:gy7qh:handle__entry__method:gy7qh:handle__action_28_try_catch_28__linear",
        "from": "method:gy7qh:handle__entry",
        "to": "method:gy7qh:handle__action_28_try_catch_28__linear",
        "kind": "next",
        "line": 28,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_28_try_catch_28__linear__method:gy7qh:handle__action_28_handle_try_28_0__try",
        "from": "method:gy7qh:handle__action_28_try_catch_28__linear",
        "to": "method:gy7qh:handle__action_28_handle_try_28_0__try",
        "kind": "next",
        "line": 28,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.84
      },
      {
        "id": "method:gy7qh:handle__action_28_handle_try_28_0__try__method:gy7qh:handle__action_31_handle_await_31_1__await",
        "from": "method:gy7qh:handle__action_28_handle_try_28_0__try",
        "to": "method:gy7qh:handle__action_31_handle_await_31_1__await",
        "kind": "next",
        "line": 31,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.81
      },
      {
        "id": "method:gy7qh:handle__action_31_handle_await_31_1__await__call_method:gy7qh:handle__call_31_SaveEbookAsync",
        "from": "method:gy7qh:handle__action_31_handle_await_31_1__await",
        "to": "method:gy7qh:handle__call_31_SaveEbookAsync",
        "kind": "call",
        "label": "request.EpubData, filename = \"{request.Title}.epub\"",
        "line": 31,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.88
      },
      {
        "id": "method:gy7qh:handle__call_31_SaveEbookAsync__method:gy7qh:handle__action_32_branch_32__condition",
        "from": "method:gy7qh:handle__call_31_SaveEbookAsync",
        "to": "method:gy7qh:handle__action_32_branch_32__condition",
        "kind": "next",
        "line": 32,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_32_branch_32__condition__method:gy7qh:handle__action_32_branch_32__true",
        "from": "method:gy7qh:handle__action_32_branch_32__condition",
        "to": "method:gy7qh:handle__action_32_branch_32__true",
        "kind": "condition-true",
        "label": "save cover and set coverUrl",
        "line": 32,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_32_branch_32__condition__method:gy7qh:handle__action_32_branch_32__false",
        "from": "method:gy7qh:handle__action_32_branch_32__condition",
        "to": "method:gy7qh:handle__action_32_branch_32__false",
        "kind": "condition-false",
        "label": "no cover (coverUrl = null)",
        "line": 32,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_32_branch_32__true__method:gy7qh:handle__action_32_branch_32__merge",
        "from": "method:gy7qh:handle__action_32_branch_32__true",
        "to": "method:gy7qh:handle__action_32_branch_32__merge",
        "kind": "next",
        "line": 32,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_32_branch_32__false__method:gy7qh:handle__action_32_branch_32__merge",
        "from": "method:gy7qh:handle__action_32_branch_32__false",
        "to": "method:gy7qh:handle__action_32_branch_32__merge",
        "kind": "next",
        "line": 32,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_32_branch_32__merge__method:gy7qh:handle__action_33_handle_await_33_2__await",
        "from": "method:gy7qh:handle__action_32_branch_32__merge",
        "to": "method:gy7qh:handle__action_33_handle_await_33_2__await",
        "kind": "next",
        "line": 33,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.81
      },
      {
        "id": "method:gy7qh:handle__action_33_handle_await_33_2__await__call_method:gy7qh:handle__call_33_SaveCoverAsync",
        "from": "method:gy7qh:handle__action_33_handle_await_33_2__await",
        "to": "method:gy7qh:handle__call_33_SaveCoverAsync",
        "kind": "call",
        "label": "request.CoverImage, filename = \"{request.Title}_cover.jpg\" (called only if CoverImage present)",
        "line": 33,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.88
      },
      {
        "id": "method:gy7qh:handle__call_33_SaveCoverAsync__method:gy7qh:handle__action_36_handle_catch_36_3__catch",
        "from": "method:gy7qh:handle__call_33_SaveCoverAsync",
        "to": "method:gy7qh:handle__action_36_handle_catch_36_3__catch",
        "kind": "exception",
        "line": 36,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.86
      },
      {
        "id": "method:gy7qh:handle__action_36_handle_catch_36_3__catch__method:gy7qh:handle__action_38_handle_return_38_4__return",
        "from": "method:gy7qh:handle__action_36_handle_catch_36_3__catch",
        "to": "method:gy7qh:handle__action_38_handle_return_38_4__return",
        "kind": "return",
        "line": 38,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_38_handle_return_38_4__return__method:gy7qh:handle__action_40_handle_catch_40_5__catch",
        "from": "method:gy7qh:handle__action_38_handle_return_38_4__return",
        "to": "method:gy7qh:handle__action_40_handle_catch_40_5__catch",
        "kind": "exception",
        "line": 40,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.86
      },
      {
        "id": "method:gy7qh:handle__action_40_handle_catch_40_5__catch__method:gy7qh:handle__action_42_handle_return_42_6__return",
        "from": "method:gy7qh:handle__action_40_handle_catch_40_5__catch",
        "to": "method:gy7qh:handle__action_42_handle_return_42_6__return",
        "kind": "return",
        "line": 42,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_42_handle_return_42_6__return__method:gy7qh:handle__action_45_handle_try_45_7__try",
        "from": "method:gy7qh:handle__action_42_handle_return_42_6__return",
        "to": "method:gy7qh:handle__action_45_handle_try_45_7__try",
        "kind": "next",
        "line": 45,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.84
      },
      {
        "id": "method:gy7qh:handle__action_45_handle_try_45_7__try__method:gy7qh:handle__action_48_guard_clause_48__condition",
        "from": "method:gy7qh:handle__action_45_handle_try_45_7__try",
        "to": "method:gy7qh:handle__action_48_guard_clause_48__condition",
        "kind": "next",
        "line": 48,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_48_guard_clause_48__condition__method:gy7qh:handle__action_48_guard_clause_48__true",
        "from": "method:gy7qh:handle__action_48_guard_clause_48__condition",
        "to": "method:gy7qh:handle__action_48_guard_clause_48__true",
        "kind": "condition-true",
        "label": "use 'Unknown Author'",
        "line": 48,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_48_guard_clause_48__condition__method:gy7qh:handle__action_48_guard_clause_48__false",
        "from": "method:gy7qh:handle__action_48_guard_clause_48__condition",
        "to": "method:gy7qh:handle__action_48_guard_clause_48__false",
        "kind": "condition-false",
        "label": "use trimmed request.AuthorName",
        "line": 48,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_48_guard_clause_48__true__method:gy7qh:handle__action_48_guard_clause_48__merge",
        "from": "method:gy7qh:handle__action_48_guard_clause_48__true",
        "to": "method:gy7qh:handle__action_48_guard_clause_48__merge",
        "kind": "next",
        "line": 48,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_48_guard_clause_48__false__method:gy7qh:handle__action_48_guard_clause_48__merge",
        "from": "method:gy7qh:handle__action_48_guard_clause_48__false",
        "to": "method:gy7qh:handle__action_48_guard_clause_48__merge",
        "kind": "next",
        "line": 48,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_48_guard_clause_48__merge__method:gy7qh:handle__action_52_handle_await_52_9__await",
        "from": "method:gy7qh:handle__action_48_guard_clause_48__merge",
        "to": "method:gy7qh:handle__action_52_handle_await_52_9__await",
        "kind": "next",
        "line": 52,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.81
      },
      {
        "id": "method:gy7qh:handle__action_52_handle_await_52_9__await__method:gy7qh:handle__action_52_handle_repository_read_52_8__linear",
        "from": "method:gy7qh:handle__action_52_handle_await_52_9__await",
        "to": "method:gy7qh:handle__action_52_handle_repository_read_52_8__linear",
        "kind": "next",
        "line": 52,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.86
      },
      {
        "id": "method:gy7qh:handle__action_52_handle_repository_read_52_8__linear__method:gy7qh:handle__action_52_external_repository_read_52__linear",
        "from": "method:gy7qh:handle__action_52_handle_repository_read_52_8__linear",
        "to": "method:gy7qh:handle__action_52_external_repository_read_52__linear",
        "kind": "next",
        "line": 52,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_52_external_repository_read_52__linear__call_method:gy7qh:handle__call_52_FindAuthorByNameAsync",
        "from": "method:gy7qh:handle__action_52_external_repository_read_52__linear",
        "to": "method:gy7qh:handle__call_52_FindAuthorByNameAsync",
        "kind": "call",
        "label": "authorName (trimmed or 'Unknown Author'), cancellationToken",
        "line": 52,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.88
      },
      {
        "id": "method:gy7qh:handle__call_52_FindAuthorByNameAsync__method:gy7qh:handle__action_53_handle_branch_53_10__condition",
        "from": "method:gy7qh:handle__call_52_FindAuthorByNameAsync",
        "to": "method:gy7qh:handle__action_53_handle_branch_53_10__condition",
        "kind": "next",
        "line": 53,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.78
      },
      {
        "id": "method:gy7qh:handle__action_53_handle_branch_53_10__condition__method:gy7qh:handle__action_53_handle_branch_53_10__true",
        "from": "method:gy7qh:handle__action_53_handle_branch_53_10__condition",
        "to": "method:gy7qh:handle__action_53_handle_branch_53_10__true",
        "kind": "condition-true",
        "label": "true",
        "line": 53,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.78
      },
      {
        "id": "method:gy7qh:handle__action_53_handle_branch_53_10__condition__method:gy7qh:handle__action_53_handle_branch_53_10__false",
        "from": "method:gy7qh:handle__action_53_handle_branch_53_10__condition",
        "to": "method:gy7qh:handle__action_53_handle_branch_53_10__false",
        "kind": "condition-false",
        "label": "false",
        "line": 53,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.78
      },
      {
        "id": "method:gy7qh:handle__action_53_handle_branch_53_10__true__method:gy7qh:handle__action_53_handle_branch_53_10__merge",
        "from": "method:gy7qh:handle__action_53_handle_branch_53_10__true",
        "to": "method:gy7qh:handle__action_53_handle_branch_53_10__merge",
        "kind": "next",
        "line": 53,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.78
      },
      {
        "id": "method:gy7qh:handle__action_53_handle_branch_53_10__false__method:gy7qh:handle__action_53_handle_branch_53_10__merge",
        "from": "method:gy7qh:handle__action_53_handle_branch_53_10__false",
        "to": "method:gy7qh:handle__action_53_handle_branch_53_10__merge",
        "kind": "next",
        "line": 53,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.78
      },
      {
        "id": "method:gy7qh:handle__action_53_handle_branch_53_10__merge__method:gy7qh:handle__action_53_branch_fallback_53__linear",
        "from": "method:gy7qh:handle__action_53_handle_branch_53_10__merge",
        "to": "method:gy7qh:handle__action_53_branch_fallback_53__linear",
        "kind": "next",
        "line": 53,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_53_branch_fallback_53__linear__call_method:gy7qh:handle__call_56_AddAuthor",
        "from": "method:gy7qh:handle__action_53_branch_fallback_53__linear",
        "to": "method:gy7qh:handle__call_56_AddAuthor",
        "kind": "call",
        "label": "new Author { Name = authorName } (when author not found)",
        "line": 56,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.88
      },
      {
        "id": "method:gy7qh:handle__call_56_AddAuthor__method:gy7qh:handle__action_60_entity_construction_60__linear",
        "from": "method:gy7qh:handle__call_56_AddAuthor",
        "to": "method:gy7qh:handle__action_60_entity_construction_60__linear",
        "kind": "next",
        "line": 60,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_60_entity_construction_60__linear__method:gy7qh:handle__action_72_repository_write_72__linear",
        "from": "method:gy7qh:handle__action_60_entity_construction_60__linear",
        "to": "method:gy7qh:handle__action_72_repository_write_72__linear",
        "kind": "next",
        "line": 72,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_72_repository_write_72__linear__call_method:gy7qh:handle__call_72_AddEbook",
        "from": "method:gy7qh:handle__action_72_repository_write_72__linear",
        "to": "method:gy7qh:handle__call_72_AddEbook",
        "kind": "call",
        "label": "ebook (Ebook entity constructed from request + paths + metadata)",
        "line": 72,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.88
      },
      {
        "id": "method:gy7qh:handle__call_72_AddEbook__method:gy7qh:handle__action_73_handle_await_73_11__await",
        "from": "method:gy7qh:handle__call_72_AddEbook",
        "to": "method:gy7qh:handle__action_73_handle_await_73_11__await",
        "kind": "next",
        "line": 73,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.81
      },
      {
        "id": "method:gy7qh:handle__action_73_handle_await_73_11__await__call_method:gy7qh:handle__call_73_SaveChangesAsync",
        "from": "method:gy7qh:handle__action_73_handle_await_73_11__await",
        "to": "method:gy7qh:handle__call_73_SaveChangesAsync",
        "kind": "call",
        "label": "cancellationToken",
        "line": 73,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.88
      },
      {
        "id": "method:gy7qh:handle__call_73_SaveChangesAsync__method:gy7qh:handle__action_75_handle_return_75_12__return",
        "from": "method:gy7qh:handle__call_73_SaveChangesAsync",
        "to": "method:gy7qh:handle__action_75_handle_return_75_12__return",
        "kind": "return",
        "line": 75,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_75_handle_return_75_12__return__method:gy7qh:handle__action_75_return_75__return",
        "from": "method:gy7qh:handle__action_75_handle_return_75_12__return",
        "to": "method:gy7qh:handle__action_75_return_75__return",
        "kind": "return",
        "line": 75,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_75_return_75__return__method:gy7qh:handle__action_77_handle_catch_77_13__catch",
        "from": "method:gy7qh:handle__action_75_return_75__return",
        "to": "method:gy7qh:handle__action_77_handle_catch_77_13__catch",
        "kind": "exception",
        "line": 77,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.86
      },
      {
        "id": "method:gy7qh:handle__action_77_handle_catch_77_13__catch__method:gy7qh:handle__action_77_try_catch_77__linear",
        "from": "method:gy7qh:handle__action_77_handle_catch_77_13__catch",
        "to": "method:gy7qh:handle__action_77_try_catch_77__linear",
        "kind": "next",
        "line": 77,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      },
      {
        "id": "method:gy7qh:handle__action_77_try_catch_77__linear__method:gy7qh:handle__action_79_handle_return_79_14__return",
        "from": "method:gy7qh:handle__action_77_try_catch_77__linear",
        "to": "method:gy7qh:handle__action_79_handle_return_79_14__return",
        "kind": "return",
        "line": 79,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "confidence": 0.7
      }
    ],
    "jumpTargets": [
      {
        "id": "method:gy7qh:handle__call_31_SaveEbookAsync__jump_NexusReader_Application_Abstractions_Services_IBookStorageService_cs_SaveEbookAsync",
        "fromNodeId": "method:gy7qh:handle__call_31_SaveEbookAsync",
        "kind": "call-target",
        "targetPath": "NexusReader.Application.Abstractions.Services/IBookStorageService.cs",
        "targetHint": "SaveEbookAsync",
        "line": 31,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "reason": "Call target SaveEbookAsync in NexusReader.Application.Abstractions.Services/IBookStorageService.cs could not be matched to an extracted method symbol.",
        "status": "unresolved"
      },
      {
        "id": "method:gy7qh:handle__call_33_SaveCoverAsync__jump_NexusReader_Application_Abstractions_Services_IBookStorageService_cs_SaveCoverAsync",
        "fromNodeId": "method:gy7qh:handle__call_33_SaveCoverAsync",
        "kind": "call-target",
        "targetPath": "NexusReader.Application.Abstractions.Services/IBookStorageService.cs",
        "targetHint": "SaveCoverAsync",
        "line": 33,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "reason": "Call target SaveCoverAsync in NexusReader.Application.Abstractions.Services/IBookStorageService.cs could not be matched to an extracted method symbol.",
        "status": "unresolved"
      },
      {
        "id": "method:gy7qh:handle__call_52_FindAuthorByNameAsync__jump_NexusReader_Application_Abstractions_Persistence_IEbookRepository_cs_FindAuthorByNameAsync",
        "fromNodeId": "method:gy7qh:handle__call_52_FindAuthorByNameAsync",
        "kind": "call-target",
        "targetPath": "NexusReader.Application.Abstractions.Persistence/IEbookRepository.cs",
        "targetHint": "FindAuthorByNameAsync",
        "line": 52,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "reason": "Call target FindAuthorByNameAsync in NexusReader.Application.Abstractions.Persistence/IEbookRepository.cs could not be matched to an extracted method symbol.",
        "status": "unresolved"
      },
      {
        "id": "method:gy7qh:handle__call_56_AddAuthor__jump_NexusReader_Application_Abstractions_Persistence_IEbookRepository_cs_AddAuthor",
        "fromNodeId": "method:gy7qh:handle__call_56_AddAuthor",
        "kind": "call-target",
        "targetPath": "NexusReader.Application.Abstractions.Persistence/IEbookRepository.cs",
        "targetHint": "AddAuthor",
        "line": 56,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "reason": "Call target AddAuthor in NexusReader.Application.Abstractions.Persistence/IEbookRepository.cs could not be matched to an extracted method symbol.",
        "status": "unresolved"
      },
      {
        "id": "method:gy7qh:handle__call_72_AddEbook__jump_NexusReader_Application_Abstractions_Persistence_IEbookRepository_cs_AddEbook",
        "fromNodeId": "method:gy7qh:handle__call_72_AddEbook",
        "kind": "call-target",
        "targetPath": "NexusReader.Application.Abstractions.Persistence/IEbookRepository.cs",
        "targetHint": "AddEbook",
        "line": 72,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "reason": "Call target AddEbook in NexusReader.Application.Abstractions.Persistence/IEbookRepository.cs could not be matched to an extracted method symbol.",
        "status": "unresolved"
      },
      {
        "id": "method:gy7qh:handle__call_73_SaveChangesAsync__jump_NexusReader_Application_Abstractions_Persistence_IEbookRepository_cs_SaveChangesAsync",
        "fromNodeId": "method:gy7qh:handle__call_73_SaveChangesAsync",
        "kind": "call-target",
        "targetPath": "NexusReader.Application.Abstractions.Persistence/IEbookRepository.cs",
        "targetHint": "SaveChangesAsync",
        "line": 73,
        "sourcePath": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "reason": "Call target SaveChangesAsync in NexusReader.Application.Abstractions.Persistence/IEbookRepository.cs could not be matched to an extracted method symbol.",
        "status": "unresolved"
      }
    ],
    "exceptionTargets": [],
    "loopBackEdges": [],
    "mergeNodeIds": [
      "method:gy7qh:handle__action_32_branch_32__merge",
      "method:gy7qh:handle__action_48_guard_clause_48__merge",
      "method:gy7qh:handle__action_53_handle_branch_53_10__merge"
    ],
    "language": "csharp",
    "confidence": 0.98,
    "lineSpan": {
      "start": 23,
      "end": 81
    },
    "unsupportedConstructs": [],
    "evidence": [
      {
        "path": "NexusReader.Application/Commands/Library/IngestEbookCommandHandler.cs",
        "line": 23,
        "summary": "Control-flow fragment extracted for method Handle.",
        "kind": "file-summary"
      }
    ]
  }
]