Skip to content

fix: reuse captured sources for patch nested updaters - #43

Merged
AGiorgetti merged 1 commit into
developfrom
fix/codex-issue-29-patch-updater-capture
Oct 9, 2026
Merged

AGiorgetti merged 1 commit into
developfrom
fix/codex-issue-29-patch-updater-capture

Conversation

@AGiorgetti

@AGiorgetti AGiorgetti commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #29.

  • Patch-mode nested updaters consume the direct source value captured by the null guard exactly once.
  • Direct nullable value-type captures retain their original type so an unmarked overload cannot replace the selected updater.
  • Configured paths, Throw captures, null skips, target identity, and sequential update failure behavior remain unchanged.
  • Adds regression coverage, a normally compiled Basic example, clean-package/framework/language/trim/AOT consumer coverage, and synchronized usage and implementation records. No public API or specification semantics change.

Test-first evidence

  • 34 initial generator cases on unchanged develop af3fd9ed403da20043705ce8e387578fbe7ad78c: 17 failures and 17 controls, zero skips.
  • Present getters ran twice; changing getters supplied the wrong child or caused NullReferenceException on a second-read null. The Basic sample independently reproduced the crash.
  • A nullable-struct overload control passed unchanged production but failed the naive one-line capture candidate (99 instead of 7). The type-preserving cast repairs this introduced selection drift.
  • Final 38-case fixture covers declared/handwritten void and returning updaters, get-only/writable targets, nullable/instance inputs, changing/null getters, configured paths, Throw, deterministic output, and earlier assignments retained on later failure.

Local validation

  • Final Release solution build: zero warnings/errors.
  • Full generator: 837 passed; runtime: 5 passed; integration: 1 passed. Zero failures/skips in these projects.
  • Combined focused new/nested/update/path tests: 77 passed; final renamed/CRLF fixture rerun: 38 passed. Zero failures/skips.
  • Available packaging: 224 passed, 2 infrastructure failures, zero skips. All 12 framework/language combinations, clean-package/source samples, usage, package/API checks, and benchmark smoke passed.
  • C# 9 fixtures compile without warnings. Actual netstandard2.0/C# 9 generated source confirms guard and invocation consume the same capture.
  • Independent read-only review found no scoped blocker. Consumer-skill validation and CRLF-aware diff checks pass.
  • All uploaded blobs and remote tree match the tested local source tree 07ce483d3982a717b707793cc74b6ba543eb4b69.

Local environment limits

Trimming and Native AOT fail at ILLink's ComputeManagedAssemblies task-host creation with MSB4216 / Unix-domain SocketException (13), before publish behavior is established. PowerShell and clang are absent; 49 PowerShell-dependent tests were not run locally. No warnings, assertions, dependencies, prerequisites, or security settings were weakened.

CI and review

Exact-head CI run 37928050807 succeeded for e0ea46ce634273786d5fad0e2fc57961e6d17d6b.

  • Windows and Linux each passed 1,118 tests: 837 generator, 275 packaging, 5 runtime, and 1 integration; zero failures and zero skipped tests on each OS.
  • All six Roslyn jobs (4.8.0, 4.14.0, and 5.9.0 on both OSes) passed 837 tests each, with zero failures/skips.
  • Both full jobs cover the locally unavailable PowerShell, trimming, and Native AOT checks. Linux sample/benchmark smoke and solution-path validation also passed.
  • Release packing, artifact verification, and NuGet publication jobs were correctly skipped for this ordinary PR event.

This PR remains draft for human review and has no merge conflict. No merge, release, tag, package publication, or workflow dispatch was performed.

The previously documented nullable-intermediate/non-nullable-enum-leaf runtime defect remains outside this issue's scope.

Prepared with OpenAI Codex.

Use the guarded direct member value once and preserve nullable value-type overload binding. Add regression, sample, package-consumer, and documentation coverage.

Fixes #29.

Co-authored-by: Codex <codex@openai.com>
@AGiorgetti
AGiorgetti marked this pull request as ready for review October 9, 2026 12:45
@AGiorgetti
AGiorgetti merged commit 63885e1 into develop Oct 9, 2026
11 checks passed
@AGiorgetti
AGiorgetti deleted the fix/codex-issue-29-patch-updater-capture branch October 9, 2026 12:45
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.

[P2] Use the captured direct source value for patch-mode nested updater calls

1 participant