fix(db): handle SSL config types in pg connections#356
Conversation
📝 WalkthroughFundamental FlawEnv vars containing JSON/boolean values were treated as raw strings by the config parser, producing wrong-typed SSL options for Postgres. That, combined with (1) pool creation logging that lied about connectivity, (2) no verification query after pool creation, and (3) no background pool error handlers, caused silent failures and production crash-loops when connecting to SSL-enabled Postgres (OVH). Systemic Data Flow Changes
Core Algorithm / Logic Changes
Deprecated / Removed Code
Explicitly Ignored Technical Debt
Tests / Verification Notes (concise)
WalkthroughEnvironment variable overrides now attempt JSON parsing before falling back to raw strings. Database pool creation was moved to a verified-creation helper that normalizes SSL, registers background error handlers, runs Changes
Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx affected -t check -- --max-diagnostics none |
❌ Failed | 16s | View ↗ |
nx affected -t test |
✅ Succeeded | 3m 9s | View ↗ |
nx affected -t build |
✅ Succeeded | 20s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-03-31 13:28:47 UTC
There was a problem hiding this comment.
Actionable comments posted: 5
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 028091b4-c46e-4502-a2b4-2ef9d1e07b44
📒 Files selected for processing (3)
packages/config-parser/src/utils.tspackages/matrix-identity-server/src/db/sql/pg.tspackages/matrix-identity-server/src/matrixDb/sql/pg.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Test / Test Affected Packages
- GitHub Check: Docs / Update Documentation
🧰 Additional context used
📓 Path-based instructions (8)
packages/config-parser/**/*.{ts,tsx}
📄 CodeRabbit inference engine (packages/config-parser/AGENTS.md)
packages/config-parser/**/*.{ts,tsx}: UsetwakeConfig(desc, defaultConfigFile?, useEnv?, useOldParser?)as the sole public API for configuration loading and validation in@twake/config-parser
Define each configuration key's type, default, and required status using theConfigDescriptiontype in@twake/config-parser
Supported configuration types in@twake/config-parserare:number,boolean,array,json,object,string
Files:
packages/config-parser/src/utils.ts
packages/config-parser/src/**/*.ts
📄 CodeRabbit inference engine (packages/config-parser/AGENTS.md)
packages/config-parser/src/**/*.ts: Unknown keys in the config file must throwUnacceptedKeyErrorin@twake/config-parser
Missing required configuration keys must throwMissingRequiredConfigErrorin@twake/config-parser
Files:
packages/config-parser/src/utils.ts
**/*.{ts,tsx,js,jsx,json,md}
📄 CodeRabbit inference engine (CLAUDE.md)
Use
npm run format:checkandnpm run format:fixfor code formatting checks
Files:
packages/config-parser/src/utils.tspackages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (CODING_STYLE.md)
**/*.{js,ts,jsx,tsx}: Use 2 spaces for indentation, not 4, tabs, or other amounts. Enforce with a formatter.
Opening braces must go on the same line. Never place opening braces on a new line.
Use trailing commas in multi-line structures (arrays, objects, function parameters) to minimize diff noise.
Semicolons are required on all statements. Do not rely on Automatic Semicolon Insertion (ASI).
Enforce a hard line length limit of 120 characters. Break overly complex expressions into named sub-expressions.
Use camelCase for variable and function names.
Use PascalCase for types, interfaces, classes, and enums.
Use SCREAMING_SNAKE_CASE only for module-level primitives that are truly constant and never change. Do not use for local bindings.
Boolean variables must read as a question using prefixes likeis,has,can(e.g.,isLoading,hasPermission,canRetry). Never use bare noun forms.
Do not abbreviate variable or function names except for:i,jin tight loops;efor event parameters;errfor errors;ctxfor context;req/resin HTTP handlers.
Each function must do exactly one job. Do not write functions that combine multiple concerns (e.g., avoidfetchAndTransformUser). Extract compound operations into separate functions.
Functions must have a maximum of 5 parameters. For more than 5 parameters, group related data into a typed options object.
Keep functions short, with a reasonable ceiling of 25–40 lines. Functions should fit on one screen without scrolling.
Every function must return a meaningful value.voidreturn types are forbidden. UseActionResultfor functions with no natural data return.
Recursion must be tail-call or converted to an iterative loop. Non-tail-recursive functions are forbidden in production code because JavaScript engines do not reliably optimize tail calls.
Maximum nesting depth is 2 levels (level 0 is function body, level 1 is a block inside it, level 2 is a block inside that). Extract sub-problems into named functi...
Files:
packages/config-parser/src/utils.tspackages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CODING_STYLE.md)
**/*.{ts,tsx}: Return types must be explicitly annotated on all non-trivial functions in TypeScript. Inference alone is not a contract.
Theanytype is forbidden without exception in TypeScript. Use a proper type, discriminated union,unknownwith a guard, or a generic instead.
Double casts viaas unknown as Tare forbidden. If the type model is inconsistent, fix the model instead.
Useunknownoveranyfor data from external sources (HTTP responses,JSON.parse, event payloads, database rows). Write a type guard to validate the data.
Prefertypefor unions and intersections; preferinterfacefor object shapes. Keep intent readable through consistent use.
Avoid TypeScriptenum. Use string union types for fully internal values. For values from external sources, provide a validation helper that narrows conversion from raw strings.
In TypeScript, caught values have typeunknown, notError. Useinstanceof Errorchecks before accessing Error-specific properties.
Do not use@ts-ignoreor@ts-expect-errorwithout an explanatory comment stating the reason and removal condition.
**/*.{ts,tsx}: Code must follow the philosophy of boundaries over conventions - use module facades enforced by lint rules instead of comments, prefer#privatefields over naming conventions, prefer TypeScript types over JSDoc comments
Do not introduce new any types in TypeScript - warnings are existing tech debt, new ones are blockers
Files:
packages/config-parser/src/utils.tspackages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
packages/matrix-identity-server/src/**/*.{ts,js}
📄 CodeRabbit inference engine (CLAUDE.md)
Routes are registered on
this.api.getandthis.api.postmaps and mounted by the parent server
Files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
packages/matrix-identity-server/src/**/*.ts
📄 CodeRabbit inference engine (packages/matrix-identity-server/src/AGENTS.md)
All Matrix Identity Server endpoints must be mounted at
/_matrix/identity/v2/prefix
Files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
packages/matrix-identity-server/src/db/**/*.{ts,js}
📄 CodeRabbit inference engine (CLAUDE.md)
MatrixIdentityServerinitializes two databases:IdentityServerDb(identity-server tables) andUserDB(user directory)
Files:
packages/matrix-identity-server/src/db/sql/pg.ts
🧠 Learnings (23)
📓 Common learnings
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/db/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:56.983Z
Learning: Applies to packages/db/src/db/src/sql/pg.ts : In `db/src/sql/pg.ts`, implement PostgreSQL adapter using `pg` driver with connection pooling and parameterized queries
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/matrixDb/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:24.131Z
Learning: Applies to packages/matrix-identity-server/src/matrixDb/matrixDb/sql/**/*.ts : Support both PostgreSQL and SQLite Synapse configurations with driver-specific queries
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/matrixDb/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:24.131Z
Learning: Applies to packages/matrix-identity-server/src/matrixDb/matrixDb/index.ts : Reference configuration keys: matrix_database_engine (pg/sqlite), matrix_database_host, matrix_database_name for database connections
📚 Learning: 2026-03-17T11:20:29.014Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:29.014Z
Learning: Applies to packages/config-parser/src/src/index.ts : Default useOldParser flag to true for backwards compatibility; new code should use false
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:18.213Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:18.213Z
Learning: Applies to packages/config-parser/**/*.{ts,tsx} : Use `twakeConfig(desc, defaultConfigFile?, useEnv?, useOldParser?)` as the sole public API for configuration loading and validation in twake/config-parser
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:18.213Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:18.213Z
Learning: Applies to packages/config-parser/**/*.{ts,tsx} : Supported configuration types in twake/config-parser are: `number`, `boolean`, `array`, `json`, `object`, `string`
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:21:16.677Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/logger/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:16.677Z
Learning: Applies to packages/logger/**/*.{ts,tsx} : Load logger configuration from environment variables or config object via `getLogger()` using twake/config-parser
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:18.213Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:18.213Z
Learning: Applies to packages/config-parser/**/*.{ts,tsx} : Define each configuration key's type, default, and required status using the `ConfigDescription` type in twake/config-parser
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:18.213Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:18.213Z
Learning: Configuration loading priority in twake/config-parser (new parser): environment variables > config file > defaults
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:29.014Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:29.014Z
Learning: Applies to packages/config-parser/src/src/index.ts : Keep all logic in a single file (index.ts) unless the file grows substantially
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:18.213Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:18.213Z
Learning: Applies to packages/config-parser/src/**/*.ts : Missing required configuration keys must throw `MissingRequiredConfigError` in twake/config-parser
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:18.213Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:18.213Z
Learning: Applies to packages/config-parser/src/**/*.ts : Unknown keys in the config file must throw `UnacceptedKeyError` in twake/config-parser
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:23:13.313Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:13.313Z
Learning: Applies to packages/tom-server/src/config.ts : Document all configuration keys in `src/config.ts` using the `confDesc` object structure
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-31T07:26:27.898Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 355
File: packages/matrix-identity-server/src/db/index.ts:413-413
Timestamp: 2026-03-31T07:26:27.898Z
Learning: When reviewing TypeScript code in this repo, follow Biome’s `noDoubleEquals` rule: do not use loose equality (`== null` / `!= null`) as a shorthand. For nullish checks, use explicit strict comparisons instead (e.g., `value === null || value === undefined` or `value !== null && value !== undefined`).
Applied to files:
packages/config-parser/src/utils.tspackages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:22:24.131Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/matrixDb/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:24.131Z
Learning: Applies to packages/matrix-identity-server/src/matrixDb/matrixDb/index.ts : Reference configuration keys: matrix_database_engine (pg/sqlite), matrix_database_host, matrix_database_name for database connections
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:20:56.983Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/db/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:56.983Z
Learning: Applies to packages/db/src/db/src/sql/pg.ts : In `db/src/sql/pg.ts`, implement PostgreSQL adapter using `pg` driver with connection pooling and parameterized queries
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:22:24.131Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/matrixDb/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:24.131Z
Learning: Applies to packages/matrix-identity-server/src/matrixDb/matrixDb/sql/**/*.ts : Support both PostgreSQL and SQLite Synapse configurations with driver-specific queries
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:22:06.022Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/db/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:06.022Z
Learning: Applies to packages/matrix-identity-server/src/db/db/sql/{pg,sqlite}.ts : When adding a new table, define schema in `db/index.ts`, and add SQL implementations in both `db/sql/pg.ts` (PostgreSQL) and `db/sql/sqlite.ts` (SQLite)
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-23T09:08:39.061Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-23T09:08:39.061Z
Learning: Applies to packages/matrix-identity-server/src/db/**/*.{ts,js} : `MatrixIdentityServer` initializes two databases: `IdentityServerDb` (identity-server tables) and `UserDB` (user directory)
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:22:24.131Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/matrixDb/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:24.131Z
Learning: Applies to packages/matrix-identity-server/src/matrixDb/matrixDb/sql/**/*.ts : Keep Synapse DB schema queries minimal and schema-version-aware to accommodate changes between Synapse versions
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:22:06.022Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/db/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:06.022Z
Learning: Applies to packages/matrix-identity-server/src/db/db/**/*.ts : All SQL queries must use parameterized statements — never string-interpolate user input into SQL
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-31T08:42:09.345Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/AGENTS.md:0-0
Timestamp: 2026-03-31T08:42:09.345Z
Learning: Applies to packages/matrix-identity-server/src/**/*.test.ts : Use SQLite in-memory for tests; mock SMTP and external services
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-31T08:42:09.345Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/AGENTS.md:0-0
Timestamp: 2026-03-31T08:42:09.345Z
Learning: Applies to packages/matrix-identity-server/src/src/userdb/index.ts : Select `userdb/` backend via `user_db` config key: `sqlite`, `pg`, `ldap`, or `''` (empty)
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:21:27.917Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:27.917Z
Learning: Applies to packages/matrix-identity-server/src/index.ts : The db property exposes the identity server's database for subclass use
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.ts
📚 Learning: 2026-03-17T11:22:06.022Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/db/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:06.022Z
Learning: Applies to packages/matrix-identity-server/src/db/db/index.ts : Add new identity server tables to the `Collections` enum in `db/index.ts`
Applied to files:
packages/matrix-identity-server/src/db/sql/pg.ts
🪛 Biome (2.4.9)
packages/matrix-identity-server/src/matrixDb/sql/pg.ts
[error] 67-67: Using == may be unsafe if you are relying on type coercion.
(lint/suspicious/noDoubleEquals)
packages/matrix-identity-server/src/db/sql/pg.ts
[error] 64-64: Using == may be unsafe if you are relying on type coercion.
(lint/suspicious/noDoubleEquals)
🔇 Additional comments (1)
packages/matrix-identity-server/src/db/sql/pg.ts (1)
153-158: Good:exists()stops masking metadata failures.Rejecting here is the right move.
_createTablesalready catches the rejection, so a brokenpg_tableslookup no longer masquerades asfalseand triggers bogus DDL.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
packages/matrix-identity-server/src/db/sql/pg.ts (1)
21-35:⚠️ Potential issue | 🟠 MajorReject unsupported
sslvalues before they reachpg.Line 28 already classifies bad input as
unexpected(...), but Line 35 still feeds that raw value intopg.Pool. After the parser change,DATABASE_SSL=1becomes number1, so unsupported legacy values can still hit both this pool and the MatrixDB path inpackages/matrix-identity-server/src/matrixDb/sql/pg.tson Lines 66-73. Fail fast unlessopts.sslisfalse,true, or a non-array object.🔧 Throw on unsupported SSL input instead of logging and continuing
protected createVerifiedPool( pg: typeof import('pg'), opts: ClientConfig, label: string ): Promise<PgPool> { - const sslType = - opts.ssl === null || opts.ssl === undefined || opts.ssl === false - ? 'disabled' - : opts.ssl === true - ? 'enabled' - : typeof opts.ssl === 'object' - ? 'object' - : `unexpected(${typeof opts.ssl}: ${String(opts.ssl)})` + const isSslDisabled = + opts.ssl === null || opts.ssl === undefined || opts.ssl === false + const isSslObject = + typeof opts.ssl === 'object' && + opts.ssl !== null && + !Array.isArray(opts.ssl) + if (!isSslDisabled && opts.ssl !== true && !isSslObject) { + throw new Error( + `[${label}] Unsupported ssl config: ${String(opts.ssl)}` + ) + } + const sslType = isSslDisabled + ? 'disabled' + : opts.ssl === true + ? 'enabled' + : 'object'In node-postgres (`pg`), what values are valid for `ClientConfig.ssl` / `Pool` `ssl` option? Are numeric or string values like `1`, `0`, `on`, `off`, or arrays supported, or must it be `boolean` or a TLS options object?Based on learnings: only
true/false(not1/0) are supported as boolean env overrides in the old parser.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: e0e179dc-a746-4fba-b30e-2eee4db87ec1
📒 Files selected for processing (3)
packages/config-parser/src/utils.tspackages/matrix-identity-server/src/db/sql/pg.tspackages/matrix-identity-server/src/matrixDb/sql/pg.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test / Test Affected Packages
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{ts,tsx,js,jsx,json,md}
📄 CodeRabbit inference engine (CLAUDE.md)
Use
npm run format:checkandnpm run format:fixfor code formatting checks
Files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/config-parser/src/utils.tspackages/matrix-identity-server/src/db/sql/pg.ts
packages/matrix-identity-server/src/**/*.{ts,js}
📄 CodeRabbit inference engine (CLAUDE.md)
Routes are registered on
this.api.getandthis.api.postmaps and mounted by the parent server
Files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (CODING_STYLE.md)
**/*.{js,ts,jsx,tsx}: Use 2 spaces for indentation, not 4, tabs, or other amounts. Enforce with a formatter.
Opening braces must go on the same line. Never place opening braces on a new line.
Use trailing commas in multi-line structures (arrays, objects, function parameters) to minimize diff noise.
Semicolons are required on all statements. Do not rely on Automatic Semicolon Insertion (ASI).
Enforce a hard line length limit of 120 characters. Break overly complex expressions into named sub-expressions.
Use camelCase for variable and function names.
Use PascalCase for types, interfaces, classes, and enums.
Use SCREAMING_SNAKE_CASE only for module-level primitives that are truly constant and never change. Do not use for local bindings.
Boolean variables must read as a question using prefixes likeis,has,can(e.g.,isLoading,hasPermission,canRetry). Never use bare noun forms.
Do not abbreviate variable or function names except for:i,jin tight loops;efor event parameters;errfor errors;ctxfor context;req/resin HTTP handlers.
Each function must do exactly one job. Do not write functions that combine multiple concerns (e.g., avoidfetchAndTransformUser). Extract compound operations into separate functions.
Functions must have a maximum of 5 parameters. For more than 5 parameters, group related data into a typed options object.
Keep functions short, with a reasonable ceiling of 25–40 lines. Functions should fit on one screen without scrolling.
Every function must return a meaningful value.voidreturn types are forbidden. UseActionResultfor functions with no natural data return.
Recursion must be tail-call or converted to an iterative loop. Non-tail-recursive functions are forbidden in production code because JavaScript engines do not reliably optimize tail calls.
Maximum nesting depth is 2 levels (level 0 is function body, level 1 is a block inside it, level 2 is a block inside that). Extract sub-problems into named functi...
Files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/config-parser/src/utils.tspackages/matrix-identity-server/src/db/sql/pg.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CODING_STYLE.md)
**/*.{ts,tsx}: Return types must be explicitly annotated on all non-trivial functions in TypeScript. Inference alone is not a contract.
Theanytype is forbidden without exception in TypeScript. Use a proper type, discriminated union,unknownwith a guard, or a generic instead.
Double casts viaas unknown as Tare forbidden. If the type model is inconsistent, fix the model instead.
Useunknownoveranyfor data from external sources (HTTP responses,JSON.parse, event payloads, database rows). Write a type guard to validate the data.
Prefertypefor unions and intersections; preferinterfacefor object shapes. Keep intent readable through consistent use.
Avoid TypeScriptenum. Use string union types for fully internal values. For values from external sources, provide a validation helper that narrows conversion from raw strings.
In TypeScript, caught values have typeunknown, notError. Useinstanceof Errorchecks before accessing Error-specific properties.
Do not use@ts-ignoreor@ts-expect-errorwithout an explanatory comment stating the reason and removal condition.
**/*.{ts,tsx}: Code must follow the philosophy of boundaries over conventions - use module facades enforced by lint rules instead of comments, prefer#privatefields over naming conventions, prefer TypeScript types over JSDoc comments
Do not introduce new any types in TypeScript - warnings are existing tech debt, new ones are blockers
Files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/config-parser/src/utils.tspackages/matrix-identity-server/src/db/sql/pg.ts
packages/matrix-identity-server/src/**/*.ts
📄 CodeRabbit inference engine (packages/matrix-identity-server/src/AGENTS.md)
All Matrix Identity Server endpoints must be mounted at
/_matrix/identity/v2/prefix
Files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
packages/config-parser/**/*.{ts,tsx}
📄 CodeRabbit inference engine (packages/config-parser/AGENTS.md)
packages/config-parser/**/*.{ts,tsx}: UsetwakeConfig(desc, defaultConfigFile?, useEnv?, useOldParser?)as the sole public API for configuration loading and validation in@twake/config-parser
Define each configuration key's type, default, and required status using theConfigDescriptiontype in@twake/config-parser
Supported configuration types in@twake/config-parserare:number,boolean,array,json,object,string
Files:
packages/config-parser/src/utils.ts
packages/config-parser/src/**/*.ts
📄 CodeRabbit inference engine (packages/config-parser/AGENTS.md)
packages/config-parser/src/**/*.ts: Unknown keys in the config file must throwUnacceptedKeyErrorin@twake/config-parser
Missing required configuration keys must throwMissingRequiredConfigErrorin@twake/config-parser
Files:
packages/config-parser/src/utils.ts
packages/matrix-identity-server/src/db/**/*.{ts,js}
📄 CodeRabbit inference engine (CLAUDE.md)
MatrixIdentityServerinitializes two databases:IdentityServerDb(identity-server tables) andUserDB(user directory)
Files:
packages/matrix-identity-server/src/db/sql/pg.ts
🧠 Learnings (31)
📓 Common learnings
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/db/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:56.983Z
Learning: Applies to packages/db/src/db/src/sql/pg.ts : In `db/src/sql/pg.ts`, implement PostgreSQL adapter using `pg` driver with connection pooling and parameterized queries
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/matrixDb/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:24.131Z
Learning: Applies to packages/matrix-identity-server/src/matrixDb/matrixDb/sql/**/*.ts : Support both PostgreSQL and SQLite Synapse configurations with driver-specific queries
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/matrixDb/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:24.131Z
Learning: Applies to packages/matrix-identity-server/src/matrixDb/matrixDb/index.ts : Reference configuration keys: matrix_database_engine (pg/sqlite), matrix_database_host, matrix_database_name for database connections
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 356
File: packages/config-parser/src/utils.ts:13-18
Timestamp: 2026-03-31T12:22:12.593Z
Learning: In `packages/config-parser/src/utils.ts`, `oldParser` now uses `JSON.parse()` on env var values and falls back to raw string on failure (pragmatic legacy-path fix). Known gap: `JSON.parse('1')` yields number `1`, not string `'1'`, so `isTruthy('1')` no longer matches if the stored value was coerced. Documented policy: only `true`/`false` (not `1`/`0`) are supported as boolean env overrides in the old parser.
📚 Learning: 2026-03-17T11:20:56.983Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/db/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:56.983Z
Learning: Applies to packages/db/src/db/src/sql/pg.ts : In `db/src/sql/pg.ts`, implement PostgreSQL adapter using `pg` driver with connection pooling and parameterized queries
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:22:24.131Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/matrixDb/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:24.131Z
Learning: Applies to packages/matrix-identity-server/src/matrixDb/matrixDb/index.ts : Reference configuration keys: matrix_database_engine (pg/sqlite), matrix_database_host, matrix_database_name for database connections
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-23T09:08:39.061Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-23T09:08:39.061Z
Learning: Applies to packages/matrix-identity-server/src/db/**/*.{ts,js} : `MatrixIdentityServer` initializes two databases: `IdentityServerDb` (identity-server tables) and `UserDB` (user directory)
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:22:24.131Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/matrixDb/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:24.131Z
Learning: Applies to packages/matrix-identity-server/src/matrixDb/matrixDb/sql/**/*.ts : Support both PostgreSQL and SQLite Synapse configurations with driver-specific queries
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:22:06.022Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/db/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:06.022Z
Learning: Applies to packages/matrix-identity-server/src/db/db/sql/{pg,sqlite}.ts : When adding a new table, define schema in `db/index.ts`, and add SQL implementations in both `db/sql/pg.ts` (PostgreSQL) and `db/sql/sqlite.ts` (SQLite)
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:22:24.131Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/matrixDb/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:24.131Z
Learning: Applies to packages/matrix-identity-server/src/matrixDb/matrixDb/sql/**/*.ts : Keep Synapse DB schema queries minimal and schema-version-aware to accommodate changes between Synapse versions
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/config-parser/src/utils.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:21:27.917Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:27.917Z
Learning: Applies to packages/matrix-identity-server/src/index.ts : The db property exposes the identity server's database for subclass use
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:20:56.983Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/db/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:56.983Z
Learning: Applies to packages/db/src/db/src/index.ts : In `db/src/index.ts`, export the main `Database` class, `Pg`, `SQLite`, and `createTables` function
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:22:06.022Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/db/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:06.022Z
Learning: Applies to packages/matrix-identity-server/src/db/db/**/*.ts : All SQL queries must use parameterized statements — never string-interpolate user input into SQL
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-31T08:42:09.345Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/AGENTS.md:0-0
Timestamp: 2026-03-31T08:42:09.345Z
Learning: Applies to packages/matrix-identity-server/src/src/userdb/index.ts : Select `userdb/` backend via `user_db` config key: `sqlite`, `pg`, `ldap`, or `''` (empty)
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:21:27.917Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:27.917Z
Learning: Applies to packages/matrix-identity-server/src/index.ts : this.ready is a Promise that resolves when async initialization (key gen, DB setup) completes
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.ts
📚 Learning: 2026-03-17T11:21:27.917Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:27.917Z
Learning: Applies to packages/matrix-identity-server/src/index.ts : MatrixIdentityServer constructor takes (conf, confDesc?, db?) — conf must include server_name
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.ts
📚 Learning: 2026-03-31T07:26:27.898Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 355
File: packages/matrix-identity-server/src/db/index.ts:413-413
Timestamp: 2026-03-31T07:26:27.898Z
Learning: When reviewing TypeScript code in this repo, follow Biome’s `noDoubleEquals` rule: do not use loose equality (`== null` / `!= null`) as a shorthand. For nullish checks, use explicit strict comparisons instead (e.g., `value === null || value === undefined` or `value !== null && value !== undefined`).
Applied to files:
packages/matrix-identity-server/src/matrixDb/sql/pg.tspackages/config-parser/src/utils.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-31T12:22:12.593Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 356
File: packages/config-parser/src/utils.ts:13-18
Timestamp: 2026-03-31T12:22:12.593Z
Learning: In `packages/config-parser/src/utils.ts`, `oldParser` now uses `JSON.parse()` on env var values and falls back to raw string on failure (pragmatic legacy-path fix). Known gap: `JSON.parse('1')` yields number `1`, not string `'1'`, so `isTruthy('1')` no longer matches if the stored value was coerced. Documented policy: only `true`/`false` (not `1`/`0`) are supported as boolean env overrides in the old parser.
Applied to files:
packages/config-parser/src/utils.tspackages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:20:29.014Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:29.014Z
Learning: Applies to packages/config-parser/src/src/index.ts : Default useOldParser flag to true for backwards compatibility; new code should use false
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:18.213Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:18.213Z
Learning: Applies to packages/config-parser/**/*.{ts,tsx} : Use `twakeConfig(desc, defaultConfigFile?, useEnv?, useOldParser?)` as the sole public API for configuration loading and validation in twake/config-parser
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:18.213Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:18.213Z
Learning: Applies to packages/config-parser/**/*.{ts,tsx} : Define each configuration key's type, default, and required status using the `ConfigDescription` type in twake/config-parser
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:18.213Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:18.213Z
Learning: Applies to packages/config-parser/**/*.{ts,tsx} : Supported configuration types in twake/config-parser are: `number`, `boolean`, `array`, `json`, `object`, `string`
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:21:16.677Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/logger/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:16.677Z
Learning: Applies to packages/logger/**/*.{ts,tsx} : Load logger configuration from environment variables or config object via `getLogger()` using twake/config-parser
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:18.213Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:18.213Z
Learning: Applies to packages/config-parser/src/**/*.ts : Unknown keys in the config file must throw `UnacceptedKeyError` in twake/config-parser
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:18.213Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:18.213Z
Learning: Configuration loading priority in twake/config-parser (new parser): environment variables > config file > defaults
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:18.213Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:18.213Z
Learning: Applies to packages/config-parser/src/**/*.ts : Missing required configuration keys must throw `MissingRequiredConfigError` in twake/config-parser
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-23T09:08:39.061Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-23T09:08:39.061Z
Learning: Applies to packages/*/src/config.json : Defaults are specified in each package's `src/config.json` file
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-27T16:21:10.935Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CODING_STYLE.md:0-0
Timestamp: 2026-03-27T16:21:10.935Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Use strict equality (`===`) instead of loose equality (`==`). Do not rely on JavaScript's implicit type coercion.
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:20:18.213Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/config-parser/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:18.213Z
Learning: Applies to packages/config-parser/**/package.json : twake/config-parser must have zero runtime dependencies
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:23:13.313Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:13.313Z
Learning: Applies to packages/tom-server/src/config.ts : Document all configuration keys in `src/config.ts` using the `confDesc` object structure
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:24:48.682Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/wellKnown/AGENTS.md:0-0
Timestamp: 2026-03-17T11:24:48.682Z
Learning: Applies to packages/tom-server/src/wellKnown/wellKnown/**/*.ts : When adding new config fields to well-known responses, update `src/config.json` (in tom-server) first, then include the value in the response object in the wellKnown directory
Applied to files:
packages/config-parser/src/utils.ts
📚 Learning: 2026-03-17T11:22:06.022Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/db/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:06.022Z
Learning: Applies to packages/matrix-identity-server/src/db/db/index.ts : Add new identity server tables to the `Collections` enum in `db/index.ts`
Applied to files:
packages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:20:56.983Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/db/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:56.983Z
Learning: Applies to packages/db/src/db/src/database.ts : In `db/src/database.ts`, implement the `Database` base class for connection management and query interface
Applied to files:
packages/matrix-identity-server/src/db/sql/pg.ts
📚 Learning: 2026-03-17T11:20:56.983Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/db/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:56.983Z
Learning: Applies to packages/db/src/db/src/sql/sql.ts : In `db/src/sql/sql.ts`, implement base SQL utilities and shared query logic
Applied to files:
packages/matrix-identity-server/src/db/sql/pg.ts
🔇 Additional comments (4)
packages/config-parser/src/utils.ts (1)
12-19: Good fix — this is the right blunt tool for the legacy parser.
JSON.parsewith raw-string fallback solves typed env overrides (booleans/objects) without breaking non-JSON values.Based on learnings: in this legacy path,
JSON.parse()fallback is intentional, and boolean env overrides are documented astrue/false(not1/0).packages/matrix-identity-server/src/db/sql/pg.ts (2)
106-121: Good: the pool is no longer published before it is proven alive.
this.dbonly gets assigned after the verified-pool path resolves, so failed startup no longer leaves a stale pool behind.
156-161: Good:exists()now tells the truth on failure.Rejecting here surfaces real schema or connectivity errors instead of quietly pretending the table is missing.
packages/matrix-identity-server/src/matrixDb/sql/pg.ts (1)
66-73: Good: MatrixDB now reuses the verified-pool path.Same initialization rule, same live probe, no half-initialized
this.db.
There was a problem hiding this comment.
LGTM, thx @MontaGhanmy!
You can rebase and merge when you want 👌

What
oldParserin@twake/config-parserto correctly parse JSON and booleanvalues from environment variables instead of storing raw strings
SELECT 1) to bothMatrixDBPgandIdentityServerDb:Pgpool creation, replacing the misleading "connected" logthat fired before any actual connection was made
pool.on('error')handlers to surface background pool failuresexists()silently swallowing query errors (including SSL handshakefailures) by resolving
false. Now properly rejectsWhy
Tom was crash-looping in production when connecting to OVH managed PostgreSQL
over SSL. The failure was invisible because:
DATABASE_SSL=truewas stored as the string"true"by the config parser,causing
node-postgresto reject OVH's private CA cert(
SELF_SIGNED_CERT_IN_CHAIN)DATABASE_SSL={"rejectUnauthorized":false}was overwritten from a parsedobject back to a raw string, crashing pg with
TypeError: Cannot use 'in' operatorpg.Poolcreation logged "connected" without connecting,exists()swallowedSSL errors as "table doesn't exist".
How
Config parser (
packages/config-parser/src/utils.ts):oldParsernow runsJSON.parse()on env var values before storing, withfallback to raw string on parse failure
Connection pools (
packages/matrix-identity-server/src/db/sql/pg.ts,packages/matrix-identity-server/src/matrixDb/sql/pg.ts):disabled,enabled,object, orunexpected(...))SELECT 1after pool creation to verify the connectionpool.on('error')for background failure visibilityexists()now rejects on error instead of silently resolvingfalseTest Plan
npm run testinpackages/config-parser: 34/34 tests passDATABASE_SSLunset: boots normally, logsSSL: disabled,Connection verified,listening on port: 3000DATABASE_SSL={"rejectUnauthorized":false}: logsSSL: object, attempts real SSL connection (fails correctly on non-SSLpostgres with clear error message)
Files Changed
packages/config-parser/src/utils.tsoldParserJSON.parse env varspackages/matrix-identity-server/src/db/sql/pg.tspackages/matrix-identity-server/src/matrixDb/sql/pg.ts