Skip to content

feat(core): builder fluente, pipeline tipado, resiliência e DI - #7

Merged
thiagoluga merged 2 commits into
masterfrom
pr/core
May 30, 2026
Merged

feat(core): builder fluente, pipeline tipado, resiliência e DI#7
thiagoluga merged 2 commits into
masterfrom
pr/core

Conversation

@thiagoluga

Copy link
Copy Markdown
Owner

PR 2 (re-aberto) — NeoReports.Core

Reabertura do antigo #4. A pilha anterior fez o merge cair em feat/abstractions em vez do master; agora vai direto para master (o Abstractions já foi mergeado no #5). O diff abaixo é só o Core.

O que entra

  • ReportBuilder<TRow> fluente (From/Filter/Columns/Column/To/UploadTo/Retry/OnFailure). Mapeamento via From(source, map) mantém o builder mono-genérico (ADR D12).
  • IReportRegistry + AddReport<TRow> / AddNeoReports (DI).
  • ReportRunner: loop de batches, TypedBatchReader (streaming → batch), projeção T → object?[] na borda do writer, staging em arquivo temporário + upload no fim.
  • Resiliência: Polly v8 no read; IFailureStrategy AbortReport/SkipBatchAndLog com thresholds consecutivas/total/razão (ADR D11).

Testes — CA-1, CA-11, CA-12, CA-13, CA-14

13 testes xUnit verdes (registro, retry, abort, skip→parcial, threshold, multi-output single-pass, streaming, filtro, mapping).

Projetos de teste alvejam net8.0 (sem runtime .NET 9 na máquina local); libs de produção continuam multi-target net8/net9.

- ReportBuilder<TRow> (From/Filter/Columns/Column/To/UploadTo/Retry/OnFailure);
  mapping via From(source, map) keeps the builder single-generic (ADR D12)
- IReportRegistry + AddReport<TRow>/AddNeoReports DI registration
- ReportRunner pipeline: batch loop, TypedBatchReader (streaming->batch),
  projection T -> object?[] at the writer edge, temp-file staging + upload
- Polly v8 retry on batch reads; IFailureStrategy Abort/SkipAndLog with
  consecutive/total/ratio thresholds (ADR D11)
- 13 unit tests (registration, retry, abort, skip, threshold, multi-output,
  streaming, filter, mapping) green on net8
feat(core): builder fluente, pipeline tipado, resiliência e DI
@thiagoluga
thiagoluga merged commit 56ed801 into master May 30, 2026
1 check passed
@thiagoluga
thiagoluga deleted the pr/core branch May 30, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant