Repository navigation
core openusdconnect package code maintainability improvements - #43
Merged
Merged
Conversation
Rescan authored Sdf fields when a prim resync absorbs property notices from the same change block. Cover combined clears, value blocks, sample updates and removals. Verify exact layer contents after inactive variant removal.
Route camera values through generic attribute capture and remove the separate camera channel and cache. Use one property-source map and make per-prim processing and Sdf field selection explicit. Reuse attribute handles and skip unchanged transform reads during unrelated property edits. Cover camera defaults, samples, clears and variant edit targets.
Replace string-based projection dispatch with direct ordered calls. Extract stage readers into functions and remove fabricated projection objects used to read previous state. Preserve event-kind coverage checks and projection ordering.
Use one ordered routing path for live replay and previous-stage updates. Validate routes before applying events and restore edit targets and layer muting after success or failure. Clarify stage session-state naming and cover routing failure cases.
Use client layer keys as the authoritative assignment map and derive client_layers snapshots from the collaboration layer stack. Remove redundant layer and department maps and clarify how merge and delete release shared department assignments.
Share preparation, persistence and rollback across single and grouped commits. Reuse prepared records for single transactions and publish producer progress once after persistence succeeds. Remove the redundant commit-lock alias, clarify transform cache semantics, and verify failed groups can retry without duplicates.
Use shared deadline and remaining-time helpers consistently across managed and shared-stage client connection and recovery.
Share replay counters and scene-cache rebuilding across compaction, purge and snapshot replacement. Invalidate the composed prim count when authored collaboration layers are cleared. Add regression coverage for a cached prim count surviving purge.
Separate snapshot validation and temporary replacement preparation from persistence, installation and publication. Consolidate rejection reporting while preserving validation order and the exclusive barrier.
Share prepared-batch routing and restoration between Python and native trackers. Recheck layer reachability after preceding batches attach or detach sublayers so frozen edits target the current layer stack. Cover tracker parity, frozen topology revisions and copied events.
Match dependencies once and carry refreshed dependencies alongside their source events and replay operations. Preserve mapped edit targets, payload load state and rollback across affected layers. Verify a failed refresh restores every layer and can be retried.
Use one layer-content application path for immediate and deferred records, retaining batching and updating tracker state after success. Reuse recovery assessment construction from preserved source layers. Cover failed application, unchanged tracker state and successful retry.
Give each connection attempt one cleanup boundary until its socket is published. Keep cancellation checks, ownership transfer and outbox replay ordering explicit under the existing locks.
Reuse the Hello decoder with an already-resolved FlatBuffers table and preserve optional replay identity without reading the envelope twice. Share admission responses and transaction rejection conversion. Keep the payload-type guard before decoding and cover direct Hello decoding alongside rejection of non-Hello first frames.
Group events whose builders already establish edit-target ownership and construct prim-definition events once after the definition and schema decisions. Retain filtering for composed values and samples.
Reuse mapped edit-target sample reads and matching value conversions when seeding caches. Avoid retaining sample payloads during seeding while preserving structural events on first encounter. Cover masked layer and variant edits, matrix values, asset paths and instancer orientations.
Centralize token precedence in the shared connection helper and remove the shared-stage override. Prefer the current receiver token before existing sender credentials or optional persisted credentials. Cover managed synchronous and background reconnect after token revocation, along with credential fallback behavior.
Use the SQLite connection context to commit or roll back while holding the store lock. Retain the direct insert path and skip empty producer progress updates in batch writes. Verify a failed insert leaves subsequent single and batch writes usable and that records and producer progress survive reopening the store.
Share tokens issued to either connection before persistence or application callbacks run. Limit reconnect preparation to filling missing credentials so stale tokens cannot overwrite replacements. Cover both reconnect orders, synchronous and background reconnects, callback failures, and token issuance during credential loading.
Share authored-default lookup and token propagation, and make dependency selection and composed-state conditions explicit. Decode receive records and playback controls directly from FlatBuffers while retaining public dictionary APIs and zero-copy geometry arrays. Cover typed playback defaults, zero-copy decoding, and shared replay sequence handling.
Enforce transaction-wide restrictions at admission and trust validated fields during commit. Consolidate managed sequence rollback and remove the duplicate reservation rollback in idempotent processing. Catch USD errors specifically in validation and projection recovery so unexpected internal exceptions propagate. Cover early rejection, error classification, and successful USD recovery.
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.
Improve readability and maintainability of the core
openusdconnectpackage by consolidating shared code and making the flow from authored USD changes to network events, replay, and persistence easier to follow.The PR also fixes property edits lost during prim resyncs, sample caches seeded from the wrong authored opinions, prepared edits restored against stale layer topology, stale credentials reused on reconnect, and failed single-record SQLite appends that did not roll back.