ligbox-ops-platform/specs/043-desk-client-activation-sync/tasks.md
Ligbox Spec Hub 884321c43b Spec 043/035: FOSS ligbox-mail-business + mail-bundle VM112
Cria produto FOSS (product_id=3), endpoint mail-bundle no wizard VM112 com
contrato documentado, e runbook de deploy para fechar o ciclo de activação.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 16:54:40 +00:00

49 lines
2 KiB
Markdown

# Spec 043 — Tasks
## Documentação
- [x] Spec índice `spec.md`
- [x] Contrato `activation-field-mapping.md`
- [x] Contrato API `desk-activate-account-api.md`
- [x] Ligações cruzadas specs 023/024/028/035
- [x] Registo em `SPEC-REGISTRY.md`
- [x] `ROLLBACK.md` com tags Git
## Fase 1 — Desk preview UI
- [x] `GET /billing/accounts/{id}/activation-preview`
- [x] Botão **Activar conta** em `billing-ui.js` (só roles autorizados)
- [x] Modal confirmação com 3 colunas FOSS / OpenPanel / Odoo
- [ ] Deploy VM122 + validação Roger (teste manual)
## Fase 2 — FOSS client + order
- [x] `foss_client.create_client()` conforme mapa §4
- [x] `foss_client.create_order()` + activate hosting
- [x] Custom fields FOSS via `config` (domain, manager_*)
- [x] Persistir `external_customer_id` + `external_subscription_id`
## Fase 3 — OpenPanel
- [x] Bridge directo (`provision_user_safe`) + metadata JSON
- [x] Persistir `openpanel_username` em `company_profile_json`
- [x] Idempotência user exists
## Fase 4 — Odoo empresa
- [x] `odoo_client.upsert_customer_partner()` conforme mapa §6
- [x] Coluna `odoo_partner_id` em `billing_accounts`
- [x] Deep-link Odoo na ficha cliente
## Fase 5 — Wizard mail-bundle
- [x] Contrato `contracts/mail-bundle-api.md`
- [x] Código `mail_bundle.py` + `internal_provision.py` (repo)
- [x] `POST /billing/accounts/{id}/activate` com `provision_mail`
- [x] Webhook `POST /billing/webhook/foss/order-activated`
- [x] `wizard_client.provision_mail_bundle()` → VM112
- [x] **Deploy VM112** — 2026-07-01 · `OPS_INTERNAL_TOKEN` + endpoint activo
## FOSS — produto ligbox-mail-business (VM123)
- [x] Plano hosting hp_id=2
- [x] Produto FOSS product_id=3 slug `ligbox-mail-business`
- [x] Script `deploy/vm123-finance-stack/create-foss-mail-business.sh`
## Fase 6 — Testes
- [x] Unit: `test_activation_mapper_043.py` (3)
- [x] Unit: `test_client_activation_043.py` (4) — happy path, idempotência FOSS, reject active
- [ ] E2E Roger: domínio teste wizard → activate → FOSS+OP+Odoo