Skip to content

chore(review): trivial fixes from AI code-review pass#223

Merged
Chris-Wolfgang merged 2 commits into
vNextfrom
tier1/ai-code-review-pass
Jun 28, 2026
Merged

chore(review): trivial fixes from AI code-review pass#223
Chris-Wolfgang merged 2 commits into
vNextfrom
tier1/ai-code-review-pass

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Summary

Batch-1 trivial / unambiguous fixes from the v0.3.3 Tier-1 AI code-review pass (#128). Larger findings filed as separate Tier-2 sub-issues; this PR holds only the safe, mechanical fixes.

Stacked on #217 (audit) → #216 (README) → vNext.

What's in this PR

Source XML doc / wording

  • Result.cs — class summaries for both Result and Result<T> reworded so they don't claim the types are only produced by Try.Run (they're also used directly as repository / validation return types — see README Real-World Examples)
  • Result.csFailure() exception message now matches the protected ctor wording ("errorMessage cannot be null, empty, or whitespace.")
  • Result.cs<exception> blocks reference <paramref name="errorMessage"/> for clickability
  • Result.cs<returns> added to Success() / Failure() factories; Result<T>.Success(value) documents its <param> + <returns>
  • Result.csResult<T>.Value summary now mentions throw-on-failure inline (was only in <exception>); <exception> text is a complete sentence
  • Try.csRunAsync<T> summary says "asynchronously" (parity with the Action variant); Run<T> summary differentiates from Run by mentioning the return value

Tests — naming convention drift

  • ResultTests.cs — 2 tests whose names said throw_InvalidOperationException actually assert ArgumentException; renamed to match observed behavior
  • RunFuncTests.cs — 8 PascalCase test names migrated to the CLAUDE.md canonical Method_when_condition_expected_result snake_case pattern; the misleading FunctionNullableInt_WithExceptionThrowingFunction_ReturnsDefault (actually tests Value-access throws) renamed accordingly

csproj hygiene

  • src csproj — added <PackageTags> per Directory.Build.props's per-repo expectation; normalized mixed-tabs/spaces indent
  • tests csproj — dropped dead netcoreapp3.1 <ItemGroup Condition> (TFM not in <TargetFrameworks> so never matched); dropped stale <Version>0.3.0</Version> (project is IsPackable=false, version was unused)

Examples

  • FSharp.DotNet8.Example/Program.fs — module name was FSharp.DotNet462.Example (copy-paste bug); renamed

Docs

  • docs/DOCFX-VERSION-PICKER.md — stripped a "no DateTime-Extensions paths leak" cross-repo reference left over from the canonical fanout

Out-of-scope follow-ups (filed as sub-issues)

Issue Title
#218 xunit.runner.visualstudio 3.0.0 + xunit 2.9.3 mismatch on net8+ (CLAUDE.md violation)
#219 PublicApi/modern/PublicAPI.Shipped.txt missing Result<T>.Value.get -> T?
#220 Bump benchmarks csproj from net8.0 → net10.0
#221 README database example uses sync ADO inside Try.Run
#222 Test csproj/dir name mismatch (Wolfgang.TryPattern.Tests.Unit vs Wolfgang.TryPattern.Tests)

These were too risky / opinion-dependent / scope-breaking to bundle here. They'll be worked separately so any regression is easy to bisect.

Test plan

  • dotnet build -c Release green (0 errors, only NuGet TFM-support warnings on test net5/6/7 — unrelated)
  • dotnet test -c Release -f net10.0 — 88/88 passing
  • Renamed tests still run (xunit discovers them via [Fact] / [Theory] attributes, not naming)

Closes #128

