Skip to content

Use UUIDs as canonical references in generated titles #367

Description

@dappham-CODRA

Summary

This issue consolidates and supersedes the implementation direction discussed in #149, #323, #357, and #358.

The previous implementation attempts are useful as diagnostic history, but they are not the design baseline for this work. The title-reference system should be redesigned from first principles around persistent UUIDs, with a smaller and more robust separation between identity, persistence, and display.

DataLab currently embeds mutable, session-local short IDs such as s001, i001, gs001, and gi001 in generated titles. Those IDs change when objects are reordered, removed, duplicated, or appended from an HDF5 workspace. Using them as both references and display labels is the root cause of several title consistency and HDF5 remapping problems.

Consolidated issues

New direction

Canonical references

  • Use full persistent UUIDs as the only canonical references to objects and groups in generated/computed titles and processing metadata.
  • Keep sequential short IDs (s001, i001, gs001, gi001) as UI ordering labels only. They must no longer carry persistent identity.
  • Store or transport the full UUID even when the UI renders a shortened form.
  • Do not resolve references by the displayed prefix: links and actions must retain the full UUID, so two equal eight-character prefixes cannot create ambiguous navigation.

Display

  • Render UUID references as a traceable eight-character hexadecimal prefix by default, following the UUID-derived identifier principle used in DataLab Web.
  • Preserve the configurable display mode requested in Signal/Image title after an operation: add an option to replace object short names by their title #149: a generated title may render references either as eight-character UUIDs or as current source titles.
  • In source-title mode, renaming a live source must update every relevant rendering surface, including the object tree and plot legends.
  • If a referenced source no longer exists, fall back to its eight-character UUID prefix as plain text. The canonical full UUID remains in the stored title, so no separate deleted-source token registry is required.
  • Source-reference links must remain legible in selected and unselected states on all supported platforms.

HDF5 compatibility

Backward compatibility must remain simple and tolerant:

  • New workspaces persist UUIDs for both objects and groups, together with UUID-based title and processing references.
  • Legacy HDF5 workspaces without object or group UUIDs must still load successfully. Generate missing UUIDs on the fly during import.
  • While importing a legacy workspace, convert resolvable legacy short-ID references using a file-local short-ID-to-UUID map.
  • If a legacy title contains an unresolvable token, keep it as literal text rather than rejecting the workspace.
  • When appending to a non-empty workspace, preserve imported UUIDs when they do not conflict.
  • When appending the same workspace more than once, generate new UUIDs for the conflicting imported copy and remap all references within that imported batch, including generated titles, group references, processing source_uuid values, and equivalent processing metadata.
  • The second imported workflow must remain independent from the first: Recompute and Show source must resolve to the sources in the same imported batch.
  • No explicit HDF5 migration step is required. Compatibility means that the new reader accepts existing files; old DataLab versions are not required to understand the new UUID-based title representation.

Action plan

  • Add persistent UUID support for every signal, image, and group.
  • Replace canonical short-ID references in generated titles with full UUID references.
  • Align processing metadata and source resolution on full UUIDs.
  • Render UUID references as eight-character prefixes while retaining the full UUID for navigation.
  • Implement the configurable UUID/source-title display mode and live rename refresh.
  • Update HDF5 serialization and tolerant legacy deserialization.
  • Remap colliding UUIDs and all related references during append and repeated append.
  • Fix source-link rendering for selected items on every supported platform.
  • Align GUI, XML-RPC, and Web API object lookup behavior.
  • Add focused regression tests for all linked issues and compatibility scenarios.
  • Update settings documentation, release notes, and translations.

Acceptance criteria

  • New signals, images, and groups always have persistent UUIDs.
  • Generated titles for 1-to-1, 2-to-1, n-to-1, and cross-panel operations use full UUID references internally.
  • Reordering, deleting, or renumbering objects does not require rewriting canonical title references.
  • The default UI rendering uses eight-character UUID prefixes while navigation resolves the full UUID.
  • Source-title display mode updates the object tree and plot legends after a rename, including image profile signals (Signal title extracted from image profiles does not update when signal title is renamed #323).
  • Duplicate source titles do not affect identity or navigation.
  • Deleted or unavailable sources fall back to a stable eight-character UUID display without breaking title rendering.
  • Source links remain readable when selected on Linux and other supported platforms (Referecence to previous objects in titles are not visible when signal selected (under linux, at least) #358).
  • A legacy HDF5 workspace with no UUID fields loads and receives UUIDs automatically.
  • Appending a legacy workspace to a non-empty session maps every resolvable title reference to the imported objects and groups (Object references in titles are not remapped when appending an HDF5 workspace #357).
  • Appending the same workspace twice remaps UUID collisions and keeps both processing lineages independent.
  • Object lookup through the GUI, XML-RPC API, and Web API accepts canonical UUIDs consistently; title lookup remains optional and reports ambiguity instead of selecting an arbitrary object.
  • Regression tests cover legacy import, append, double append, reorder, deletion, rename, duplicate titles, selected-link contrast, and signal/image/group references.

Non-goals

  • Do not preserve previous implementation mechanisms merely because they already exist in an earlier attempt. In particular, computed_title, deleted_source_refs, and dedicated deleted-reference tokens are not requirements for the new design.
  • Do not introduce a separate lineage database or redesign the Sigima computation API.
  • Do not make eight-character prefixes authoritative identifiers; they are display-only projections of full UUIDs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions