Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueWalkthrough
Merge Risk:
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ReviewThe fix is small and targeted, and the tests cover it well.
Two optional notes, neither blocking:
LGTM. 🤖 Generated with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06ef942217
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
[Medium impact] The changes affect generic test discovery and data validation across TUnit's build-time and runtime paths. The PR needs a matching constructor-precedence check before merging. Findings
SummaryThis PR lets nullable generic class parameters use compatible method data in both discovery modes.
|
|
@codex review Fixed both constraint-validation findings in 6e85ddb. All 129 method data source tests pass on net10.0, including int and int? explicit-instantiation regressions that reproduced TUnit0001 before the fix. The separate mutable-reference warning is tracked in #7598 and explicitly expected by these regressions. Claude's optional array-path comment does not require a change: Nullable requires a value type, and the branch is restricted to that shape. The nullable-row runtime concern is a follow-up observation rather than a blocking finding; this change only preserves the analyzer's existing acceptance of int? rows while adding non-nullable support. No runtime conversion code changes. Keeping the PR draft pending fresh Claude and Codex reviews of this head. |
ReviewThe fix is focused and correct. It adds an early branch in
Two non-blocking suggestions:
No blocking issues. LGTM. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e85ddb73c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Fixed constructor-inferred nullable class type handling in 117ba5f. All 131 method data source tests pass on net10.0; both new regressions reproduced TUnit0001 before the fix. Resolved the finding with a commit-linked reply. Claude's optional test-comment suggestion is addressed: the expected TUnit0046 warning is explained and linked to #7598. Leaving nullable unwrapping local keeps this focused fix small; a shared helper is optional and does not change behavior. Keeping this draft pending fresh reviews of the current head. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 117ba5f927
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Fixed the repeated nullable inference and data-source overload findings in 9624fd6, with commit-linked replies and resolved threads. Both reported regressions failed before the fix. All 134 method data source tests pass; the full net10.0 analyzer suite passes (1,112 passed, one skipped). Existing build/restore warning debt is tracked by #7410, #7412 and #7585. Keeping this draft pending fresh reviews. |
Review of #7591The change looks correct and well scoped. It is analyzer-only, with no runtime or generator impact. The new tests cover the paths I traced: explicit What I checked
Suggestions (non-blocking)
Nothing here blocks the merge. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9624fd62bb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Fixed the independently supplied class type / peer constraint findings in e457634, with commit-linked replies and resolved threads. Four new explicit/constructor and int/int? regressions reproduced TUnit0001 before the fix. All 138 method data source tests pass; full net10.0 analyzer suite: 1,116 passed, one skipped. Existing warnings remain tracked by #7410, #7412 and #7585. Claude's helper and naming suggestions are optional cleanup; the shared independently-supplied guard now keeps binding and inference aligned. The unconstrained annotated-reference case uses the existing bare-parameter path, which this change preserves. Keeping this draft pending fresh reviews of the new head. |
Review of #7591The fix looks correct and well scoped. I found no blocking issues.
Suggestions (non-blocking):
Overall this is a good fix. 🤖 Generated with Claude Code |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Both Claude and Codex completed positive reviews of e457634; all review threads have commit-linked dispositions and are resolved. The latest helper extraction and attribute caching suggestions are optional cleanup, so the focused fix remains unchanged; caching should follow profiling evidence. Promoting this head to ready. Auto-merge must wait for the new ready_for_review Claude run to pass and its comment to be read. |
|
Ready promotion confirmed with unchanged head e457634. Waiting for ready_for_review Claude run 41887370518: https://github.com/thomhurst/TUnit/actions/runs/41887370518 . Next unit should read its review and refreshed review surfaces, then arm auto-merge if the gate passes. CI is now starting; no on-hold label is needed. |
|
Review of #7591: nullable generic class method data source validation I found no blocking issues.
Suggestions (non-blocking):
I read the diff only, so I did not check how this behaves on larger code bases. Overall this is a good, well-tested fix. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e457634095
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Fixed both new findings in 7b441ea, replied with evidence and resolved their threads. Earlier run 41911277540 passed, so that blocker is gone. Nested nullable constructor precedence and type-free constructor analyzer constraints are now covered by regressions that failed before the fix. All 30 #7573 cases pass in each discovery mode. Generator suite: 340 passed/one skipped. Analyzer suite: 1,120 passed/one skipped (142 method-data cases). Reviewed the verified snapshot; only the constructor-supplied double class is emitted. No reflection-path changes; AOT was not republished. Existing warning debt remains tracked in #7410, #7412, #7430 and #7585. Claude’s shared-helper, parity-table, caching, naming and docstring observations remain optional cleanup. This fix preserves the existing non-nullable inference policy and existing source exclusions. The PR body now consolidates scope and validation. Keeping this draft pending fresh reviews of this head. |
Review of #7591 (nullable generic class parameters with method-data rows)I read the diff but did not build or run the tests. I found no blocking bugs. The approach is coherent: both discovery modes use the same rules to infer class types from declared row shapes, and constructor-supplied types take precedence. What I checked
Design concerns (non-blocking)
Process notes
Overall this looks good to merge once CI is green, including the Engine tests that can't be run locally. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Fixed the new partial-constructor finding in 8eda804 and resolved its thread with before/after evidence. Complete constructor type sets retain precedence; partial sets allow method inference and retain constructor values in both discovery modes. All 31 #7573 cases pass generated, reflection and native AOT execution; Native AOT publish succeeded. Generator suite: 340 passed, one skipped. All 16 expected-pass #7209 cases pass in both modes. Existing warning debt is unchanged and remains tracked by the issues listed in the PR body. Earlier waiting run 41911277540 succeeded. No open prerequisite, superseding PR, stale linked issue or owner-reserved decision prevents this PR; it still delivers #7573. Keeping the new head in draft pending fresh reviews. Optional earlier helper extraction, caching and naming observations remain follow-up cleanup. |
|
Review of #7591. I read the analyzer, generator and reflection-collector changes; I did not build or run anything. The change is coherent and handles the dual-mode requirement well: the generator and reflection collector get matching changes (partial-row handling, ContainsTypeParameter, method-source inference, DeclaredOnly and non-generic-method restrictions), and the regression coverage across both modes is broad. Concerns: (1) Possible cross-mode divergence when one class type parameter matches several row positions. Reflection's MatchClassRowType is last-wins (match = candidate, and ?? match for generic arguments). The generator goes through ProcessTypeForGenerics and genericParamMap; I only saw its call sites, so I don't know its tie-break. If it is first-wins or widening, a method like Test(T a, T? b) fed (int, long) would infer different class types per mode. Please add a conflicting-occurrence test in both modes, ideally by moving the tie-break rule into the existing GenericClassInferencePolicy so parity is structural. (2) In TestMetadataGenerator, the predicate 'class-level data source that is not a type-free [Arguments] row' is written out twice (scopesClassMethodSources and the nullable-constructor-precedence check), and includePartialRows: true must stay in step in both. A small helper such as ClassSuppliesAllTypeArguments would keep them from drifting. (3) The includePartialRows flag changes the meaning of ClassRowSuppliesNoTypeArguments to 'supplies no or not all type arguments', in both the generator and reflection copies. A separately named method such as ClassRowLeavesTypeArgumentsUninferred would read more clearly than a boolean that flips semantics. (4) Minor: reflection inference uses LINQ (parameters.Where(...).ToArray()) per source during discovery; please confirm it is not on a hot path or cache it per method. The #if NET / #else GetMethod lookup could be one loop with a single code path to test. None of this is blocking; (1) is the one I would want answered before merge because it is a cross-mode correctness risk. I am relying on CI for the Engine tests. |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Fixed Greptile's partial-constructor fallback finding in 32d2a95, with a before/after reproduction and paired generator/reflection coverage. The thread has a commit-linked disposition. Claude's repeated-occurrence concern is answered by the new LastOccurrenceInfersClassType fixture: Run(T first, T? second) receives (int, long), infers long, and passes in both modes. ProcessTypeForGenerics assigns the dictionary entry on each match; MatchClassRowType and its caller likewise retain the last match. The reviewed snapshot pins the long instantiation. No inference-policy change is needed. Helper extraction and renaming are optional cleanup. Caching should follow profiling; this patch makes no performance claim and retains the existing discovery path. All 33 #7573 cases pass generated and reflection execution; full net10.0 generator suite: 340 passed, one skipped. Engine tests remain for CI. Existing warnings remain tracked by the issues in the PR body. Earlier run 41911277540 succeeded. No prerequisite, superseding PR, stale linked issue, finished parent or reserved decision prevents #7591; it still closes #7573. Keeping the new head draft for fresh reviews. This is pushed work awaiting review, not a deferral. Native AOT publishing succeeded and all 33 cases also pass in the native executable. Existing fixture/dependency trim warnings remain. |
Review of #7591I read the file list, the description and the diff structure. I did not trace every hunk or run the tests, so this is a partial review. What looks good
Concerns
None of this is a blocker. Item 1 is the one I'd address before merge, or track in a follow-up issue. 🤖 Generated with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 32d2a955e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Review of #7591 (nullable generic class parameters with method-data rows) I read the analyzer, generator and reflection-collector changes. I didn't build or run anything. The PR description reports 33 execution cases passing in both modes, plus snapshot, analyzer and AOT runs. I couldn't see the tail of the reflection-collector diff, so my comments on that file are limited. What looks good
Concerns
Minor
Overall the behaviour looks correct and well tested. My main request is to centralise the precedence and inference policy (points 1 and 2) so the three copies can't drift apart over time. |
|
@codex review Fixed nullable constructed-struct inference parity in 0492f2b and Greptile's constraint-invalid partial constructor fallback in 36c8723. Both threads have commit-linked dispositions and are resolved. All 35 #7573 cases pass in generated and reflection execution; full net10.0 generator suite: 340 passed, one skipped. Reviewed both added snapshot entries. Native AOT publish succeeded; all 35 cases also pass in the native executable. Earlier waiting run 41911277540 succeeded. No linked prerequisite, superseding PR, stale issue, finished parent or owner-reserved decision blocks this PR; it still closes #7573. Keeping draft for fresh reviews of this head. Claude's non-blocking policy consolidation and repeated-occurrence concerns overlap the existing follow-up #7377 (and broader #7371). Helper extraction, naming, caching and diagnostic suggestions remain follow-up improvements; this patch makes no performance claim. Existing NullableClassMethodRows where T : struct covers int and int? rows and asserts typeof(T) == typeof(int) in both modes. The repeated-occurrence fixture pins the existing last-wins behavior; changing that policy or introducing diagnostics is beyond this fix. STA snapshots remain a documented validation repair after #7594. Existing warning debt remains tracked in the issues named in the PR body. Engine tests remain for CI. |
Review of #7591I read the diff, the PR description and the earlier review comments. I did not run the tests or build the branch. Prior feedback
Assessment
Suggestions, non-blocking
I found nothing that should block the merge. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36c8723ae1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (paramType is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T } nullableParameter | ||
| && actualType.IsValueType | ||
| && actualType is not INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T }) | ||
| { | ||
| ProcessTypeForGenerics(nullableParameter.TypeArguments[0], actualType, genericParams, genericParamMap); |
There was a problem hiding this comment.
Constructor types get overridden
The wider nullable recursion can override constructor-supplied class types because ContainsNullableClassParameter still recognizes only bare T?.
For example, [Arguments("seed")] class C<T>(T seed) can have a source returning IEnumerable<Func<KeyValuePair<int, int>[]>> with a null row for Run(KeyValuePair<T, int>?[] values). Previously, the constructor supplied T = string, and the null row ran on C<string>. This change also infers C<int>. The constructor-precedence check misses this shape, so the extra entry receives "seed" for an int constructor parameter and fails.
Extend the precedence check to cover the constructed nullable shapes now visited here.
Knowledge Base Used:
|
Run 41911277540 completed successfully; that earlier wait no longer blocks this PR. The current head has completed Claude review with no blockers, but Codex found a valid constructor-precedence discrepancy: #7591 (comment). ContainsNullableClassParameter misses class parameters inside nullable constructed structs even though ProcessTypeForGenerics now infers through them. This PR has 21 automated review rounds and a new blocking finding, exceeding the loop's 20-round rework budget. Closing it without merging and preserving branch
Checked resolution alternatives: #7573 remains unimplemented on main; no replacement open PR delivers its full scope. It had no native children before this split and is not a finished parent. Its original analyzer-only report remains accurate, with the discovery acceptance criteria now explicit in #7611. No human decision, credentials, external release or pending run needs to park this work. The required review-budget split supplies actionable replacements instead of deferring it again. #7377 retains policy consolidation and #7598 retains the independent warning fix. |
Nullable generic class test parameters now accept compatible method data and remain discoverable. Analyzer validation honors explicit, constructor-inferred and inherited constructor types, while method rows still validate constraints when constructor arguments supply only values.
Both discovery modes infer class types from compatible method rows, partition sources by inferred types, and retain uninferred sources on explicitly supplied classes. Constructor-supplied types take precedence, including nullable parameters nested in arrays or generic types. Partial constructor type sets retain the existing row-value fallback when it closes the class; otherwise method rows infer the closed class and supply their constructor values in both modes. Repeated class type parameters use the last matching occurrence in both modes. Inference excludes unresolved generic rows, generic source methods, argument-taking sources and external generic providers.
Regression coverage includes null, factory, tuple and array rows, multiple sources, overloads, explicit types, type-free constructors and nested nullable constructor precedence. STAThread snapshots are refreshed after #7594 reduced repeats; the net472 update was reviewed from the Windows CI artifact.
Validation:
Closes #7573
Summary by CodeRabbit
Review follow-up: preserved partial-constructor row-value fallback in both collectors and added repeated-occurrence parity coverage. All 33 #7573 execution cases pass in source-generated and reflection modes. Full net10.0 generator suite: 340 passed, one skipped; the snapshot adds only the two intended regression entries. Engine tests remain for CI.
Native AOT publishing succeeded and all 33 cases also pass in the native executable. Existing fixture/dependency trim warnings remain.
Review follow-up: nullable constructed struct arrays now infer identically in both modes; partial constructor row-value fallback is used only when it satisfies class constraints. All 35 #7573 cases pass in generated and reflection execution. Full net10.0 generator suite: 340 passed, one skipped; both new snapshot entries reviewed. Native AOT publish succeeded and all 35 cases pass in the native executable.