Skip to content

[Initiative] Stable Catalog Resource Identity and Rename-Aware UID Lifecycle #135

@juliuskrah

Description

@juliuskrah

Summary

Introduce stable resource identity for catalog objects so logical moves (renames) preserve identity while delete/recreate produces a new identity. The Sync Controller must manage identity independently of filename churn in Git.

In Scope

  • Add a persistent identity mapping in ScyllaDB keyed by (kind, namespace, name) with value uid (UUID v4)
  • Implement rename-aware reconciliation in the Sync Controller using Git rename detection (git diff -M semantics)
  • Preserve uid when a file is moved/renamed but still represents the same logical object
  • Remove mapping entries when resources are deleted
  • Generate a new uid when a previously deleted (kind, namespace, name) is re-added
  • Add observability for identity decisions (create, rename-preserve, delete, recreate)

Out of Scope

  • Repository-level storage identity/path strategy (already tracked elsewhere)
  • Authorization policy changes
  • UI changes

Acceptance Criteria

  • A durable mapping table exists for resource identity resolution in ScyllaDB
  • Reconcile logic preserves uid for rename-only diffs
  • Reconcile logic allocates new uid for delete/re-add lifecycle
  • Delete events remove identity mappings deterministically
  • Integration tests cover: edit, rename, delete/re-add, and concurrent controller runs
  • API responses and internal events surface stable uid consistently

Implementation Notes

Resource identity must be independent from path identity. Git paths are mutable and user-facing; uid is immutable and system-facing. Without this separation, downstream references and audit trails become unstable whenever files are renamed. Rename-aware reconciliation keeps continuity for humans while preserving strict object lifecycle guarantees needed for API consumers and controllers.

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions