Skip to content

fix: preserve exact source stamps in native TF graph - #4681

Closed
TomCC7 wants to merge 3 commits into
cc/feat/cdr-trajectory-followersfrom
cc/feat/cdr-native-tf-stamps
Closed

TomCC7 wants to merge 3 commits into
cc/feat/cdr-trajectory-followersfrom
cc/feat/cdr-native-tf-stamps

Conversation

@TomCC7

@TomCC7 TomCC7 commented Oct 20, 2026

Copy link
Copy Markdown
Member

Generated TF timestamps cannot pass through f64 seconds without losing epoch nanoseconds. The native SDK now retains optional exact stamp metadata through buffering, latest/reverse/composed lookups and local publication. Samples colliding as floats are ordered by their retained source nanoseconds. Existing Transform::new, public ts, lookup signatures and seconds-based math remain available; changing ts invalidates retained metadata.

This is the prerequisite for the native navigation CDR adapters. It does not change default encoding factories or the float-based lookup query/tolerance API.

Parent: #4680. Project: https://linear.app/dimensional/project/message-encoding-refactor-05a3ddb4af3e/overview

Category Files Change
SDK + adjacent tests 1 Exact metadata and five behavior tests; existing 37 TF tests retained
CI 1 Focused TF tests and all-target Clippy

From this checkout, run:

cargo test --locked --manifest-path native/rust/dimos-module/Cargo.toml \
  --features cdr --lib --jobs 2 tf::tests

Using the installed main wheel's existing SDK Cargo export, the new API is:

use dimos_module::{Transform, nalgebra::Isometry3};
let stamp = 1_700_000_000_123_456_789;
let edge = Transform::from_nanoseconds("world", "base", stamp, Isometry3::identity());
assert_eq!(edge.stamp_nanoseconds(), Some(stamp));
assert_eq!(Transform::new("world", "base", 1.25, Isometry3::identity()).ts, 1.25);

Validation: 42 TF tests pass, all-target Clippy with warnings denied passes, other applicable hooks pass, normal main wheel builds and the full runtime environment passes pip check (198 packages). Installed exported tf.rs SHA256 matches the checkout; an actual separate Cargo project outside this checkout compiled and ran against that installed SDK, reporting exact source nanoseconds 1700000000123456789. No repository-relative source dependency was used by that consumer.

Nix lint was attempted and failed because nix is absent; it is not counted as passing and the repository gate remains intact. No hardware, benchmark or GitHub CI result is claimed. Native navigation codec adoption and its integration checks are the next layer.

@TomCC7 TomCC7 closed this Oct 20, 2026
@TomCC7
TomCC7 deleted the cc/feat/cdr-native-tf-stamps branch October 20, 2026 18:11
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.

1 participant