Repository navigation
fix(reflect): recursively hash nested struct schemas in schema_hash - #366
Merged
Merged
Conversation
Make TypeDesc::schema_hash registry-aware (&TypeRegistry) to recursively hash nested struct schemas, cycle-safe via visiting set. Update RSCN encoder/decoder call sites with component registry's type_registry. Fixes #168
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
🤖 Generated by Antigravity (Google DeepMind)
Summary
Implement Option A from #168: Make
TypeDesc::schema_hashregistry-aware (&TypeRegistry), recursively hashing nested struct schemas.TypeDesc::schema_hash(&self, registry: &TypeRegistry) -> u64to recursively hash nested struct schemas looked up from the registry.HashSet<TypeId>) to safely terminate on recursive or mutually recursive schemas.TypeDesc::schema_hash_standalone(&self) -> u64for registry-free hashing of leaf types.TypeRegistry::register_desc(&mut self, desc: &'static TypeDesc)for direct schema registration.crates/prism-scene/src/rscn.rsencode/decode call sites to passregistry.type_registry().prism-reflectverifying nested struct schema changes alter the outer schema hash, nested structs inside containers (List,Optional,Array) are covered, and recursive schemas terminate properly.Fixes #168
Self-check (
scripts/pr_ready.py)origin/master· HEAD:8897f24· changed: 3 file(s)prism-reflect,prism-sceneResult: ✅ all checks passed