Ray's Knowledge Base
Unlock

duql bucket alignment with at T, and the trace-plan width check

DecisionVerified 2 Oct 2026Holds anywhere
Decision. The context, the choice, why, and the options that were turned down.

Context#

Implementing hopping buckets (X2 hopping).

Decision#

at T aligns tumbling buckets: key ((t-T)//W)*W+T (unchanged text when T=0); the trace plan passes the origin to View::time_bucket(width, origin) when it is a whole non-negative microsecond count. fill steps by E (or W) from T.

Why#

Alignment must be a whole number of microseconds for the trace plan.

Rejected options#

Fractional or negative origins; cutting a too-small width silently.

Fixed pitfall#

stage(PipelineGroup) moved bucket_ out before trace_refusal, so the whole-microsecond width check never ran and bucket 1500ns ran on the trace plan with a cut width. The check now runs before the move.

Also found by searching

  • 'at T' aligns tumbling buckets key ((t-T)//W)*W+T
  • the trace plan passes the origin to View::time_bucket(width, origin)
  • fill steps by E (or W) from T
  • stage(PipelineGroup) moved bucket_ out before trace_refusal so the width check never ran