feat(server/desktop): ingest desktop account health reports

Add a POST /desktop/accounts/health-reports endpoint that buffers reports in
Redis, dedupes via signature, and publishes change events to a new
desktop.account.health RabbitMQ queue. A sink worker drains the queue, and
the account service overlays runtime health onto database health when serving
desktop accounts. Publish job creation now consults runtime health so a stale
DB row no longer blocks publishing once the desktop client reports it healthy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-27 21:33:36 +08:00
parent 94f185c3a1
commit 051976e4a9
10 changed files with 647 additions and 51 deletions
+6
View File
@@ -37,6 +37,12 @@ rabbitmq:
generation_dlq: generation.task.run.dlq
generation_dlq_routing_key: generation.task.run.dlq
generation_event_exchange: generation.event
desktop_account_health_exchange: desktop.account.health
desktop_account_health_routing_key: desktop.account.health.report
desktop_account_health_queue: desktop.account.health.report
desktop_account_health_dlx: desktop.account.health.dlx
desktop_account_health_dlq: desktop.account.health.report.dlq
desktop_account_health_dlq_routing_key: desktop.account.health.report.dlq
template_assist_exchange: template.assist
template_assist_routing_key: template.assist.run
template_assist_queue: template.assist.run
+6
View File
@@ -47,6 +47,12 @@ rabbitmq:
desktop_dispatch_exchange: desktop.task.dispatch
desktop_dispatch_publish_prefix: publish
desktop_dispatch_monitor_prefix: monitor
desktop_account_health_exchange: desktop.account.health
desktop_account_health_routing_key: desktop.account.health.report
desktop_account_health_queue: desktop.account.health.report
desktop_account_health_dlx: desktop.account.health.dlx
desktop_account_health_dlq: desktop.account.health.report.dlq
desktop_account_health_dlq_routing_key: desktop.account.health.report.dlq
template_assist_exchange: template.assist
template_assist_routing_key: template.assist.run
template_assist_queue: template.assist.run