Part of the v0.3.3 Tier-1 maintenance pilot (vNext: #121).

Batch of low-risk fixes surfaced by the v0.3.3 AI code-review pass
(#128). Larger findings are filed as separate Tier-2 sub-issues.

Source — XML doc + small wording
- Result.cs: class summaries reworded so they no longer claim the
  types are only produced by Try.Run (they're also used directly as
  repository / validation return types).
- Result.cs: Failure() exception message now matches the protected
  ctor wording ("cannot be null, empty, or whitespace.") and the
  exception cref blocks point at <paramref name="errorMessage"/>.
- Result.cs: <returns> added to Success() / Failure() factories;
  Result<T>.Success(value) now documents its <param> + <returns>;
  the private Result<T>.Value getter's <summary> mentions throw-on-
  failure inline (was only in <exception>), and the <exception>
  text is a complete sentence.
- Try.cs: RunAsync<T> summary now says "asynchronously" (parity with
  the Action variant); Run<T> summary differentiates from Run by
  mentioning the return value.

Tests — naming convention drift
- ResultTests.cs: two tests whose names said "throw_Invalid-
  OperationException" actually assert ArgumentException; renamed
  to match observed behavior.
- RunFuncTests.cs: 8 PascalCase test names migrated to the
  CLAUDE.md canonical snake_case
  Method_when_condition_expected_result pattern; the one named
  FunctionNullableInt_WithExceptionThrowingFunction_ReturnsDefault
  actually verifies Value-access throws on failed result and is
  renamed accordingly.

csproj hygiene
- src csproj: added <PackageTags> per Directory.Build.props's
  per-repo expectation; normalized mixed-tabs/spaces indent.
- tests csproj: dropped dead netcoreapp3.1 <ItemGroup Condition>
  block (netcoreapp3.1 is not in <TargetFrameworks>, so the group
  never matched); dropped stale <Version>0.3.0</Version> (test
  project is IsPackable=false, the version field was unused).

Examples
- FSharp.DotNet8.Example/Program.fs: module name said
  FSharp.DotNet462.Example — copy-paste bug from the F#/.NET 4.6.2
  sibling; renamed to FSharp.DotNet8.Example.

Docs
- docs/DOCFX-VERSION-PICKER.md: stripped a "no DateTime-Extensions
  paths leak" cross-repo reference that was carried over from the
  canonical fanout; replaced with generic wording.

Out-of-scope follow-ups filed as Tier-2 sub-issues of #128:
- xunit.runner.visualstudio 3.0.0 + xunit 2.9.3 mismatch on
  net8/9/10 (CLAUDE.md violation, behaviour change)
- PublicApi/modern/PublicAPI.Shipped.txt missing
  Result<T>.Value.get -> T? entry (needs RS0016 sweep)
- benchmarks csproj net8.0 → net10.0 (perf picture changes)
- README database example uses sync IO inside Try.Run (opinion)
- tests csproj/dir naming mismatch
  (Wolfgang.TryPattern.Tests.Unit vs Wolfgang.TryPattern.Tests)

Closes #128
Base automatically changed from tier1/audit-other-markdown to vNext June 28, 2026 15:53
@Chris-Wolfgang Chris-Wolfgang merged commit fe93f19 into vNext Jun 28, 2026
@Chris-Wolfgang Chris-Wolfgang deleted the tier1/ai-code-review-pass branch June 28, 2026 15:55
Chris-Wolfgang added a commit that referenced this pull request Jun 28, 2026
Tier-1 maintenance round — docs accuracy, code-review polish, and a
single behaviour fix on the docs-site version picker. No public API
or runtime behaviour change in Wolfgang.TryPattern itself, so a PATCH
bump per SemVer.

Contents this release:

- Fix: docfx.json _appFooter version-picker bootstrap restored
  (caught during docs accuracy audit; fanned out to the 12 other
  affected Wolfgang.* repos in parallel) — PR #224

- Docs: README structure standardized to canonical fleet layout
  (License + Documentation hoisted; Code Quality section added) —
  PR #216, closes #135 #138

- Docs: accuracy audit fixes for CONTRIBUTING.md analyzer count,
  WORKFLOW_SECURITY.md actions/checkout version, RELEASE-WORKFLOW-
  SETUP.md jobs enumeration — PR #217, closes #139

- Chore: AI code-review pass — Result/Try XML doc improvements,
  test naming convention compliance, csproj hygiene, F# example
  module-name copy-paste fix; 5 larger findings filed as separate
  sub-issues — PR #223, closes #128

- Maintenance: verified and closed #127 (branch cleanup), #146
  (PublicApiAnalyzer baseline), #152 (benchmarks TWAE) — all three
  already implemented at framework level by the canonical sync;
  this round was verification only.
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