Skip to content

Copy source metadata when creating a single-camera soft clone - #1846

Open
PaulHax wants to merge 1 commit into
desktop-warning-preservationfrom
clone-metadata-copy
Open

Copy source metadata when creating a single-camera soft clone#1846
PaulHax wants to merge 1 commit into
desktop-warning-preservationfrom
clone-metadata-copy

Conversation

@PaulHax

@PaulHax PaulHax commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Copy source metadata when DIVE creates a single-camera soft clone

Failure case

A single-camera soft clone used the source metadata object directly. The source and clone then
shared one mutable object. Clone markers and later nested changes could modify the source metadata.

The multicamera clone path already makes an independent copy.

Steps to reproduce

  1. Create a source folder object that has nested metadata.
  2. Call the public createSoftClone server entry point.
  3. Change a nested value in the source metadata object and inspect the clone metadata object.
  4. Change a nested value in the clone metadata object and inspect the source metadata object.
  5. Expect each object to keep its own value. Before this fix, each object receives the change from
    the other object.

This object-isolation defect has no supported user-interface reproduction. The automated
createSoftClone test is the authoritative reproduction.

Changes

  • Make a deep copy of source metadata before DIVE adds clone markers and default values.
  • Test the public createSoftClone path.
  • Verify that nested changes cannot pass from the source to the clone.
  • Verify that nested changes cannot pass from the clone to the source.

Scope

This PR changes crud_dataset.py and test_multicam_export_clone.py. It does not test a live
Girder clone, the Mongo save boundary, or a viewer reload.

Hierarchy prerequisite

The hierarchy is stored in dataset metadata, so a soft clone must copy that metadata without
changing or sharing the source object.

Stack

This is PR 3 of 9. Previous: preserve Desktop import warnings.
Next: add hierarchical track classification.

  1. Allow devDependency imports in TypeScript spec files
  2. Preserve warnings from every Desktop import file
  3. Current — Copy source metadata when creating a single-camera soft clone
  4. Add hierarchical track classification
  5. Centralize hierarchical classification changes
  6. Replace mutable merged tracks with read-only projections
  7. Make track lifecycle operations classification-safe
  8. Add lossless DIVE KWCOCO classification support
  9. Define raw and resolved classification boundaries

This PR is stacked on desktop-warning-preservation.

Commit: 4ad85091 Copy source metadata when creating a single-camera soft clone.

@BryonLewis BryonLewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can understand why this is needed. I think before the metadata editing we assumed that the metadata was attached to the video and that only annotations would be changed from clones. That is no longer true given the other things that are being stored in the metadata now.

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.

2 participants