feat(core): introduce stable typed resource identities#12
Merged
Conversation
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
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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
DatasetId,CanvasId(UUID-backed, global) and theowner-local
ObjectId— with an allocator whose high-water counter ispersisted but excluded from undo rollback.
bindings, lineage, projections, automation resource lineage, table
transforms, tiling, and the sidebar/inspector.
loading validates the id space and rejects an exhausted allocator with a
recoverable error instead of aborting.
From<u64>removed and the inner field un-pubed, so araw index can no longer be silently promoted to an identity.
page/dataset ordering is deterministic (first appearance), independent of
UUID value.
AGENTS.md: added the stable-identity boundary rule.Testing
object-id exhaustion on load (returns
ProjectError::Invalid), and missingtable-source reporting.
cargo pr-checkpasses (fmt, source size, cargo-deny, clippy-D warnings,tests on both the reference and DataFusion backends).