Skip to content

Fix diagnostic constructor selection parity (#88) - #94

Merged
AGiorgetti merged 1 commit into
developfrom
fix/codex-diagnostic-constructor-parity
Oct 6, 2026
Merged

AGiorgetti merged 1 commit into
developfrom
fix/codex-diagnostic-constructor-parity

Conversation

@AGiorgetti

Copy link
Copy Markdown
Contributor

Summary

Fixes #88.

  • Give diagnostic instrumentation a dedicated ordinary-type activator that follows native DI constructor preference and parameter-type-set ambiguity rules.
  • Ignore ActivatorUtilitiesConstructor on ordinary type registrations, accept equivalent/permuted parameter sets, and reject shorter non-subset constructor ambiguity before activation.
  • Preserve contextual key attributes, optional defaults, null factory results, generic-constraint checks, constructor exception types, lifetimes and disposal ownership.
  • Leave explicit non-empty DependsOn maps and decorator constructor selection on their existing paths.
  • Add 144 regression cases and correct an older keyed test that explicitly expected diagnostic mode to choose a different constructor.
  • Update README consumer guidance and the top changelog fixes section.

Test-first verification

  • Reviewed develop baseline: 335d3266ba5756af8230fd9a1ff64ce98375ba0c; 776 baseline tests passed on .NET 10.
  • Initial regression pass reproduced 69 failures on each matching .NET 8/9/10 runtime before the implementation change.
  • Extended focused baseline controls: 71 failed / 71 passed on each .NET 8/9/10 runtime. An independent review then added a constrained-generic candidate case: 2 failed / 2 passed before its targeted fix.
  • Final Release solution build passed, including the netstandard2.0 library and net472 test assembly. Only the two pre-existing net472 package-support warnings remain.
  • Final full suites passed: 920/920 on each of net8.0, net9.0 and net10.0, using DI 10.0.0 and matching installed runtimes (8.0.31, 9.0.20, 10.0.12).
  • Native hot-cache regression passed on each modern target: 100 interleaved enumerations after observed native compilation.
  • Independent review finding was reproduced and fixed; no remaining blocker in this targeted change.
  • Windows CI, including executing net472 and its hot-cache regression, is pending at creation and will be checked on this exact head.

Scope

Cycle handling is tracked separately in #89. This change does not introduce recursive graph validation, optimize activation, change workflows, or publish a release. The PR remains a draft for review.

Prepared with OpenAI Codex.

Keep ordinary type activation separate from DependsOn and decorator constructor rules. Add native-parity coverage for constructor ambiguity, attributes, contextual keys, optional defaults, constrained generics, lifetimes and ownership.

Co-authored-by: Codex <codex@openai.com>

Copy link
Copy Markdown
Contributor Author

Test-first checkpoint for dae92c8bfd46525ba2ed0659930a2dddbdaaf916:

  • The regression suite reproduced the diagnostic constructor-selection failures before implementation on .NET 8, 9 and 10.
  • The dedicated diagnostic activation path now passes all 920 tests on each matching modern runtime. Full Release build succeeds; the two existing net472 dependency-support warnings remain.
  • Native hot-cache controls pass on all three modern targets. Independent review also caught and verified the fix for constrained generic bindings in unselected constructor candidates.
  • The GitHub tree SHA matches the tested local tree. Windows CI will provide the net472 execution check; I am monitoring this exact PR head before calling it ready.

The PR remains a draft. Cycle handling (#89), optimization work and release publishing are outside this change.

Prepared with OpenAI Codex.

Copy link
Copy Markdown
Contributor Author

Exact-head verification complete for dae92c8bfd46525ba2ed0659930a2dddbdaaf916.

Windows CI run 37440533272 succeeded. The job logs confirm 920/920 tests passed on each of net472, net8.0, net9.0 and net10.0, followed by four successful native hot-cache regressions (100 interleaved enumerations each after observed native compilation). Pack and Publish were skipped.

After fetching the published head locally, the Release build, all three modern 920-test suites, and their hot-cache controls also passed again. The only build warnings are the two existing net472 dependency-support warnings.

GitHub reports no merge conflicts. There are no submitted reviews or unresolved review threads at this checkpoint. This PR remains a draft for review; issue #88 has not been closed, and no subsequent issue work has started.

Prepared with OpenAI Codex.

@AGiorgetti
AGiorgetti marked this pull request as ready for review October 6, 2026 09:58
@AGiorgetti
AGiorgetti merged commit e135918 into develop Oct 6, 2026
2 checks passed
@AGiorgetti
AGiorgetti deleted the fix/codex-diagnostic-constructor-parity branch October 6, 2026 10:03
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.

Diagnostic instrumentation changes native constructor selection and ambiguity handling

1 participant