Repository navigation
Add regression test for registration-order MaxDepth context failure - #4675
Merged
Merged
Conversation
…4657) Reproduces #4657, already fixed by #4651. Unlike that fix's test, this needs no MapAtRuntime and a single Map call: cycle detection turns the collection members into runtime calls, WorkItemModel.Stories compiles the shared List<StoryEntity> -> List<StoryModel> plan with WorkItem's MaxDepth check, and EpicModel.Stories then reuses it under the default context. Registering InitiativeEntity -> InitiativeModel first is what makes the Epic members runtime calls, so the test covers both registration orders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified in the regression coverage for recursive collection mapping across both registration orders.
No open issues 🎉
What changed in this PR
Adds regression coverage for #4657, protecting the fix from #4651 against registration-order-dependent failures when mapping recursive collections.
Changes:
- Reproduces the recursive graph using a single
Map<EpicModel>call without explicitMapAtRuntime()configuration. - Tests both Initiative-first and Epic-first registration orders.
- Verifies collection counts and preservation of the WorkItem back-reference.
| File | Description |
|---|---|
src/UnitTests/Bug/RegistrationOrderMaxDepthContext.cs |
Adds the recursive graph fixture and regression tests for both registration orders. |
Review effort: Balanced
This was referenced Nov 5, 2026
Merged
Open
Closed
This was referenced Nov 16, 2026
FreeAndNil
added a commit
to komsa/AutoMapper
that referenced
this pull request
Nov 16, 2026
…uckyPennySoftware#4657) (LuckyPennySoftware#4675) Reproduces LuckyPennySoftware#4657, already fixed by LuckyPennySoftware#4651. Unlike that fix's test, this needs no MapAtRuntime and a single Map call: cycle detection turns the collection members into runtime calls, WorkItemModel.Stories compiles the shared List<StoryEntity> -> List<StoryModel> plan with WorkItem's MaxDepth check, and EpicModel.Stories then reuses it under the default context. Registering InitiativeEntity -> InitiativeModel first is what makes the Epic members runtime calls, so the test covers both registration orders. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit df65f2e)
This was referenced Nov 16, 2026
Open
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.
Closes #4657
#4657 is already fixed on
mainby #4651, which hasn't been released yet. This PR adds the issue's repro as a regression test. I confirmed it fails on the commit just before #4651 with the reportedContext.Items are only available...exception, and passes onmainin both registration orders.How this differs from #4651's test
That test forces the runtime path with
MapAtRuntime()and needs two separateMapcalls. This one uses neither:Map<EpicModel>call,WorkItemModel.Storiescompiles the sharedList<StoryEntity>→List<StoryModel>plan. That plan carries the MaxDepth 64 check fromWorkItemEntity -> WorkItemModel.EpicModel.Storiesthen reuses that plan under the caller's default context and throws.InitiativeEntity -> InitiativeModelfirst is what makes the Epic members runtime calls, so the test covers both orders.🤖 Generated with Claude Code