Repository navigation
Conversation
|
@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. |
Review of #7599I read the diff only. I did not build it or run the tests. Overall: The change is sound and the reasoning is well documented. Each fix has a matching regression test, and the array-erasure bug (a Observations (none blocking):
No blocking issues. LGTM from my reading, pending CI. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a69f8307e7
ℹ️ 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-class data rows and tuple binding in TUnit test runs. Fix ordinary array matching before merging; it can add constructor rows that fail. Findings
SummaryThis PR expands generic constructor-row matching and preserves runtime row shapes.
Reviews (22) · Last reviewed commit: "Fix #7596 engine expectations for retain..." · Reviewed by Greptile |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough
Merge Risk:
|
|
Review follow-up pushed in ae41e65. Claude observations disposition:
Validation: GenericClassSourceRuntimeTests 25/25 and MethodDataSourceDeclaredRowTypeTests 25/25, each in generated and --reflection execution on net10.0. Core netstandard2.0 builds with zero warnings/errors. A focused signed Native AOT executable publishes with no warnings and runs successfully for nullable boxing, object contravariance and inherited generic supertypes, checking valid and incompatible values. git diff --check passes. No generator output or shipped public API changed. Engine.Tests was not run locally, per repository instructions. The PR remains draft for fresh Claude and Codex review of this head. |
|
@codex review |
Review of #7599I read the diff for Looks good
Suggestions (design, not blockers)
Overall the behaviour is well reasoned and tested. The main concern is maintainability of the custom type matcher. Approving in spirit; the suggestions above are optional. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae41e655d4
ℹ️ 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 |
Review of #7599I read the diff and the earlier review comments. I did not build the PR or run the tests. Looks good
Suggestions (non-blocking)
No blocking issues. The behaviour is well covered by tests, and the remaining items from earlier review rounds look addressed. |
|
Codex Review: Didn't find any major issues. Breezy! 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". |
|
Marked ready after verifying positive Claude and Codex verdicts for 66dd2ba and all review threads resolved. The head is unchanged after promotion. Waiting for the ready-for-review Claude run 41893737866 and CI. Auto-merge has not been armed: repository guidance requires the fresh Claude run to pass and its findings to be read first. The next unit should disposition any new findings, then use scripts/Enable-AutoMerge.ps1 when its gate passes. |
Review of #7599I read the diff and did not run the tests. What looks good
Concerns (design, not blockers)
No correctness bugs found. Item 1 is the main suggestion, and the others can be follow-ups. |
|
The previous blocker is cleared: promotion Claude run 41893737866 passed, and its review found no correctness blockers. Its optional extraction/helper/row-shape refactors remain follow-up suggestions; the cached constructor recovery uses ConditionalWeakTable.GetValue with a static callback, so genuine object parameters reuse the stored TypeInfo after first recovery. The singleton tuple allocation is acknowledged; no allocation or performance improvement is claimed. Pushed 731e334 to fix the failed generator snapshots: #7594 changed STAThreadTests from Repeat(100) to Repeat(10) and moved method lines without updating the four framework snapshots. Reviewed the Ubuntu net10 and Windows net472 received artifacts, preserved snapshot encoding, and applied the same source-derived count/line changes to net8/net9. Targeted STAThreadTests generator snapshot test passes on net10 (1 passed); git diff --check passes. Other runtime versions and Windows net472 are unavailable locally and remain CI validation. No received files committed. Existing analyzer warnings are tracked by #7410. The Windows Engine failure in run 41893737499 matches the missing-TRX reflection pass failure tracked by #7554, also recurring on main. #7603 is investigating it; its newer diagnostic run 41901280925 is still in progress. No unchanged-head rerun, timeout increase, or speculative engine fix was made. No Engine.Tests ran locally. Resolve routes checked: this PR remains the implementation of #7596 and retains Closes #7596; main does not contain its runtime fix and no replacement supersedes it. Parent closure, stale issue criteria, and a human decision do not apply. This unit pushed a concrete snapshot correction rather than deferring. Fresh Claude/Codex review and CI are required for the new head before merge; auto-merge remains unarmed. |
Review of #7599I read the diff and the earlier review comments. I did not build the PR or run its tests. Verdict: The change is sound, and the fixes target real bugs. Examples are The Suggestions (none blocking):
Overall this is good work and I'd be happy to see it merged once CI is green. |
|
The original waiting reason is obsolete: Claude run 41893737866 passed. Current head 731e334 also has a positive Claude review (41903641256) and a completed Codex summary with has_any_findings=false for this exact SHA. All five review threads have dispositions and remain resolved. Auto-merge remains unarmed because Engine tests (windows-latest) failed in 41903646332 with the missing-TRX reflection hang tracked by #7554. Current review dispositions: Claude's matcher extraction, shared vector/type-description helpers and duplicate resolver suggestions are nonblocking follow-ups; keeping this correctness fix focused is reasonable. Ambiguous_Source_Has_No_Usable_Declared_Type explicitly asserts that reading throws AmbiguousMatchException after declared inference returns null. Tuple tests preserve excess columns for the binder; this is not a claim of new end-to-end binder-error coverage. The genuine-object cache and singleton tuple allocation were acknowledged in the previous disposition. CodeRabbit's request to revert STA snapshots is declined: #7594 changed the source and #7603 has since merged the snapshot repair into main; reverting would reintroduce stale expected output. Its docstring percentage is advisory, not a repository requirement. Greptile reports no blockers. Released this PR lock and worked #7554 under its own lock. Read the completed newer diagnostic capture; recorded concrete loader ownership, thread ages and CPU evidence at #7554 (comment). Started analysis run https://github.com/thomhurst/TUnit/actions/runs/41908125296 on main against this PR's new dump (source 41903646332, exact artifact 13358839692). This is a new-capture diagnostic dispatch, not an undiagnosed rerun of the failing check. Next inspect that analysis before choosing an executor fix; no local Engine.Tests ran. All Resolve routes checked: #7596 remains open and delivered by this PR with Closes #7596; no replacement supersedes its runtime change. #7603 merged diagnostics rather than fixing #7554. Finished-parent closure, stale criteria and owner decisions do not apply. No on-hold label or repeated deferral added. Waiting now concerns #7554's new diagnostic run, not the completed Claude run. |
731e334 to
1255268
Compare
|
Review of #7599 I read the new constructor-row matching in Concerns (design, not blocking)
Overall, this is a solid prerequisite split with good regression coverage, and it keeps Native AOT in mind. No blocking issues from me. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4db92b2d05
ℹ️ 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".
| catch (ArgumentException) | ||
| { | ||
| return false; |
There was a problem hiding this comment.
Retain custom IConvertible candidates for enum targets
For an explicit C<MyEnum,string> with constructor C(T first, U second = default!), own-class rows [MyEnum.A] and [customValue] silently lose the second test when customValue implements IConvertible.ToType returning MyEnum. Enum.ToObject rejects a custom value reporting TypeCode.Object, and this catch returns before the deferred custom-IConvertible handling. Unlike the repaired DateTime and structural-target cases, this enum-specific early return still bypasses that handling. CastHelper.TryReflectionConversion successfully binds the value through Convert.ChangeType, so both rows previously survived AllRows, and reflection discovery still retains them. Preserve the custom conversion candidate without invoking its conversion methods during partitioning.
AGENTS.md reference: AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
4db92b2 to
762f5b7
Compare
|
Rebased onto main 1a40c80 and pushed 762f5b7. Resolved the DataSourceHelpers conflict with #7608 by preserving both main's matching first-tuple/optional-parameter handling and retained mutable TupleArgument values, and this PR's singleton wrapped reference-tuple row handling. Range-diff confirms the other 17 commits are unchanged. Validation on SDK 10.0.403/net10.0: GenericClassSourceRuntimeTests 77/77 generated and 77/77 reflection; DataSourceHelpersTests 12/12 in each mode; targeted TUnit.TestProject.Bugs._7212 fixtures 49/49 in each mode. git diff --check passes. Existing analyzer build warnings remain tracked in #7410. No Engine.Tests ran locally. No generator output/public API changes; hosted CI must revalidate AOT on the rebased head. The quoted wait for #7554 run 41908125296 no longer applies: it completed successfully and mitigation #7606 merged. Checked Resolve routes: #7596 is still delivered by this PR with its Closes link, main does not contain this runtime fix, no replacement supersedes it, and no completed parent, stale scope, human choice, upstream dependency, credentials or competing lock prevents progress. The remaining #7554 investigation does not block this PR. All inline threads were resolved; Claude's prior-head verdict had no blockers, and current-head reviews must run again. Design/performance follow-ups remain #7615 and #7588. Auto-merge remains unarmed pending fresh review and CI. This unit fixes the merge conflict rather than deferring. |
Review of #7599 (follow-up)I read the diff and the earlier review comments. I did not build the PR or run its tests. Overall: The change is sound. The array-erasure fix is real: Suggestions (none blocking):
The earlier review's points still apply and none of them block the merge. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 762f5b7b1d
ℹ️ 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".
| // Each instantiation reads its own overload. Generated constructor partitions also retain the integer | ||
| // [Arguments(1)] row for the string instantiation because CastHelper converts it to "1". | ||
| // Reflection partitions those explicit argument rows by their declared types. | ||
| var expected = testMode == TestMode.Reflection ? 4 : 5; |
There was a problem hiding this comment.
Restore matching discovery results across execution modes
For OwnClassOverloadedMethodDataSourcesWithArguments, this changes the regression test to accept five generated tests but only four reflection tests. The extra integer row now runs on the string instantiation only in generated mode, so switching discovery modes changes which tests execute. The repository explicitly requires identical metadata-collection behavior between these modes; reconcile the partitioning behavior and retain a common expected count instead of encoding the divergence in the test.
AGENTS.md reference: AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
| return false; | ||
| } | ||
|
|
||
| var (values, _) = TestDataRowUnwrapper.UnwrapArray(row); |
There was a problem hiding this comment.
Preserve wrapped tuple arguments during compatibility checks
For an explicit C<int,string> with constructor C(Tuple<int> first, U second = default!), an own-class source returning object[] rows [new TestDataRow<Tuple<int>>(Tuple.Create(1))] and [null] silently loses the tuple row. This untyped unwrap spreads its payload into [1], which fails compatibility with Tuple<int>, while the null row activates filtering and disables AllRows. The execution path in DataUnwrapper.UnwrapWithTypes preserves the wrapped tuple using the expected parameter type, so the discarded row binds successfully and previously survived fallback. Apply the same tuple-preservation decision here; reflection discovery also retains this deferred own-class row.
AGENTS.md reference: AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
| if (value is Array { Rank: 1 } array && array.GetLowerBound(0) == 0 | ||
| && MatchesTrailingArrayElements(array, arrayElement, classTypeArguments)) |
There was a problem hiding this comment.
For C<T,U>(T first, U second = default!) instantiated as <Guid[],int>, consider an own-class source containing [new Guid[] { Guid.Empty }, 1] and [new string[] { "00112233-4455-6677-8899-aabbccddeeff" }]. Previously only the first row survived. This check now keeps the second because MatchesTrailingArrayElements allows string-to-Guid parsing.
But the first parameter is not a trailing array. Its CastHelper.Cast<Guid[]> call converts elements with Convert.ChangeType, which cannot convert strings to Guid. A previously passing class therefore gains a failing constructor row. Match ordinary array conversions separately from trailing arrays, which use Cast<T> for each element.
|
The earlier wait is cleared: run 41908125296 completed successfully. #7554 remains open as an intermittent Windows reflection hang investigation, but that successful run is no longer a blocker for this PR. Current head: 762f5b7. Four blocking findings remain:
This PR has at least 21 automated review rounds and still has blocking findings. Its linked issue #7596 already carries . The issue-pr-loop rework-budget rule forbids another fix push and directs an already-split PR that exceeds the budget to needs-human. I checked the alternative routes: this is not already implemented, superseded, a finished parent, or merely waiting on CI; another automatic split would repeat the already-split lifecycle. Owner decision needed: authorize a bounded additional repair/review cycle on this branch, or abandon this implementation and choose a narrower replacement design. I recommend one explicitly authorized cycle addressing all four findings together, restoring a common discovery expectation and preserving binder-compatible enum/tuple rows with generated/reflection regressions and AOT validation. Remove needs-human and state that authorization to resume. Until then, do not merge this head or treat pending CI as the remaining gate. Triage rechecked against origin/main 1a40c80: head unchanged, no later owner authorization, no replacement PR, and all four findings remain unresolved. Retaining needs-human under the already-split rework-budget rule. No code changes or test runs in this triage unit. |
Generic class constructor partitions now retain rows with omitted optional parameters only when every supplied value fits the explicit instantiation. Runtime row handling also preserves wrapped reference-array shape and wrapper depth, reference-tuple payloads, and excess tuple columns for the binder.
The constructor filter recovers array element types and ranks from the existing cached constructor parameter lookup. Generated
TypeInfocurrently erases open arrays toobject; treating that description as assignable admittedstring[]into anint[]constructor. The recovered structural description is private and handles arrays nested inside generic parameters withoutMakeGenericType. No public API or generator output changes are needed. The four array regression cases fail without recovery and pass with it, using both generated-style erased metadata and closed reflection metadata. The wrappedTestDataRow<string[][]>reproduction is excluded for explicit<int,int>arguments.This is the runtime prerequisite split from #7571, not its discovery adapters. Tests exercise the existing emitted metadata contract directly; enabling the new inference and its complete discovery fixtures remains in #7597.
Review dispositions: retain the existing per-instantiation method-source settings because the reader and instance conversion consume them; a wrapper would need to preserve attribute identity and conversion too. Other source mappings remain weakly held. Code now documents declared mapping precedence over method-source declarations and runtime inference, and explicitly groups the optional-row condition. Nested generic covariance and value-type/invariant rejection remain covered. No performance improvement is claimed; retention measurement and enum policy remain in #7588.
Validation:
--reflectionexecution: GenericClassSourceRuntimeTests (21 each), MethodDataSourceDeclaredRowTypeTests (25 each), DataSourceHelpersTests (9 each).git diff --checkpassed. No generator output or shipped public API changed, so snapshot updates are unnecessary. Engine test project was not run locally, per repository instructions.Closes #7596
Latest review fix (66dd2ba): array supertypes are accepted in reverse structural comparisons, including vector collection interfaces with reference covariance and value-type rejection. Regression checks preserve all compatible rows with null-row/AllRows fallback for int/string vectors and matrices, comparing generated-style and closed reflection metadata. GenericClassSourceRuntimeTests: 29/29 generated and 29/29 reflection (net10.0). Core netstandard2.0 build: zero warnings/errors. Focused osx-arm64 Native AOT publish and executable pass with no warnings.
Summary by CodeRabbit
Latest review fix: preserve expanded and omitted trailing constructor arrays and params interfaces, including scalar conversion before collection, and numeric-to-enum values accepted by CastHelper. Regression cases fail on the prior matcher. GenericClassSourceRuntimeTests pass 34/34 generated and 34/34 reflection on net10.0; Core netstandard2.0 builds with zero warnings/errors. Focused osx-arm64 Native AOT publish and execution pass with no warnings. No shipped public API or generator output changes; no Engine.Tests ran locally.
Latest review fix (68e7459): preserve null-to-default constructor values, element-wise trailing-array conversion, CLR vector covariance for generic collection interfaces, and already accepted ITuple payloads containing TestDataRow. Regression cases fail against the prior code. GenericClassSourceRuntimeTests: 41/41 generated and 41/41 reflection; DataSourceHelpersTests: 12/12 each on net10.0. Core netstandard2.0: zero warnings/errors. Focused osx-arm64 Native AOT publish and executable pass with no warnings. No public API/generator output changes; no Engine.Tests run locally.
Latest review fix (2aa08c4): retain enum-to-primitive rows and registered conversions to structurally described constructed parameters, matching existing closed registry targets without constructing generic types or invoking converters. GenericClassSourceRuntimeTests pass 50/50 generated and 50/50 reflection; Core netstandard2.0 builds with zero warnings/errors; focused osx-arm64 Native AOT publish/executable pass without warnings. Three new regression cases fail before the fix. Metadata-shape and matcher consolidation follow-up: #7615.