feat: the folders catch up on what passed while the Kanban computer was off
All checks were successful
Build and deploy / Validate source (push) Successful in 4s
Build and deploy / Integration suite on a real stack (push) Successful in 3m27s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 56s

Dropstar's internal rules (2026-10-26): the folder must reproduce what passed,
not only what sits in the columns when the computer comes back, or a room
running 24 hours leaves a gap a week in the Finalizado archive.

- the Kanban remembers when the folders were chosen and asks for every order
  paid since then, whatever its stage; each file goes to its stage's folder,
  so an order finished while the computer was off lands in 3. Finalizado
- orders paid before the folders were chosen still stay out, so setting them
  up never pulls old orders back into the queue
- the server's file list for the folders and Baixar now loads only the orders
  that have a file, not every order in the stages

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-27 10:15:16 -03:00
parent 35e64d77d7
commit 6a921415ea
4 changed files with 57 additions and 21 deletions

View File

@@ -125,6 +125,15 @@ def run():
assert held['states'] == {oid: 'imp'}
others = client.call('/operator/queue/folder', {'early': True, 'held': []}, operator=True)
assert not [f for f in others['files'] if f['order'] == oid], others['files']
# A folder chosen before this order was paid catches up on it, printing or
# not, as a computer that was off does when it comes back; one chosen
# after it does not.
earlier = client.call('/operator/queue/folder', {'early': True, 'held': [], 'since': '2000-01-01T00:00:00Z'},
operator=True)
assert [(f['state'], f['upload_id']) for f in earlier['files'] if f['order'] == oid] == [('imp', str(row['upload_id']))]
later = client.call('/operator/queue/folder', {'early': True, 'held': [], 'since': '2999-01-01T00:00:00Z'},
operator=True)
assert not [f for f in later['files'] if f['order'] == oid], later['files']
# Once queued for printing, the final set can no longer change.
client.call('/operator/orders/' + oid + '/final-files',
{'version': version, 'files': [{'item_index': 0, 'upload_id': str(row['upload_id'])}],