Skip to content

fix(DataMapper): Preserve descendant overrides across choice selection changes#3308

Open
mmelko wants to merge 1 commit into
KaotoIO:mainfrom
mmelko:fix/3232-preserve-descendant-overrides
Open

fix(DataMapper): Preserve descendant overrides across choice selection changes#3308
mmelko wants to merge 1 commit into
KaotoIO:mainfrom
mmelko:fix/3232-preserve-descendant-overrides

Conversation

@mmelko

@mmelko mmelko commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary
Choice selection no longer cascade-invalidates descendant overrides (substitutions, type overrides, nested choices)
Fixes "Reset Override" silently failing when substitution was selected before choice

Root cause: invalidateDescendants() removed substitution from definition but resetDescendantFields() didn't clear selectedMemberIndex on the live field — state inconsistency

Fix #3234
Fix #3232

Screen.Recording.2026-06-12.at.16.11.26.mov

Summary by CodeRabbit

  • Tests

    • Expanded test coverage for choice selections with descendant and abstract field scenarios, including field substitutions and type override preservation.
  • Refactor

    • Internal restructuring of choice selection logic for improved code maintainability and clarity.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 21e5ac74-af40-4628-b913-38a45f7cff6c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mmelko

mmelko commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mmelko mmelko force-pushed the fix/3232-preserve-descendant-overrides branch from 8a9fa17 to 37a626b Compare June 12, 2026 14:17
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.60%. Comparing base (4b3dd21) to head (11976d3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3308      +/-   ##
==========================================
- Coverage   92.60%   92.60%   -0.01%     
==========================================
  Files         650      650              
  Lines       25424    25410      -14     
  Branches     5847     6059     +212     
==========================================
- Hits        23544    23531      -13     
+ Misses       1878     1770     -108     
- Partials        2      109     +107     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mmelko mmelko changed the title ffix(DataMapper): Preserve descendant overrides across choice selection changes fix(DataMapper): Preserve descendant overrides across choice selection changes Jun 12, 2026
…n changes

Fix KaotoIO#3234
Fix KaotoIO#3232

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mmelko mmelko force-pushed the fix/3232-preserve-descendant-overrides branch from 37a626b to 11976d3 Compare June 12, 2026 14:58
@sonarqubecloud

Copy link
Copy Markdown

@mmelko mmelko requested a review from igarashitm June 12, 2026 22:45
@mmelko mmelko marked this pull request as ready for review June 12, 2026 22: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.

DataMapper: Choice/Abstract: Cannot reset DataMapper: Choice/FieldOverride: Exclude choice from triggering "invalidate descendants"

1 participant