feat: "Arte tratada" flags the orders whose final the team prepared, counted in Números
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m20s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 58s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m20s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 58s
Dropstar's internal rules (2026-10-26) asked how to tell art that arrived ready from art the designer had to fix, and Marcus agreed on 2026-10-27 to mark it automatically, for the designer's productivity. - an order whose approved final is not the customer's art (not the file the system generated from it, not one of their originals, not a correction they sent) shows "Arte tratada" on its card and in the order, with who approved it - Números counts the period's treated orders, the share of all orders, and how many each person approved - the Kanban's cancel text: the money stays as the customer's credit, in Dropstar's financial control (rule D-15), no longer a refund - Números' machine table shows the orders waiting in Arte conferida again; it still looked for the old print queue Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Customer identity, correction and final-file trust boundaries against local stack."""
|
||||
import os
|
||||
from uuid import uuid4
|
||||
from urllib.request import urlopen
|
||||
from tests.smoke_test import Client, approved_quote, upload_bytes, item_spec, register
|
||||
@@ -57,6 +58,10 @@ def run():
|
||||
body={'version':version,'files':[{'item_index':0,'upload_id':final_id}],'note':'Manually checked final'}
|
||||
customer.call('/operator/orders/'+oid+'/final-files',body,expected=401)
|
||||
version=customer.call('/operator/orders/'+oid+'/final-files',body,operator=True)['version']
|
||||
# A final the team uploaded is not the customer's art: "Arte tratada" (2026-10-27).
|
||||
treated=lambda:next(o for o in customer.call('/operator/board',operator=True)['orders'] if o['id']==oid)['treated']
|
||||
operator_email=os.environ.get('OPERATOR_EMAIL','operator@example.test')
|
||||
assert treated()=={'items':[0],'by':operator_email}, treated()
|
||||
detail=customer.call('/customer/orders/'+oid)
|
||||
final=detail['files'][0]
|
||||
link=customer.call('/customer/orders/'+oid+'/files/'+final['id']+'/download')
|
||||
@@ -87,9 +92,14 @@ def run():
|
||||
version=customer.call('/operator/orders/'+oid+'/final-files',{'version':version,'files':[{'item_index':0,'upload_id':correction_id}],'note':'Correction is print-ready'},operator=True)['version']
|
||||
files=customer.call('/operator/orders/'+oid+'/files',operator=True)
|
||||
assert any(f['kind']=='final' and f['active'] and f['upload_id']==correction_id for f in files)
|
||||
# The customer's own correction approved as it is: not treated.
|
||||
assert treated() is None, treated()
|
||||
customer.call('/operator/orders/'+oid+'/final-files',{'version':version,'files':[{'item_index':0,'upload_id':correction_id}],'note':'Twice'},operator=True,expected=409)
|
||||
new_final=upload_bytes(customer,b'LOCAL FINAL VERSION TWO',order_id=oid)
|
||||
version=customer.call('/operator/orders/'+oid+'/final-files',{'version':version,'files':[{'item_index':0,'upload_id':new_final}],'note':'Checked corrected final'},operator=True)['version']
|
||||
assert treated()=={'items':[0],'by':operator_email}, treated()
|
||||
stats=customer.call('/operator/stats?days=7',operator=True)['treated']
|
||||
assert stats['orders']>=1 and any(t['orders']>=1 for t in stats['by']), stats
|
||||
for state in ('tra','imp','rev','fin'):version=move(state,version)
|
||||
# In the queue the finals stay as approved.
|
||||
customer.call('/operator/orders/'+oid+'/final-files',{'version':version,'files':[{'item_index':0,'upload_id':new_final}],'note':'Too late'},operator=True,expected=409)
|
||||
|
||||
Reference in New Issue
Block a user