Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

test: drop internal tracking tags from test descriptions

rmyndharis2c08fac85be1
diff --git a/src/common/errors/message-not-found.error.spec.ts b/src/common/errors/message-not-found.error.spec.ts
index 4a806c4aa..8e2082057 100644
--- a/src/common/errors/message-not-found.error.spec.ts
+++ b/src/common/errors/message-not-found.error.spec.ts
@@ -1,10 +1,10 @@
import { NotFoundException } from '@nestjs/common';
import { MessageNotFoundError } from './message-not-found.error';
-// F-16 — reply/forward/react/delete on a message outside the adapter's fetch/store window threw a
+// reply/forward/react/delete on a message outside the adapter's fetch/store window threw a
// raw Error -> HTTP 500. MessageNotFoundError extends NotFoundException so NestJS maps it to 404
// through the built-in handler (no global filter), surviving the message.service passthrough.
-describe('MessageNotFoundError (F-16)', () => {
+describe('MessageNotFoundError', () => {
it('is a NotFoundException -> HTTP 404 without a custom global filter', () => {
const err = new MessageNotFoundError('ABC');
expect(err).toBeInstanceOf(NotFoundException);
diff --git a/src/engine/adapters/inbound-media-cap.spec.ts b/src/engine/adapters/inbound-media-cap.spec.ts
index b0541293a..717fc297b 100644
--- a/src/engine/adapters/inbound-media-cap.spec.ts
+++ b/src/engine/adapters/inbound-media-cap.spec.ts
@@ -1,6 +1,6 @@
import { capInboundMedia, inboundMediaMaxBytes } from './inbound-media-cap';
-describe('inbound media cap (F-08)', () => {
+describe('inbound media cap', () => {
const ENV = 'MEDIA_DOWNLOAD_MAX_BYTES';
const orig = process.env[ENV];
afterEach(() => {
diff --git a/src/modules/audit/audit.controller.spec.ts b/src/modules/audit/audit.controller.spec.ts
index cb5032a3b..a0937efb7 100644
--- a/src/modules/audit/audit.controller.spec.ts
+++ b/src/modules/audit/audit.controller.spec.ts
@@ -3,10 +3,10 @@ import { AuditController } from './audit.controller';
import { REQUIRED_ROLE_KEY } from '../auth/decorators/auth.decorators';
import { ApiKeyRole } from '../auth/entities/api-key.entity';
-// F-09 — the audit log is a security event trail; without a role gate any active key (incl. a
+// the audit log is a security event trail; without a role gate any active key (incl. a
// read-only VIEWER) could read the entire trail. It must require ADMIN, matching the infra
// secrets/export routes.
-describe('AuditController access control (F-09)', () => {
+describe('AuditController access control', () => {
it('GET /audit requires the ADMIN role', () => {
// Read the handler off the prototype as an opaque object so the lint unbound-method rule
// (which guards against detached method `this`) doesn't fire on a metadata-only lookup.
diff --git a/src/modules/plugins/redact-config.spec.ts b/src/modules/plugins/redact-config.spec.ts
index 4f038ea85..d347db515 100644
--- a/src/modules/plugins/redact-config.spec.ts
+++ b/src/modules/plugins/redact-config.spec.ts
@@ -1,7 +1,7 @@
import { SECRET_SENTINEL, redactSecretConfig, restoreSecretConfig } from './redact-config';
import type { PluginConfigSchema } from '../../core/plugins/plugin.interfaces';
-// F-13 — plugin config (incl. fields a plugin marks `secret`, e.g. an API key) was returned
+// plugin config (incl. fields a plugin marks `secret`, e.g. an API key) was returned
// verbatim by the GET routes, readable by any key. Redact on read; restore on write so the
// dashboard PUTting the masked value back doesn't overwrite the real secret.
const schema: PluginConfigSchema = {
@@ -12,7 +12,7 @@ const schema: PluginConfigSchema = {
},
};
-describe('redactSecretConfig (F-13)', () => {
+describe('redactSecretConfig', () => {
it('masks secret-flagged non-empty values, leaves non-secret fields intact', () => {
expect(redactSecretConfig({ apiKey: 's3cr3t', endpoint: 'https://x' }, schema)).toEqual({
apiKey: SECRET_SENTINEL,
@@ -36,7 +36,7 @@ describe('redactSecretConfig (F-13)', () => {
});
});
-describe('restoreSecretConfig (F-13)', () => {
+describe('restoreSecretConfig', () => {
it('keeps the existing stored secret when the incoming value is the sentinel (unchanged round-trip)', () => {
const merged = restoreSecretConfig(
{ apiKey: SECRET_SENTINEL, endpoint: 'https://new' },
diff --git a/src/modules/session/reconnect-config.spec.ts b/src/modules/session/reconnect-config.spec.ts
index 01ac43437..143033594 100644
--- a/src/modules/session/reconnect-config.spec.ts
+++ b/src/modules/session/reconnect-config.spec.ts
@@ -1,10 +1,10 @@
import { resolveReconnectConfig, clampReconnectDelay } from './session.service';
-// F-03 — an OPERATOR-supplied session.config flows into the reconnect backoff math unchecked.
+// an OPERATOR-supplied session.config flows into the reconnect backoff math unchecked.
// config:{reconnectBaseDelay:'x'} makes the delay NaN -> setTimeout(fn, NaN) fires at 0 (relaunch
// storm); config:{maxReconnectAttempts:'x'} makes the terminal guard `n >= NaN` always false, so the
// loop never caps. These helpers coerce + clamp the config so the math is always finite and bounded.
-describe('resolveReconnectConfig (F-03)', () => {
+describe('resolveReconnectConfig', () => {
it('uses the 5000ms / 5-attempt defaults for absent or empty config', () => {
expect(resolveReconnectConfig(null)).toEqual({ baseDelay: 5000, maxAttempts: 5 });
expect(resolveReconnectConfig({})).toEqual({ baseDelay: 5000, maxAttempts: 5 });
@@ -37,7 +37,7 @@ describe('resolveReconnectConfig (F-03)', () => {
});
});
-describe('clampReconnectDelay (F-03)', () => {
+describe('clampReconnectDelay', () => {
it('passes a finite delay through, flooring at 0', () => {
expect(clampReconnectDelay(8000, 5000)).toBe(8000);
expect(clampReconnectDelay(-1, 5000)).toBe(0);
diff --git a/src/modules/session/session.service.spec.ts b/src/modules/session/session.service.spec.ts
index b72647243..938b9b49f 100644
--- a/src/modules/session/session.service.spec.ts
+++ b/src/modules/session/session.service.spec.ts
@@ -147,7 +147,7 @@ describe('SessionService', () => {
});
// ── delete/stop teardown resilience ───────────────────────────────
- describe('teardown resilience (F-10)', () => {
+ describe('teardown resilience', () => {
const enginesOf = () => (service as unknown as { engines: Map<string, unknown> }).engines;
const stoppingOf = () => (service as unknown as { stoppingSessions: Set<string> }).stoppingSessions;
@@ -227,7 +227,7 @@ describe('SessionService', () => {
expect(repository.find).toHaveBeenCalledWith({ order: { createdAt: 'DESC' } });
});
- it('scopes results to a session-restricted key (F-02)', async () => {
+ it('scopes results to a session-restricted key', async () => {
(repository.find as jest.Mock).mockResolvedValue([]);
await service.findAll(['sess-1', 'sess-2']);
@@ -267,7 +267,7 @@ describe('SessionService', () => {
});
// ── start (concurrency) ───────────────────────────────────────────
- describe('start concurrency (F-04)', () => {
+ describe('start concurrency', () => {
it('rejects a concurrent second start for the same id, creating only one engine (no orphan)', async () => {
(repository.findOne as jest.Mock).mockResolvedValue(createMockSession());
(repository.update as jest.Mock).mockResolvedValue({ affected: 1 });
diff --git a/src/modules/stats/stats.controller.spec.ts b/src/modules/stats/stats.controller.spec.ts
index 274a92a84..cc58a48ca 100644
--- a/src/modules/stats/stats.controller.spec.ts
+++ b/src/modules/stats/stats.controller.spec.ts
@@ -3,11 +3,11 @@ import { StatsController } from './stats.controller';
import { REQUIRED_ROLE_KEY } from '../auth/decorators/auth.decorators';
import { ApiKeyRole } from '../auth/entities/api-key.entity';
-// F-09 — the global stats routes aggregate across EVERY session and carry no scope param, so the
+// the global stats routes aggregate across EVERY session and carry no scope param, so the
// ApiKeyGuard's allowedSessions fence doesn't apply. They must require ADMIN so a VIEWER / a
// session-restricted key can't read cross-tenant activity. The per-session route is left ungated:
// it carries :sessionId, so the guard already scopes a restricted key to its own sessions.
-describe('StatsController access control (F-09)', () => {
+describe('StatsController access control', () => {
const reflector = new Reflector();
// Opaque-object view of the prototype so the lint unbound-method rule doesn't fire on a
// metadata-only handler lookup.
diff --git a/src/modules/stats/stats.service.spec.ts b/src/modules/stats/stats.service.spec.ts
index 400548f20..636bd2750 100644
--- a/src/modules/stats/stats.service.spec.ts
+++ b/src/modules/stats/stats.service.spec.ts
@@ -3,11 +3,11 @@ import { StatsService, timeSeriesTimestampSql, hourBucketSql } from './stats.ser
import { Session, SessionStatus } from '../session/entities/session.entity';
import { Message, MessageDirection, MessageStatus } from '../message/entities/message.entity';
-// F-06 — these two analytics queries used SQLite-only strftime(), which 500s on a Postgres
+// these two analytics queries used SQLite-only strftime(), which 500s on a Postgres
// data DB. The dialect-correct SQL is generated by these pure helpers; the Postgres branch is
// unit-tested here (a live Postgres isn't available in CI), and the SQLite path is exercised
// end-to-end below so the fix can't regress the working backend.
-describe('stats SQL dialect helpers (F-06)', () => {
+describe('stats SQL dialect helpers', () => {
it('uses strftime on sqlite (hour + day buckets)', () => {
expect(timeSeriesTimestampSql('sqlite', 'hour')).toBe(`strftime('%Y-%m-%d %H:00:00', m.createdAt)`);
expect(timeSeriesTimestampSql('sqlite', 'day')).toBe(`strftime('%Y-%m-%d', m.createdAt)`);
diff --git a/src/modules/webhook/webhook-session-scope.spec.ts b/src/modules/webhook/webhook-session-scope.spec.ts
index 012c90b1a..7d0fd695d 100644
--- a/src/modules/webhook/webhook-session-scope.spec.ts
+++ b/src/modules/webhook/webhook-session-scope.spec.ts
@@ -1,4 +1,4 @@
-// F-05 — webhook by-id operations (findOne/update/delete/test) must be scoped to the URL
+// webhook by-id operations (findOne/update/delete/test) must be scoped to the URL
// :sessionId, and GET /webhooks must be scoped to the key's allowedSessions. Without it, an
// OPERATOR key for one session can read/edit/delete/redirect/fire another session's webhook,
// and enumerate every session's webhook URLs. These run against a real in-memory DB so the
@@ -9,7 +9,7 @@ import { WebhookService } from './webhook.service';
import { Webhook } from './entities/webhook.entity';
import { Session, SessionStatus } from '../session/entities/session.entity';
-describe('WebhookService session-scoped access (F-05)', () => {
+describe('WebhookService session-scoped access', () => {
let ds: DataSource;
let service: WebhookService;
let whA: Webhook;