1. Service boundary
Current implementation couples editor save, rendering, ACL validation, and notification in one request path.
Current
CoupledPOST /documents/publish
editor_api
├─ validate_user()
├─ sanitize_html()
├─ render_preview()
├─ write_document()
├─ write_acl()
├─ send_email()
└─ return link
RiskAny renderer or email failure blocks publish and creates ambiguous retry behavior.
Proposed
IsolatedPOST /documents
document_api
├─ validate_user()
├─ write_version()
├─ emit DocumentVersionCreated
└─ return pending link
workers
├─ render_worker
├─ acl_projector
└─ notification_worker
AcceptancePublish path only persists canonical input and emits one idempotent event.