Skip to content

Fix reflection correctness edge cases#149

Open
jeet-dekivadia wants to merge 5 commits into
G-Research:mainfrom
jeet-dekivadia:codex/fix-reflection-correctness
Open

Fix reflection correctness edge cases#149
jeet-dekivadia wants to merge 5 commits into
G-Research:mainfrom
jeet-dekivadia:codex/fix-reflection-correctness

Conversation

@jeet-dekivadia

@jeet-dekivadia jeet-dekivadia commented May 30, 2026

Copy link
Copy Markdown

Summary

  • classify constructors, setter-only properties, remove-only events, and nested public types without unsafe casts or null dereferences
  • use the numeric regex capture when selecting framework-specific baseline files
  • reuse the resolved FieldInfo when printing non-public literal fields
  • let public reflection paths win when duplicate member names are encountered during documentation comparison
  • add focused regressions for constructors, accessor-only members, nested types, private literals, and framework baseline naming

Validation

  • git diff --check
  • remote Linux runner: dotnet tool run fantomas --check .
  • remote Linux runner: dotnet restore
  • remote Linux runner: dotnet build --no-restore
  • remote Linux runner: dotnet test --no-build --verbosity normal --framework net8.0 (110 tests passed)

Fixes #122

@jeet-dekivadia jeet-dekivadia requested review from a team as code owners May 30, 2026 05:58
@Smaug123

Copy link
Copy Markdown
Contributor

Thanks. Please do in fact run the tests and formatter locally before pushing, to avoid churn on the PR.

As a matter of coding style, I'd recommend asking Codex to write tests for the changes it makes, à la red-green TDD.

@jeet-dekivadia

Copy link
Copy Markdown
Author

Thanks for the nudge. I added focused regressions for each reported edge case and ran Fantomas, restore, build, and the full net8.0 suite on a remote Linux runner; all 110 tests passed. The nested-type regression also exposed a duplicate-visibility normalization issue, which is fixed on the updated branch. The current PR head is f23088d.

@jeet-dekivadia jeet-dekivadia force-pushed the codex/fix-reflection-correctness branch 2 times, most recently from ad99d14 to f198ee5 Compare June 6, 2026 22:23
Signed-off-by: Jeet Dekivadia <jeet.university@gmail.com>
Signed-off-by: Jeet Dekivadia <jeet.university@gmail.com>
Signed-off-by: Jeet Dekivadia <jeet.university@gmail.com>
Signed-off-by: Jeet Dekivadia <jeet.university@gmail.com>
@jeet-dekivadia jeet-dekivadia force-pushed the codex/fix-reflection-correctness branch from f198ee5 to 3f4922b Compare June 8, 2026 19:06
@jeet-dekivadia

Copy link
Copy Markdown
Author

Small follow-up after the branch rebase: I rebased this over current main on June 8 after the upstream workflow updates. The branch is mergeable again, and git diff --check passed against origin/main...HEAD; the intended reflection-correctness diff remains the same in scope.

For review context, the earlier remote Linux validation on this patch was Fantomas check, restore, build, and the net8.0 test suite, with 110 tests passed. Upstream Actions still need maintainer approval before they can run on the fork branch.

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.

Correctness bugs identified by GPT-5

2 participants