fix: address AI code-review findings (#78)#170
Merged
Conversation
…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>
This was referenced Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
TestExtractor.ExtractWorkerAsync— moved the artificialawait Task.Yield()from after the try/finally to the top of the method, so it runs on every exit path (including theMaximumItemCountyield break), and corrected the misleading comment. Note: removing it outright (the reviewer's first suggestion) would trip CS1998 underTreatWarningsAsErrorsbecause the wrapped source is synchronous and this is the iterator's onlyawait.ManualProgressTimer<example>— replaced the race-proneToListAsync().AsTask()+Fire()pattern with the enumerator-step pattern the kit's own contract tests use (get enumerator → oneMoveNextAsync()→Fire()→ drain). The old example could race a fast synchronous source to completion (with the timer'sElapsedalready unsubscribed in the worker'sfinally) beforeFire().<remarks>—MaximumItemCount"rejects values less than 0" → "less than 1" in all three base classes (it rejects 0).SkipItemCountwording left unchanged (it correctly rejects only negatives).Verification
dotnet build -c Releaseboth src projects, all TFMs — 0 warnings / 0 errors (confirms the relocatedTask.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