Repository navigation
fix: keep stable names in enum mapping exceptions - #41
Merged
Merged
Conversation
Separate exception metadata from rendered enum expressions and preserve it through nullable captures without repeating source evaluation. Fixes #27. Co-authored-by: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #27.
ArgumentOutOfRangeException.ParamName. Configured paths report the full path; root/direct members retain their source names, and collection entries retainitem,Key, orValuemetadata.ActualValue, and single getter evaluation.Test-first evidence
On unchanged develop
8d41533957c7b5b27943327c8b6b3eef171b4232, the expanded 31-case fixture produced 23 failures and eight passing controls, with no skips. An additional nullable tuple-field case independently failed before the fix. The Basic sample independently failed withCS8081: Expression does not have a name.Coverage includes nullable intermediates and enum leaves, known/unknown/declared-unmatched values, flags, constructor binding, updates, patch captures, root and renamed-member names, keyword/collision parameters, sequence/dictionary names, getter exception identity, exact getter counts, C# 9, and deterministic output.
Local validation
Release solution build: zero warnings/errors
Generator: 759 passed, including all 32 new cases
Runtime: five passed; integration: one passed
All three source sample smoke runs pass
Generated netstandard2.0/C# 9 package source inspected: the guarded enum switch reports
Child.Stateand uses its existing captured valueIndependent read-only review and CRLF-aware diff checks pass
Available packaging suite: 216 passed / six failed / zero skipped on the first run. The task's generated consumers filled the 4.9 GB temporary filesystem.
Preserved only task-owned generated consumers in the larger workspace and reran the six affected cases with a workspace-local temporary directory: four passed / two infrastructure failures / zero skipped.
Across the full run plus focused recovery: all 220 available non-publish package cases pass, including all 12 framework/language combinations, clean-package samples, package/API checks, usage validation, and benchmark smoke. This is not a single all-green invocation.
PowerShell and clang are unavailable; 49 PowerShell-dependent cases were not run locally. Trimming and Native AOT still fail at ILLink's
ComputeManagedAssembliestask-host creation withMSB4216/ Unix-domainSocketException (13). Local publish behavior is not established. No assertion, warning, dependency, prerequisite, or security setting was weakened.Known limitation outside this fix
A separate, pre-existing null-preservation defect remains when a configured path has a nullable intermediate, a non-nullable enum leaf, and a nullable enum target. For example, change the sample's
EnumPathTarget.StatetoOutputState?and callEnumPathMapper.Map(new EnumPathSource()).State: the expected result is null, but the current planner reaches the unknown-value exception arm.The original runtime failing reproduction is retained in task evidence. The committed regression verifies only compilation and stable exception naming for this boundary and labels that distinction explicitly. No runtime null-preservation pass is claimed for this variant. The limitation is disclosed in the usage guide and
DECISIONS.md; it is not folded into the one-bug scope.CI and review
Ordinary exact-head CI run 37919719123 passed for
983b8cc2453d6b8664205e829c9bc7afca87f7e2.CI verification completed at the human-review checkpoint. The maintainer subsequently marked the PR ready and merged it.
Opened as a draft for human review. No agent merge, release, tag, package publication, or workflow dispatch was performed.
Prepared with OpenAI Codex.
Remote tree
0d6463137bdac5bedb49c78c6b0028299e49fa62matches the tested local tree exactly.