Paul Rastoin
a159a68e2c
[twenty-server] no floating promises lint rule (#20499 )
...
## Introduction
That's an audit + RFC
## Fire-and-forget (`void`) -- Intentional, correct
These are telemetry, metrics, and audit logging in hot paths or
non-critical contexts. `void` is the right choice.
| File | What was voided |
|---|---|
| `sign-in-up.service.ts` | `metricsService.incrementCounter` (sign-up
metric) + `auditService.insertWorkspaceEvent` (workspace created) |
| `use-graphql-error-handler.hook.ts` | 5x
`metricsService.incrementCounter` (GraphQL operation metrics) |
| `bullmq.driver.ts` | 2x `metricsService.incrementCounter` (job
completed/failed metrics) |
| `call-webhook.job.ts` | 2x `auditService.insertWorkspaceEvent` + 1x
`metricsService.incrementCounter` |
| `custom-domain-manager.service.ts` | `analytics.insertWorkspaceEvent`
(domain activation event) |
| `logic-function-executor.service.ts` |
`auditService.insertWorkspaceEvent` (function execution) |
| `workflow-runner.workspace-service.ts` |
`metricsService.incrementCounter` (throttle metric) |
| `cleaner.workspace-service.ts` | `metricsService.incrementCounter`
(deleted workspace metric) |
| `stream-agent-chat.job.ts` | Detached IIFE for streaming chunks
(intentional concurrent pipeline) |
| `workspace-auth-context.middleware.ts` |
`withWorkspaceAuthContext(...)` (AsyncLocalStorage, returns void anyway)
|
## Top-level script entry points (`void bootstrap()`)
These are module-level calls where the promise has no consumer. `void`
makes the lint rule happy and documents the intent.
| File | What changed |
|---|---|
| `main.ts` | `void bootstrap()` |
| `command.ts` | `void bootstrap()` |
| `queue-worker.ts` | `void bootstrap()` |
| `truncate-db.ts` | `void dropSchemasSequentially()` |
| `codegen/index.ts` | `void generateTests(forceArg)` |
## Now properly awaited -- Real bug fixes
These were floating promises that could silently fail, lose data, or
cause race conditions.
| File | What was fixed |
|---|---|
| `billing-sync-plans-data.command.ts` | `meters.map(async ...)` wrapped
in `Promise.all` -- was returning before upserts finished |
| `cache-storage.service.ts` | `setAdd` and `setPop` had `.then()`
chains that weren't returned/awaited |
| `create-audit-log-from-internal-event.ts` | 4x
`auditService.createObjectEvent` now awaited inside a job |
| `cleaner.workspace-service.ts` | 2x `emailService.send(...)` now
awaited -- emails could silently fail |
| `agent-async-executor.service.ts` | `calculateAndBillUsage` +
`billNativeWebSearchUsage` in `finally` block now awaited |
| `repair-tool-call.util.ts` | `calculateAndBillUsage` now awaited |
| `agent-title-generation.service.ts` | `calculateAndBillUsage` now
awaited |
| `chat-execution.service.ts` | `billNativeWebSearchUsage` now awaited |
| `ai-generate-text.controller.ts` | `calculateAndBillUsage` in
`finally` block now awaited |
| `agent-turn.resolver.ts` | `messageQueueService.add(...)` now awaited
|
| `command.ts` | `app.close()` now awaited (was exiting before graceful
shutdown) |
| `i18n.service.ts` | `loadTranslations()` in `onModuleInit` now awaited
|
| `workspace-query-hook.explorer.ts` | `explore()` in `onModuleInit` now
awaited |
| `message-queue.explorer.ts` | `handleProcessorGroupCollection` in
`onModuleInit` now awaited |
| `ai-billing.service.spec.ts` | Test now properly `await`s the async
call |
| `messaging-messages-import.service.spec.ts` | `expect(...)` now
properly `await`ed for async assertion |
| `archive.finalize()` (3 files) | Voided -- promise resolution already
handled by `pipeline()` / `on('end')` |
## Impersonation & security audit trail -- Upgraded from `void` to
`await`
These were previously fire-and-forget but are
security/compliance-critical events that must be reliably persisted.
| File | What was fixed |
|---|---|
| `impersonation.service.ts` | 4x `auditService.insertWorkspaceEvent`
now awaited (impersonation attempt, token generation
attempt/success/failure) |
| `auth.resolver.ts` | 5x `auditService.insertWorkspaceEvent` now
awaited (impersonation token exchange attempt/success/failure at server
and workspace levels) |
| `auth.service.ts` | 2x `analytics.insertWorkspaceEvent` now awaited
(impersonation attempted/issued) |
## Billing audit -- Upgraded from `void` to `await`
Payment events should be reliably persisted for financial/compliance
reporting.
| File | What was fixed |
|---|---|
| `billing-webhook-invoice.service.ts` |
`auditService.insertWorkspaceEvent(PAYMENT_RECEIVED_EVENT)` now awaited
inside Stripe webhook handler |
## Fire-and-forget with proper error handling -- Upgraded from bare
`void`
These remain non-blocking but now catch and log errors instead of
risking unhandled rejections.
| File | What was fixed |
|---|---|
| `logic-function-executor.service.ts` |
`applicationLogsService.writeLogs` now uses `.catch()` instead of bare
`void` -- user-facing logs should surface errors |
## Systemic infrastructure fixes
| File | What was fixed |
|---|---|
| `metrics.service.ts` | `incrementCounter`: Redis cache write
(`metricsCacheService.updateCounter`) now uses `.catch()` internally
instead of raw `await` -- prevents unhandled rejections across all `void
metricsService.incrementCounter(...)` call sites when Redis is unhealthy
|
| `audit.service.ts` | `preventIfDisabled`: made properly `async` with
`await` and consistent `Promise<{ success: boolean }>` return type.
Removed broken `catch` that returned an `AuditException` as a value
(wrong constructor args, unreachable dead code). Removed unused
`AuditException` import |
## Fixed in this session (beyond original PR)
| File | What changed |
|---|---|
| `telemetry.listener.ts` | Removed misleading `Promise.all` + `void`
combo; replaced with simple `for...of` + `void` |
| `message-queue.explorer.ts` | Changed from `void` to `await` so
startup crashes on registration failure |
2026-05-13 10:08:42 +00:00
github-actions[bot]
50a4fe5040
i18n - translations ( #20428 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-05-10 20:24:31 +02:00
github-actions[bot]
3420d63b7a
i18n - translations ( #20411 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-05-09 11:12:05 +02:00
github-actions[bot]
88988e5a55
i18n - translations ( #20313 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-05-06 10:42:40 +02:00
github-actions[bot]
a3c026f1ce
i18n - translations ( #20302 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-05-05 20:39:23 +02:00
Abdul Rahman
e0563377b5
Fix unclear metadata validation errors ( #20234 )
...
https://github.com/user-attachments/assets/8f8f1122-3de1-4a9b-8bb4-a3c8d31e47ae
---------
Co-authored-by: Cursor <cursoragent@cursor.com >
Co-authored-by: Charles Bochet <charles@twenty.com >
2026-05-05 18:18:05 +00:00
github-actions[bot]
31674253a1
i18n - translations ( #20289 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-05-05 16:33:11 +02:00
github-actions[bot]
65ba36d475
i18n - translations ( #20286 )
...
Created by Github action
Co-authored-by: github-actions <github-actions@twenty.com >
2026-05-05 15:31:52 +02:00
github-actions[bot]
dd3b6f2a2f
i18n - translations ( #20278 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-05-05 14:11:21 +02:00
github-actions[bot]
9ddf9af4c4
i18n - translations ( #20236 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-05-04 16:18:30 +02:00
github-actions[bot]
fc4cf7fe09
i18n - translations ( #20226 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-05-04 11:34:51 +02:00
github-actions[bot]
636deffb93
i18n - translations ( #20164 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-30 18:01:45 +02:00
github-actions[bot]
a6118b7dc3
i18n - translations ( #20125 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-29 11:57:14 +02:00
github-actions[bot]
7ea1dfdd49
i18n - translations ( #20115 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-28 16:48:25 +02:00
github-actions[bot]
39831338f7
i18n - translations ( #19988 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-22 18:46:31 +02:00
github-actions[bot]
f30ef2432f
i18n - translations ( #19987 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-22 17:55:26 +02:00
github-actions[bot]
755f1c92d1
i18n - translations ( #19893 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-20 19:45:24 +02:00
github-actions[bot]
1c54e79d6c
i18n - translations ( #19843 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-18 21:14:49 +02:00
github-actions[bot]
f94ee2d495
i18n - translations ( #19795 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-17 14:15:46 +02:00
github-actions[bot]
cddc47b61f
i18n - translations ( #19731 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-15 19:08:24 +02:00
github-actions[bot]
77e5b06a50
i18n - translations ( #19707 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-14 19:00:22 +02:00
github-actions[bot]
59a222e0f0
i18n - translations ( #19703 )
...
Created by Github action
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-14 18:38:55 +02:00
github-actions[bot]
9cf6f42313
i18n - translations ( #19699 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-14 18:08:57 +02:00
github-actions[bot]
9f6855e7dd
i18n - translations ( #19652 )
...
Created by Github action
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-13 16:54:50 +02:00
github-actions[bot]
c67602f2e8
i18n - translations ( #19647 )
...
Created by Github action
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-13 16:00:27 +02:00
github-actions[bot]
de401d96fe
i18n - translations ( #19621 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-13 09:54:25 +02:00
github-actions[bot]
ec7d19a3af
i18n - translations ( #19551 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-10 12:53:20 +02:00
github-actions[bot]
f8c35a95b5
i18n - translations ( #19537 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-10 10:09:01 +02:00
github-actions[bot]
fb950cf312
i18n - translations ( #19527 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-09 22:37:55 +02:00
github-actions[bot]
c54747379a
i18n - translations ( #19520 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-09 18:43:56 +02:00
github-actions[bot]
dc6e76b6ab
i18n - translations ( #19488 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-09 12:26:14 +02:00
github-actions[bot]
ac4819758d
i18n - translations ( #19451 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-08 15:03:32 +02:00
github-actions[bot]
646edec104
i18n - translations ( #19354 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-06 12:08:11 +02:00
github-actions[bot]
0d44d7c6d7
i18n - translations ( #19352 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-06 10:28:59 +02:00
github-actions[bot]
4db7ae20c4
i18n - translations ( #19329 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-04 08:11:17 +02:00
github-actions[bot]
93c0c98495
i18n - translations ( #19317 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-03 17:38:09 +02:00
github-actions[bot]
04d22feef6
i18n - translations ( #19285 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-02 19:38:43 +02:00
github-actions[bot]
391f6c0dab
i18n - translations ( #19250 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-04-02 12:33:12 +02:00
github-actions[bot]
05c0713474
i18n - translations ( #19080 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-03-29 10:51:48 +02:00
github-actions[bot]
6efd9ad26e
i18n - translations ( #19073 )
...
Created by Github action
Co-authored-by: github-actions <github-actions@twenty.com >
2026-03-28 22:59:16 +01:00
github-actions[bot]
9498a60f74
i18n - translations ( #19048 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-03-27 17:39:22 +01:00
github-actions[bot]
34b81adce8
i18n - translations ( #19046 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-03-27 16:38:08 +01:00
github-actions[bot]
c96c034908
i18n - translations ( #19040 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-03-27 14:53:33 +01:00
github-actions[bot]
1c297e5ace
i18n - translations ( #19018 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-03-26 16:41:17 +01:00
github-actions[bot]
b732b2efd4
i18n - translations ( #18997 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-03-26 11:12:19 +01:00
github-actions[bot]
e25ea6069d
i18n - translations ( #18958 )
...
Created by Github action
Co-authored-by: github-actions <github-actions@twenty.com >
2026-03-25 14:31:01 +01:00
github-actions[bot]
f7ef41959b
i18n - translations ( #18956 )
...
Created by Github action
Co-authored-by: github-actions <github-actions@twenty.com >
2026-03-25 14:23:30 +01:00
github-actions[bot]
ba0108944f
i18n - translations ( #18955 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-03-25 14:11:05 +01:00
Félix Malfait
03c94727be
fix: wrap standard object/field metadata labels in msg for i18n extraction ( #18951 )
...
## Summary
- Standard object and field metadata labels were plain strings instead
of being wrapped in Lingui `msg` template literals, which prevented
extraction into translation catalogs. This caused "Uncompiled message
detected!" warnings at runtime.
- The bug was introduced when the decorator-based approach
(`@WorkspaceEntity({ labelSingular: msg`...` })`) was replaced by flat
metadata builder utils with plain strings.
- Adds an `i18nLabel` helper to safely extract the message string from
`MessageDescriptor` objects.
- Re-runs `lingui extract` and `lingui compile` to update all locale PO
files and compiled catalogs.
- Adds an integration test that queries the metadata API with `x-locale`
headers to verify locale-aware label resolution.
- Includes a ClickHouse usage event writer integration test (small
unrelated fix noticed along the way).
## Test plan
- [ ] CI lint passes (prettier + oxlint)
- [ ] CI typecheck passes
- [ ] Server unit tests pass
- [ ] Integration tests pass (including new `object-metadata-i18n` test)
- [ ] No "Uncompiled message detected!" warnings for standard
object/field labels at runtime
Made with [Cursor](https://cursor.com )
2026-03-25 14:03:51 +01:00
github-actions[bot]
5c99d7205f
i18n - translations ( #18930 )
...
Created by Github action
---------
Co-authored-by: github-actions <github-actions@twenty.com >
2026-03-24 19:30:01 +01:00