Skip to content

double_buffered: realign_tracks not propagated to producer — breaks variant-windows + tracks #321

Description

@d-laub

Summary

In double_buffered mode, realign_tracks is not propagated to the producer subprocess, so with_seqs("variant-windows") + any active track is completely broken.

Details

with_seqs("variant-windows") with active tracks requires realign_tracks=False in the parent dataset. But _build_producer_schema omits realign_tracks from the schema dict (_double_buffered_loader.py:85-92), and _producer._apply_schema never sets it. The producer's fresh Dataset.open() therefore defaults realign_tracks=True, and replaying the schema raises:

ValueError: with_seqs('variant-windows') with tracks requires with_settings(realign_tracks=False)

at _reconstruct.py:539.

Scope

This is distinct from #315: it dies at schema replay, never reaching write_chunk, so it is a different error, not the shm slot-overflow. Found en route while investigating #315 (see docs/superpowers/specs/2026-07-21-double-buffered-vw-slot-fit-design.md, "Collateral bug found en route").

double_buffered + variant-windows + any active track raises before producing a single batch.

Fix

  • Add schema["realign_tracks"] = ds.realign_tracks in _build_producer_schema (the schema dict at _double_buffered_loader.py:85-92).
  • Thread it through _producer._apply_schema's settings_kwargs (mirror how unphased_union is handled at _producer.py:41-42).
  • Regression test: double_buffered + variant-windows + an active track iterates at least one batch without error.

Relates to #315.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions