A guided, ordered walkthrough of every .cs file in this change vs main — what to verify per file and a risk rating — so the review can be split across the team and nothing is missed.
main: 13 commits, 136 .cs files (121 new, 15 modified). Review top to bottom; each stage builds on the one before.Review top to bottom — model → ports → orchestration → edges → tests. Tick a file once reviewed; progress is saved in your browser.
Hand each colleague one or more stages. Start the high-risk stages (7–10: the base handler, step handlers, control commands) with your strongest reviewers.
Each file lists the specific things to verify — guard conditions, transactions, concurrency, idempotency, error classification — not a summary. Read the code; use these as the lens.
Focus: The ingestion aggregate, the status/step value objects, and the queued event. Read this first — every handler builds on this state machine.
src/WOCK.WholeSale.Domain/Delivery/InboundDeliveryIngestion/Events/InboundDeliveryIngestionQueuedEvent.cshighsrc/WOCK.WholeSale.Domain/Delivery/InboundDeliveryIngestion/InboundDeliveryIngestion.cshighsrc/WOCK.WholeSale.Domain/Delivery/InboundDeliveryIngestion/IngestionOrigin.cslowsrc/WOCK.WholeSale.Domain/Delivery/InboundDeliveryIngestion/IngestionStatus.csmediumsrc/WOCK.WholeSale.Domain/Delivery/InboundDeliveryIngestion/IngestionStepExecution.csmediumsrc/WOCK.WholeSale.Domain/Delivery/InboundDeliveryIngestion/IngestionStepStatus.cslowsrc/WOCK.WholeSale.Domain/Delivery/InboundDeliveryIngestion/IngestionStepType.csmediumFocus: The stop / start / resume / restart / delete transition guards. Verify each encodes the right allowed states and is evaluated before any mutation.
src/WOCK.WholeSale.Domain/Delivery/InboundDeliveryIngestion/Rules/IngestionCanBeDeletedOnlyWhenInactiveRule.csmediumsrc/WOCK.WholeSale.Domain/Delivery/InboundDeliveryIngestion/Rules/IngestionCanBeRestartedUnlessCompletedRule.cshighsrc/WOCK.WholeSale.Domain/Delivery/InboundDeliveryIngestion/Rules/IngestionCanBeResumedOnlyFromGracePauseRule.csmediumsrc/WOCK.WholeSale.Domain/Delivery/InboundDeliveryIngestion/Rules/IngestionCanBeStartedOnlyWhenStoppedOrFailedRule.cslowsrc/WOCK.WholeSale.Domain/Delivery/InboundDeliveryIngestion/Rules/IngestionCanBeStoppedOnlyWhileActiveRule.cslowFocus: Edits to the existing InboundDelivery / Key so the converge can create a delivery with keys already uploaded. Review only these hunks — the skip-key-upload gate and pre-computed blob naming.
src/WOCK.WholeSale.Application/Deliveries/InboundDelivery/EventHandlers/InboundDeliveryCreated/UploadKeysToStorageEventHandler.csmediumsrc/WOCK.WholeSale.Domain/Delivery/InboundDelivery/Events/InboundDeliveryCreated/InboundDeliveryCreatedEvent.cslowsrc/WOCK.WholeSale.Domain/Delivery/InboundDelivery/InboundDelivery.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDelivery/EventHandlers/InboundDeliveryCreated/SupplyInboundOrdersEventHandler.csmediumsrc/WOCK.WholeSale.Domain/Delivery/Key.cshighFocus: The interfaces the pipeline depends on. Check the contracts (and the required UserId on background commands) before the implementations.
src/WOCK.Framework.Persistence.Abstraction/Repositories/IInboundDeliveryIngestionsRepository.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Abstractions/IInboundDeliveryIngestionStorage.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Abstractions/IGeneratedInboundOrderSink.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Abstractions/IInboundDeliveryMultipartParser.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Abstractions/IInboundDeliveryZipExpander.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Abstractions/IIngestionKeyReservationService.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Abstractions/IIngestionProgressService.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Abstractions/IKeysStorageMirror.csmediumFocus: The JSON artifacts passed step-to-step, the error catalogue, and the progress DTOs — the shapes everything else relies on.
src/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/StepOutcome.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/InboundDeliveryUploadFields.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Models/ParsedPayloadArtifact.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Models/PreparedKeysArtifact.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Responses/InboundDeliveryIngestionProgressResponse.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Responses/IngestionStepProgressDto.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Results/IngestionErrors.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Results/IngestionStepFailure.csmediumFocus: Command DTOs (carriers of IngestionId / Attempt / UserId) and the background-command base that restores user context. Check the attempt + user threading.
src/WOCK.WholeSale.Application/BackgroundCommandHandler.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/AwaitGracePeriodStepCommand.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/CreateInboundDeliveryIngestionCommand.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/CreateInboundDeliveryStepCommand.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/CreateInboundDeliveryStepCommandTimeout.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/DeleteInboundDeliveryIngestionCommand.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/DetectDuplicatesStepCommand.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/ExpandArchivesStepCommand.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/GenerateKeysStepCommand.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/InboundDeliveryIngestionStepCommand.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/MarkIngestionTerminallyFailedCommand.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/ParseRawPayloadStepCommand.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/PurgeIngestionRawPayloadCommand.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/ReserveKeysStepCommand.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/ResolveAndValidateProductsStepCommand.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/RestartInboundDeliveryIngestionCommand.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/ResumeInboundDeliveryIngestionCommand.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/StartInboundDeliveryIngestionCommand.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/StopInboundDeliveryIngestionCommand.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/UploadKeysStepCommand.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Commands/ValidatePartnerStepCommand.csmediumFocus: The shared step-handler lifecycle (stale/stop/idempotency guards, record-step, enqueue-next, transaction) and the HTTP entry that queues the ingestion. The highest-leverage files in the PR.
src/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/CreateInboundDeliveryIngestionCommandHandler.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/InboundDeliveryIngestionStepHandler.cshighFocus: Read each ExecuteAsync: artifact in/out, the business-failure classification, and the warehouse/key checks in Generate keys.
src/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/ExpandArchivesStepHandler.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/GenerateKeysStepHandler.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/ParseRawPayloadStepHandler.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/ResolveAndValidateProductsStepHandler.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/ValidatePartnerStepHandler.csmediumFocus: The concurrency-critical stretch: Redis reservation, in-load dedupe + release, blob upload, the grace schedule, and the token-guarded converge.
src/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/AwaitGracePeriodStepHandler.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/CreateInboundDeliveryStepHandler.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/DetectDuplicatesStepHandler.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/ReserveKeysStepHandler.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/UploadKeysStepHandler.cshighFocus: Stop / resume / start / restart / delete / capture / purge / terminal-fail. Verify cache-flag vs aggregate-write, attempt bumping, and reservation release.
src/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/DeleteInboundDeliveryIngestionCommandHandler.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/MarkIngestionTerminallyFailedCommandHandler.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/PurgeIngestionRawPayloadCommandHandler.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/RestartInboundDeliveryIngestionCommandHandler.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/ResumeInboundDeliveryIngestionCommandHandler.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/StartInboundDeliveryIngestionCommandHandler.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CommandHandlers/StopInboundDeliveryIngestionCommandHandler.csmediumFocus: Pipeline start on the queued integration event, success on the order-completed event, and the completed-delivery broadcast. Check idempotency and correlation.
src/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/EventHandlers/BroadcastInboundDeliveryCompletedEventHandler.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/EventHandlers/StartPipelineWhenIngestionQueuedEventHandler.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/EventHandlers/SucceedIngestionWhenGeneratedOrderCompletedEventHandler.csmediumFocus: The raw-payload purge cron (must include IboGenerated) and the read-side queries/handlers.
src/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/CronJobs/PurgeStaleIngestionRawPayloadsCronJob.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Query/GetCompletedInboundDeliveryIngestionsQuery.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Query/GetExpandedInboundDeliveryIngestionPayloadQuery.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Query/GetInboundDeliveryIngestionQuery.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/Query/GetInProgressInboundDeliveryIngestionsQuery.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/QueryHandlers/GetCompletedInboundDeliveryIngestionsQueryHandler.cslowsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/QueryHandlers/GetExpandedInboundDeliveryIngestionPayloadQueryHandler.cshighsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/QueryHandlers/GetInboundDeliveryIngestionQueryHandler.csmediumsrc/WOCK.WholeSale.Application/Deliveries/InboundDeliveryIngestion/QueryHandlers/GetInProgressInboundDeliveryIngestionsQueryHandler.csmediumFocus: The concrete implementations: PVC storage, ZIP expander, Redis key reservation (Lua), progress service, keys mirror.
src/WOCK.WholeSale.Factories/Ingestion/InboundDeliveryIngestionStorage.csmediumsrc/WOCK.WholeSale.Factories/Ingestion/GeneratedInboundOrderSink.cslowsrc/WOCK.WholeSale.Factories/Ingestion/InboundDeliveryZipExpander.cslowsrc/WOCK.WholeSale.Factories/Ingestion/IngestionKeyReservationService.cslowsrc/WOCK.WholeSale.Factories/Ingestion/IngestionProgressService.cslowsrc/WOCK.WholeSale.Factories/Ingestion/KeysStorageMirror.cslowFocus: SignalR broadcast additions, cache interface, the new AppSettings ingestion fields, and the test mocks. Review the diffs only.
src/WOCK.Framework.Cache/ICacheService.cslowsrc/WOCK.Framework.Utils/Mocks/BackgroundServiceMock.cslowsrc/WOCK.Framework.Utils/Mocks/NotificationServiceMock.cslowsrc/WOCK.Framework.WebAPI.Abstraction/Models/AppSettings.cslowsrc/WOCK.WholeSale.Services/Websocket/NotificationService/INotificationService.cslowsrc/WOCK.WholeSale.Services/Websocket/NotificationService/NotificationService.cslowFocus: The controller, the streaming multipart parser, the terminal-failure Hangfire filter, runtime config hot-reload, and the DI wiring in Startup. Confirm everything is registered.
src/WOCK.WholeSale.WebAPI/Controllers/Deliveries/InboundDeliveryIngestionsController.cshighsrc/WOCK.WholeSale.WebAPI/Infrastructure/Configuration/IngestionRuntimeConfigReloader.cslowsrc/WOCK.WholeSale.WebAPI/Infrastructure/Configuration/IngestionRuntimeOptions.cslowsrc/WOCK.WholeSale.WebAPI/Infrastructure/Filters/IngestionStepTerminalFailureFilter.cslowsrc/WOCK.WholeSale.WebAPI/Infrastructure/Ingestion/InboundDeliveryMultipartParser.csmediumsrc/WOCK.WholeSale.WebAPI/Program.cshighsrc/WOCK.WholeSale.WebAPI/Startup.cshighFocus: The EF configurations and the repository. Check column types/lengths, the owned Trace, and the eager-load includes.
src/WOCK.WholeSale.Persistence/Deliveries/Configuration/InboundDeliveryIngestionConfiguration.cslowsrc/WOCK.WholeSale.Persistence/Deliveries/Configuration/IngestionStepExecutionConfiguration.cslowsrc/WOCK.WholeSale.Persistence/Deliveries/Repositories/InboundDeliveryIngestionsRepository.csmediumFocus: Verify the migrations match the configs and are forward-only. Focus on the migration Up(); the *.Designer / snapshot files are EF-generated.
src/WOCK.WholeSale.Persistence.Migrations/Deliveries/20260530044305_AddedIngestion_Deliveries.csmediumsrc/WOCK.WholeSale.Persistence.Migrations/Deliveries/20260530044305_AddedIngestion_Deliveries.Designer.cslowsrc/WOCK.WholeSale.Persistence.Migrations/Deliveries/20260611133321_IngestionSimplify_Deliveries.cslowsrc/WOCK.WholeSale.Persistence.Migrations/Deliveries/20260611133321_IngestionSimplify_Deliveries.Designer.cslowsrc/WOCK.WholeSale.Persistence.Migrations/Deliveries/20260616063223_IngestionAdjustments_Deliveries.cslowsrc/WOCK.WholeSale.Persistence.Migrations/Deliveries/20260616063223_IngestionAdjustments_Deliveries.Designer.cslowsrc/WOCK.WholeSale.Persistence.Migrations/Deliveries/20260619071643_IngestionDeliveryAndOrderReferences_Deliveries.cslowsrc/WOCK.WholeSale.Persistence.Migrations/Deliveries/20260619071643_IngestionDeliveryAndOrderReferences_Deliveries.Designer.cslowsrc/WOCK.WholeSale.Persistence.Migrations/Deliveries/DeliveriesContextModelSnapshot.csmediumFocus: Coverage of the aggregate, rules, base lifecycle, each handler, and the integration test. Check the risky paths (grace token, stop/resume, converge) are actually asserted.
src/WOCK.WholeSale.Tests.Integration/Deliveries/Inbound/InboundDeliveryIngestionIntegrationTests.cshighsrc/WOCK.WholeSale.Tests.Integration/Helpers/EndpointsPaths.cslowsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/AwaitGracePeriodStepHandlerTests.cshighsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/CreateInboundDeliveryIngestionCommandHandlerTests.cslowsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/DetectDuplicatesStepHandlerTests.cshighsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/ExpandArchivesStepHandlerTests.csmediumsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/GetExpandedInboundDeliveryIngestionPayloadQueryHandlerTests.cslowsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/InboundDeliveryIngestionStepHandlerTests.cshighsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/InboundDeliveryIngestionTests.cshighsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/CreateInboundDeliveryStepHandlerTests.cslowsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/IngestionProgressServiceTests.cslowsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/IngestionRulesTests.csmediumsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/IngestionStepFailureTests.cslowsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/MarkIngestionTerminallyFailedCommandHandlerTests.csmediumsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/ReserveKeysStepHandlerTests.cshighsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/ResumeInboundDeliveryIngestionCommandHandlerTests.cshighsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/StartInboundDeliveryIngestionCommandHandlerTests.csmediumsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/StopInboundDeliveryIngestionCommandHandlerTests.cshighsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/SucceedIngestionWhenGeneratedOrderCompletedEventHandlerTests.csmediumsrc/WOCK.WholeSale.Tests/Deliveries/InboundDeliveryIngestion/UploadKeysStepHandlerTests.csmediumOn the list at stage 17 — verify the migration Up() matches the configs and is forward-only; the *.Designer / snapshot files are EF-generated.
Stage 15 covers Startup/Program. Confirm the services/factories, the hosted config reloader, the Hangfire terminal-failure filter, and the SignalR/cron registrations are all present.
Stage 3 isolates the InboundDelivery/Key edits — review only those hunks (skip-key-upload gate, pre-computed blob naming), not the whole files.
Not part of the API PR: tools/ingestion-tester is a dev tool (this page lives in it).