Skip to content

refactor: FaultyExtractor async-hop + double style consistency#183

Merged
Chris-Wolfgang merged 1 commit into
vNextfrom
fix/source-polish
Jun 25, 2026
Merged

refactor: FaultyExtractor async-hop + double style consistency#183
Chris-Wolfgang merged 1 commit into
vNextfrom
fix/source-polish

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Pure source cleanup from code review — no public-API change (zero PublicAPI.txt edits required).

Changes

  1. FaultyExtractor.ExtractWorkerAsync async-hop placement. Moved await Task.Yield() from after the loop/finally (where it sat below the ThrowAfterCompletion throw and was therefore unreachable on the ThrowAfterCompletion and MaximumItemCount yield break paths) to the top of the method, right after the initial token.ThrowIfCancellationRequested() — mirroring TestExtractor.ExtractWorkerAsync. The comment now accurately states it runs on every exit path. The old misleading trailing comment is removed.
  2. Style consistency (no behaviour change):
    • Worker-method signatures use the CLAUDE.md Allman-paren form (( and ) on their own lines) in TestLoader, FaultyLoader, TestTransformer, FaultyTransformer — matching the extractors.
    • CreateProgressReport() uses target-typed new(CurrentItemCount) across all doubles (was new Report(...) in the four loaders/transformers).
    • TestLoader.GetCollectedItems() snapshot switched from _buffer.ToList() to _buffer.ToArray() so both loaders use the same cheaper fixed-length snapshot; return type unchanged (IReadOnlyList<T>?).
    • Reworded the TestTransformer/FaultyTransformer parameterless-ctor <summary> from "default production timer" (inaccurate — the ctor sets no timer) to "default base-class progress timer".

Verification

  • dotnet build ETL-Test-Kit.slnx -c Release → 0 warnings / 0 errors, all TFMs (net462; netstandard2.0; net481; net8.0; net10.0).
  • Tests -c Release -f net8.0 → all green (355 = 233 Xunit contract + 122 unit).

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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