Pre-existing bug, now more visible after #242. tf_align.tfd (R/register.R:163, 175) constructs its return as tfd(ret, arg = arg, ...) and omits domain = domain, so the returned aligned curve has domain range(arg) rather than the input's wider domain.
The warp itself preserves the input domain — only the aligned tfd is narrowed.
Reproduce
library(tf)
x <- tf_rgp(3, arg = seq(0.1, 0.9, length.out = 9), domain = c(0, 1))
tf_domain(x) # 0 1
tf_domain(tf_align(x, method = "srvf")) # 0.1 0.9 — silently narrowed
Fix
Add domain = tf_domain(input) to the tfd() call that constructs the return. Add a regression test verifying domain round-trip.
Reported during the June-2026 ground-up review's PR for #242.
Pre-existing bug, now more visible after #242.
tf_align.tfd(R/register.R:163, 175) constructs its return astfd(ret, arg = arg, ...)and omitsdomain = domain, so the returned aligned curve has domainrange(arg)rather than the input's wider domain.The warp itself preserves the input domain — only the aligned
tfdis narrowed.Reproduce
Fix
Add
domain = tf_domain(input)to thetfd()call that constructs the return. Add a regression test verifying domain round-trip.Reported during the June-2026 ground-up review's PR for #242.