Skip to content

fix: correct timeslot search and allocation in RequestTranslator#85

Open
youf3 wants to merge 2 commits into
quant-net:developfrom
youf3:fix_timeslot_management_error
Open

fix: correct timeslot search and allocation in RequestTranslator#85
youf3 wants to merge 2 commits into
quant-net:developfrom
youf3:fix_timeslot_management_error

Conversation

@youf3

@youf3 youf3 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix find_common_timeslots computing a slot_mask from the raw sequence length, which could
    be millions of slots for idle-wait agents (e.g. a node waiting for the full experiment). This
    caused bitarray.find() to return -1 because the search pattern was longer than the search
    space; the fix caps the mask to MAX_TIMESLOTS.
  • Add an explicit exception when find() returns -1 so the failure surfaces with a clear
    message instead of silently producing a wrong slot assignment.
  • Fix slot-allocation loop: extract assigned = timeslot_mask[:timeslot] before advancing the
    mask pointer, and skip empty assignments. The previous order could produce off-by-one
    allocations.
  • Increase submit() timeout from 5 s → 30 s to give agents enough time to respond under load.
  • Raise MAX_TIMESLOTS from 500 → 1000 to accommodate longer experiments.
  • Set max_packet_size 268435455 in the regression-test Mosquitto config to allow large DQC
    request payloads.

@youf3
youf3 requested a review from disprosium8 July 1, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant