jetstream v2 in zig stream.waow.tech

serve: planBackfill — the backfill query planner master

POST procedure per the lexicon: {dids, collections, afterSeq, beforeSeq} → per-segment work units. selection uses the archive's own indexes: seq-window pruning on block-index envelopes, collection bitmask intersection (wildcards match archived collections by prefix; a non-matching filter still selects DID-marker sentinel blocks — folding consumers must see account-level deletions), and per-block gloom DID blooms (a 'no' skips the block for certain). matched-block density >= 0.75 → mode=segment, else coalesced inclusive block ranges. work-unit page limit with plannedThroughSeq truncation; sealedTipSeq capped by beforeSeq. gloom gains crc-checked unmarshal (round-trip tested) to read the blooms our sealer wrote. e2e: unfiltered plan covers the archive in whole-segment mode; wildcard filters match; a known DID always matches (no bloom false negatives); an unknown DID prunes to zero blocks; afterSeq at the tip yields an empty plan. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>