refactor: remove the WhatsApp integration
All checks were successful
Build and deploy / Validate source (push) Successful in 15s
Build and deploy / Integration suite on a real stack (push) Successful in 4m24s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m11s
All checks were successful
Build and deploy / Validate source (push) Successful in 15s
Build and deploy / Integration suite on a real stack (push) Successful in 4m24s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m11s
The system will not send WhatsApp messages: the client's n8n already does, from Tiny's status changes. Paid orders and stage changes now queue only the Tiny delivery; the fake WhatsApp adapter, its setting and secret, the Integrações row and the send log's Destino column are gone, and the old WhatsApp log rows are removed. The customer's WhatsApp number, the "Avisar no WhatsApp" link for corrections and the contact links stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ substitute for `production_preflight.py`, CI, staging acceptance, or change appr
|
||||
## Application and external contracts
|
||||
|
||||
- [ ] `docs/PRODUCTION_INPUTS.md` has owners, decisions, and evidence for every item.
|
||||
- [ ] Production R2, freight, Mercado Pago, Tiny/Olist, and WhatsApp adapters have
|
||||
- [ ] Production R2, freight, Mercado Pago, and Tiny/Olist adapters have
|
||||
sandbox contract tests and least-privilege credentials.
|
||||
- [ ] Payment webhook authenticity, replay handling, and idempotency are tested.
|
||||
- [ ] Docker secret `*_FILE` loading is implemented and tested without logging values.
|
||||
|
||||
@@ -44,7 +44,6 @@ TINY_PRODUCT_UV_AVULSA=TBD
|
||||
TINY_FORMA_ENVIO_RETIRADA=TBD
|
||||
# true only at go-live, after the n8n DTFIMP designer branch is removed.
|
||||
TINY_STATUS_UPDATES=false
|
||||
WHATSAPP_ADAPTER=TBD
|
||||
# E-mail (password recovery and team alerts). off until the SMTP account exists.
|
||||
MAIL_ADAPTER=off
|
||||
MAIL_FROM=DTF Dropstar <nao-responda@SITE_DOMAIN>
|
||||
@@ -79,4 +78,3 @@ OPERATOR_PASSWORD_SECRET=TBD
|
||||
PAYMENT_TOKEN_SECRET=TBD
|
||||
PAYMENT_WEBHOOK_SECRET=TBD
|
||||
TINY_TOKEN_SECRET=TBD
|
||||
WHATSAPP_TOKEN_SECRET=TBD
|
||||
|
||||
@@ -20,12 +20,12 @@ REQUIRED = (
|
||||
'POSTGRES_DB', 'POSTGRES_USER', 'APP_DB_USER', 'POSTGRES_VOLUME', 'OPERATOR_EMAIL',
|
||||
'STORAGE_QUOTA_BYTES', 'OWNER_UPLOAD_QUOTA_BYTES', 'MAX_UPLOAD_BYTES',
|
||||
'UPLOAD_PART_BYTES', 'MAX_PENDING_UPLOADS', 'SCAN_MAX_BYTES',
|
||||
'PAYMENT_ADAPTER', 'FREIGHT_ADAPTER', 'TINY_ADAPTER', 'WHATSAPP_ADAPTER',
|
||||
'PAYMENT_ADAPTER', 'FREIGHT_ADAPTER', 'TINY_ADAPTER',
|
||||
'DATABASE_URL_SECRET', 'DATABASE_ADMIN_URL_SECRET',
|
||||
'DB_ADMIN_PASSWORD_SECRET', 'APP_DB_PASSWORD_SECRET',
|
||||
'R2_ACCESS_KEY_ID_SECRET', 'R2_SECRET_ACCESS_KEY_SECRET',
|
||||
'OPERATOR_PASSWORD_SECRET', 'PAYMENT_TOKEN_SECRET',
|
||||
'PAYMENT_WEBHOOK_SECRET', 'TINY_TOKEN_SECRET', 'WHATSAPP_TOKEN_SECRET',
|
||||
'PAYMENT_WEBHOOK_SECRET', 'TINY_TOKEN_SECRET',
|
||||
)
|
||||
IMMUTABLE_IMAGE = re.compile(r'^[a-z0-9][a-z0-9._:/-]*@sha256:([0-9a-f]{64})$')
|
||||
IMAGE_REPOSITORY = re.compile(
|
||||
@@ -42,7 +42,7 @@ SOURCE_BLOCKERS = {
|
||||
'payment = FakePayment()',
|
||||
),
|
||||
'app/worker.py': (
|
||||
"adapters = {'tiny': FakeTiny(), 'whatsapp': FakeWhatsApp()}",
|
||||
"adapters = {'tiny': FakeTiny()}",
|
||||
),
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ def config_errors(values):
|
||||
bucket = values.get('R2_BUCKET', '')
|
||||
if bucket and not re.fullmatch(r'[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]', bucket):
|
||||
errors.append('R2_BUCKET must be a valid S3 bucket name')
|
||||
for name in ('PAYMENT_ADAPTER', 'FREIGHT_ADAPTER', 'TINY_ADAPTER', 'WHATSAPP_ADAPTER'):
|
||||
for name in ('PAYMENT_ADAPTER', 'FREIGHT_ADAPTER', 'TINY_ADAPTER'):
|
||||
if values.get(name, '').lower() in {'', 'fake', 'mock', 'local'}:
|
||||
errors.append(f'{name} must select an approved non-fake implementation')
|
||||
for name in REQUIRED:
|
||||
|
||||
@@ -59,14 +59,13 @@ def valid_config():
|
||||
'PAYMENT_ADAPTER': 'mercado-pago',
|
||||
'FREIGHT_ADAPTER': 'approved-freight',
|
||||
'TINY_ADAPTER': 'tiny-olist',
|
||||
'WHATSAPP_ADAPTER': 'approved-whatsapp',
|
||||
}
|
||||
for name in (
|
||||
'DATABASE_URL_SECRET', 'DATABASE_ADMIN_URL_SECRET',
|
||||
'DB_ADMIN_PASSWORD_SECRET', 'APP_DB_PASSWORD_SECRET',
|
||||
'R2_ACCESS_KEY_ID_SECRET', 'R2_SECRET_ACCESS_KEY_SECRET',
|
||||
'OPERATOR_PASSWORD_SECRET', 'PAYMENT_TOKEN_SECRET',
|
||||
'PAYMENT_WEBHOOK_SECRET', 'TINY_TOKEN_SECRET', 'WHATSAPP_TOKEN_SECRET',
|
||||
'PAYMENT_WEBHOOK_SECRET', 'TINY_TOKEN_SECRET',
|
||||
):
|
||||
values[name] = 'dtf_prod_' + name.lower()
|
||||
return values
|
||||
|
||||
Reference in New Issue
Block a user