#1487·GenieX

Complete progress bitmap can publish a missing or zero-filled model

Author: aniruddhaadak80Created Sep 24, 2026Updated Sep 24, 2026

Describe the bug

The Rust model manager treats an all-0x01 progress bitmap as authoritative without checking that the destination payload still exists and matches the planned size. A payload can be deleted, truncated, or replaced while a completed marker remains. filter_pending then omits the file from a pull, and the executor can preallocate a zero-filled destination before accepting the same stale bitmap, allowing a corrupt model to be published as successful.

To Reproduce

  1. Create a two-chunk progress bitmap containing [0x01, 0x01] without creating the destination payload.
  2. Call filter_pending for the corresponding FileSpec; current main returns zero pending files.
  3. Run Executor with the same complete bitmap and missing payload; current main creates a correctly sized zero-filled file, issues no range GETs, and returns Ok.

The new unit regression reports left 0 / right 1. The new executor regression compares a 16 MiB zero-filled file with the expected body and fails.

Expected behavior

A completed bitmap is reusable only when the destination exists with the exact expected size. Missing, truncated, or oversized payloads must invalidate the stale bitmap and be fetched again before geniex.json is published.

Screenshots

Not applicable; both paths are deterministic model-free filesystem tests.

Desktop (please complete the following information):

  • OS: Windows 11 ARM64
  • Browser: N/A
  • Version: upstream main 90df1dc2; Rust 1.98.0 GNU

Smartphone (please complete the following information):

  • Device: N/A
  • OS: N/A
  • Browser: N/A
  • Version: N/A

Additional context

Merged PR #1364 fixed only the legacy no-marker case. It intentionally did not cover a completed marker whose payload is absent or size-mismatched, which is the distinct state reproduced here.