← back to Dw Material Envelope Canary

__pycache__/check-bulk.cpython-314.pyc

40 lines

+
�WMj`���Rt^RIt^RIt^RIt^RIt^RIt^RIt]PP]PP]44tRt
]
!4]PPRR4t]PPR4;'g]PPR4t]'g]P$!R4R]R	2tR
tRtRtR
tRtRt]R8Xd]P$!]!44R#R#)u�WEEKLY exhaustive pass — the durable net the daily check.py can't be.
Runs a Shopify bulk operation exporting EVERY metafield on EVERY product, then
scans every value with the robust substring detector (catches scalar, list, and
double-escaped envelope variants). No curated key list. CNCP alert on FAIL.
READ-ONLY. Born 2026-07-07 from the /yolo contrarian's 'watch all keys' verdict.Nc�F�\PPR4\PP\R43F�p\PPV4'gK*\
V4F�pRV9gKVP4PR4'dK3VP4PR^4wr#\PPW#P4PR4PR44K�	K�	R#)z&~/Projects/Designer-Wallcoverings/.envz.env�=�#�"�'N)�os�path�
expanduser�join�HERE�exists�open�strip�
startswith�split�environ�
setdefault)�p�ln�k�vs    �
check-bulk.py�load_envr	s����g�g� � �!I�J�B�G�G�L�L�Y]�_e�Lf�
g��
�7�7�>�>�!����1�g���"�9�R�X�X�Z�%:�%:�3�%?�%?��8�8�:�+�+�C��3�D�A��J�J�)�)�!�W�W�Y�_�_�S�-A�-G�-G��-L�M��h��SHOPIFY_STORE_DOMAINz)designer-laboratory-sandbox.myshopify.com�SHOPIFY_ADMIN_TOKEN�SHOPIFY_ADMIN_ACCESS_TOKENzQERROR: SHOPIFY_ADMIN_TOKEN not set (check ~/Projects/Designer-Wallcoverings/.env)zhttps://z/admin/api/2024-01/graphql.jsonz%http://127.0.0.1:3333/api/parking_lotc�,�\P!RV/4P4p\P!\P
P
\P
P\VR\RR/R7^<R7P44#)�queryzX-Shopify-Access-Token�Content-Type�application/json��data�headers��timeout)�json�dumps�encode�loads�urllib�request�urlopen�Request�URL�TOK�read)�q�bs& r�gqlr3s}���
�
�G�Q�<� �'�'�)�A��:�:�f�n�n�,�,�V�^�^�-C�-C��!�6��^�M_�`�.D�.b�km�-�o�os�os�ou�w�wrc�<�\V\4;'dRV9#)�single_line_text_field)�
isinstance�str)rs&r�is_envr8s���a���?�?�":�a�"?�?rz�mutation { bulkOperationRunQuery(query: """{ products { edges { node { id handle metafields { edges { node { namespace key value } } } } } } }""") { bulkOperation { id status } userErrors { message } } }z3{ currentBulkOperation { status url objectCount } }c�R�\P!\PP\R4RR7\\4pVR,R,R,pV'd\RV4^#\\4R,R,pVR,R09dM\P!^4KEVR,R8wgVPR	4'g\R
V4^#\PP\RR4p\PPVR	,V4/p^p^p\V4;_uu_4pVF�p\ P"!V4p	RT	9deR
T	9d^T^,
p\)T	PR44'd3T	R,RT	R
,2p
TPT
^4^,YJ&K�K�RT	9gK�T^,
pK�	RRR4\P*!V4V'dRMRp\\PP\RR4R4;_uu_4p\ P,!R\.P.P14P34RVRVRVRV/V^R7RRR4\VRVRVR\5VP744R\9V4R 2
4V'd�R!R"\5VP744R#\9V4R 2R$R%\ P:!V4R&,R'2R(R)/p\PP=\PP?\@\ P:!V4PC4R*R+/R,7^R-7\R.4V'd^#^# \ P$\&3dEK�i;i +'giEL�;i +'giELY;i \Ddp
\R/T
4Rp
?
LsRp
?
ii;i)1r"T)�exist_ok�bulkOperationRunQuery�
userErrorsz	start err�currentBulkOperation�status�	COMPLETED�urlzbulk not completed:z
bulk.jsonl�	namespace�key�value�.�handleN�FAIL�PASSzlatest-bulk.json�w�ts�products�
metafields�verdict�hits)�indentz: z products, z
 metafields, z enveloped across z keys�titleu4⚠️ Metafield envelope regression (weekly bulk): z values across �notezJdw-material-envelope-canary weekly bulk scan found leaked JSON envelopes: :Ni,Nz,. Re-run the unwrap fix + find the importer.�sourcez dw-material-envelope-canary-bulkrr r!r$z  posted CNCP alertz  CNCP post failed:)r?�FAILED�CANCELED)#r�makedirsrr
rr3�START�print�POLL�time�sleep�getr*r+�urlretriever
r&r)�JSONDecodeError�
ValueErrorr8�remove�dump�datetime�now�	isoformat�sum�values�lenr'r,r-�CNCPr(�	Exception)�r�ue�oprrM�nprod�nmf�fhr�o�	field_keyrL�card�exs              r�mainrrs{���K�K������T�6�*�T�:��E�
�A�	
�6��*�	+�L�	9�B�	�
�k�2��q�
�
��Y�v�
�5�
6��
�h�<�>�>���
�
�2��	�(�|�{�"�"�&�&��-�-�
�#�R�(��
�7�7�<�<��f�l�3�D�
�N�N���r�%�y�$�/�
�D�q�u��#�	
�d���r��B�
��J�J�r�N���a��E�Q�J��q����!�%�%��.�)�)�#$�[�>�"2�!�A�e�H�:� >�I�&*�h�h�y�!�&<�q�&@�D�O�*��Q����
���
��I�I�d�O��f�&�G�	
�b�g�g�l�l�4��);�<�c�	B�	B�b��	�	�4��*�*�.�.�0�:�:�<�j�%�Q]�_b��g�v�t�5�68��	D�
C�
�W�I�R��w�k�#��m�C����
�<N�;O�Oa�be�fj�bk�al�lq�
r�s��	A��S�TW�X\�Xc�Xc�Xe�Tf�Sg�gv�wz�{�xA�wB�BG�H��h�im�is�is�tx�iy�z~�i�iA�Am�n��@�B�D�
�N�N�"�"�6�>�>�#9�#9�$�T�Z�Z�PT�EU�E\�E\�E^�'�);�<�$:�$>�GH�
#�
J��'�(��1��!���1�(�(�*�5�
��
��	
����
C�	B�	B���@��&;�R� @� @��@�s]�O�N:�1A/O�%
O�AO1�,CP�:O	�O�O	�O�O.	�1P	�P&�P!�!P&�__main__)�__doc__rr&�sysrX�urllib.requestr*r`r�dirname�abspath�__file__rrrrZ�DOMAINr/�exitr.rfr3r8rUrWrr�__name__�rr�<module>r~s���T�
5�4�4�	�w�w���r�w�w���x�0�1��N�	�
�	�����.�0[�	\���j�j�n�n�*�+�[�[�r�z�z�~�~�>Z�/[��
��H�H�
`�a����7�8��.��w�@�	V��<��+�X�z���H�H�T�V��r