fix(): use params entity registry for update_persistent_entities#1898
Merged
benflexcompute merged 2 commits intomainfrom Mar 16, 2026
Merged
fix(): use params entity registry for update_persistent_entities#1898benflexcompute merged 2 commits intomainfrom
benflexcompute merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8873b37fe7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
…egacy workflow The legacy workflow in set_up_params_for_uploading had two issues causing entity modifications (e.g. volume zone center/axis) to not reflect in the uploaded simulation.json: 1. entity_info deep copy was discarded after update_persistent_entities, then a fresh copy was used downstream — losing all updates. 2. root_asset.internal_registry was used as the entity source, which does not contain modifications when the user operates on a different asset object than project._root_asset. Fix: obtain one deep copy of entity_info upfront and build a deduplicated entity registry from params.used_entity_registry (which contains the user's actual modified entities from stored_entities in models). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8873b37 to
836b060
Compare
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
set_up_params_for_uploadingwhere volume zone modifications (center/axis) made on a separate VolumeMesh object were not reflected in the uploaded simulation.jsonupdate_persistent_entities, androot_asset.internal_registrymissed modifications from different asset referencesparams.used_entity_registryinstead, which always contains the user's actual modified entities fromstored_entitiesTest plan
test_root_asset_entity_change_reflectionto reproduce the bug (separate VolumeMesh object modifying zone center/axis)test_project.pypasstest_persistent_entity_info_update_volume_meshandtest_persistent_entity_info_update_geometrypass🤖 Generated with Claude Code
Note
Medium Risk
Changes how
set_up_params_for_uploadingderives the entity registry forupdate_persistent_entities, which can alter serialized entity metadata (e.g., volume zone center/axis) in uploadedsimulation.jsonfor legacy (non-DraftContext) workflows.Overview
Fixes the legacy (non-DraftContext) upload path so persistent entity updates are driven by entities actually referenced in
SimulationParamsrather thanroot_asset.internal_registry.Adds
_build_deduplicated_entity_registry_from_params()to build a de-duplicatedEntityRegistryfromparams.used_entity_registry(keyed by(entity_type, private_attribute_id|name)), and uses it when callingentity_info.update_persistent_entities, ensuring user edits made via a separate asset instance (e.g.,VolumeMeshzonecenter/axis) are reflected in the uploaded params.Extends
test_root_asset_entity_change_reflectionand updates VM mock simulation JSON to validate zone IDs and that zonecenter/axismodifications propagate throughset_up_params_for_uploading.Written by Cursor Bugbot for commit 9b3cbf1. This will update automatically on new commits. Configure here.