Skip to content

fix: address AI code-review findings (#78)#170

Merged
Chris-Wolfgang merged 1 commit into
vNextfrom
feature/review-fixes-78
Jun 24, 2026
Merged

fix: address AI code-review findings (#78)#170
Chris-Wolfgang merged 1 commit into
vNextfrom
feature/review-fixes-78

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Summary

Resolves the findings from the #78 AI code-review pass directly (both low-severity). The review found no correctness, security, performance, or CLAUDE.md-compliance issues; these were the only two items above the noise bar, plus one doc-wording nit.

Changes

  1. TestExtractor.ExtractWorkerAsync — moved the artificial await Task.Yield() from after the try/finally to the top of the method, so it runs on every exit path (including the MaximumItemCount yield break), and corrected the misleading comment. Note: removing it outright (the reviewer's first suggestion) would trip CS1998 under TreatWarningsAsErrors because the wrapped source is synchronous and this is the iterator's only await.
  2. ManualProgressTimer <example> — replaced the race-prone ToListAsync().AsTask() + Fire() pattern with the enumerator-step pattern the kit's own contract tests use (get enumerator → one MoveNextAsync()Fire() → drain). The old example could race a fast synchronous source to completion (with the timer's Elapsed already unsubscribed in the worker's finally) before Fire().
  3. Contract base <remarks>MaximumItemCount "rejects values less than 0" → "less than 1" in all three base classes (it rejects 0). SkipItemCount wording left unchanged (it correctly rejects only negatives).

Verification

  • dotnet build -c Release both src projects, all TFMs — 0 warnings / 0 errors (confirms the relocated Task.Yield() doesn't trip CS1998).
  • dotnet test -c Release -f net8.0 — 58 pass (doubles) / 199 pass (contract consumer).

Closes #78

🤖 Generated with Claude Code

…t, doc wording (#78)

- TestExtractor.ExtractWorkerAsync: move the artificial 'await Task.Yield()'
  to the top so it runs on every exit path (incl. the MaximumItemCount
  yield-break) and correct its comment. (Removing it outright would trip
  CS1998 since the wrapped source is synchronous.)
- ManualProgressTimer <example>: replace the race-prone ToListAsync().AsTask()
  + Fire() pattern with the enumerator-step pattern the kit's own contract
  tests use, so copied guidance isn't flaky.
- Contract base <remarks>: MaximumItemCount 'rejects values less than 0' ->
  'less than 1' (it rejects 0); SkipItemCount wording left as-is (correct).

Closes #78

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Chris-Wolfgang Chris-Wolfgang changed the base branch from main to vNext June 23, 2026 23:32
@Chris-Wolfgang Chris-Wolfgang merged commit 0f9496b into vNext Jun 24, 2026
8 checks passed
@Chris-Wolfgang Chris-Wolfgang deleted the feature/review-fixes-78 branch June 24, 2026 00:19
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.

[Maintenance] cleanup: Run an AI full code-review pass

1 participant