Skip to content

feat(core): introduce stable typed resource identities#12

Merged
nmrtist merged 1 commit into
mainfrom
feat/stable-identity-foundation
Jul 24, 2026
Merged

feat(core): introduce stable typed resource identities#12
nmrtist merged 1 commit into
mainfrom
feat/stable-identity-foundation

Conversation

@nmrtist

@nmrtist nmrtist commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

Replace positional collection indices with typed IDs as the stable identity
for datasets, canvases, and objects. Collection indices are now one-shot
lookup positions only and never cross action, job, frame, or persistence
boundaries.

What changed

  • Typed ID newtypes — DatasetId, CanvasId (UUID-backed, global) and the
    owner-local ObjectId — with an allocator whose high-water counter is
    persisted but excluded from undo rollback.
  • Dataset, canvas, and object consumers migrated to typed references:
    bindings, lineage, projections, automation resource lineage, table
    transforms, tiling, and the sidebar/inspector.
  • Project persistence stores and restores typed references and object IDs;
    loading validates the id space and rejects an exhausted allocator with a
    recoverable error instead of aborting.
  • Newtypes hardened: From<u64> removed and the inner field un-pubed, so a
    raw index can no longer be silently promoted to an identity.
  • References resolve by ID with explicit errors instead of index sentinels;
    page/dataset ordering is deterministic (first appearance), independent of
    UUID value.
  • AGENTS.md: added the stable-identity boundary rule.

Testing

  • Regression tests: ordering determinism, stale-index tolerance (no panic),
    object-id exhaustion on load (returns ProjectError::Invalid), and missing
    table-source reporting.
  • cargo pr-check passes (fmt, source size, cargo-deny, clippy -D warnings,
    tests on both the reference and DataFusion backends).

Replace positional collection indices with typed IDs (DatasetId,
CanvasId, and owner-local ObjectId) as the stable identity for
datasets, canvases, and objects. Indices become one-shot lookup
positions only and no longer cross action, job, frame, or persistence
boundaries.

- add the typed-ID allocator infrastructure and automation resource
  types
- migrate dataset/canvas/object consumers and project persistence to
  typed references
- resolve references by ID with explicit errors instead of index
  sentinels, and keep page/dataset ordering deterministic
- harden the newtypes: drop From<u64> and un-pub the inner field so an
  index can no longer be mistaken for an identity
- add regression tests for ordering determinism, stale-index tolerance,
  object-id exhaustion on load, and missing table sources
@nmrtist
nmrtist merged commit 0c74128 into main Jul 24, 2026
11 checks passed
@nmrtist
nmrtist deleted the feat/stable-identity-foundation branch July 24, 2026 10:53
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant