Skip to content

Introduces Coding Standards and Contribution Guidelines#341

Merged
pm-McFly merged 18 commits intodevfrom
chore/contributing/updates-documents-and-gh-templates
Mar 23, 2026
Merged

Introduces Coding Standards and Contribution Guidelines#341
pm-McFly merged 18 commits intodevfrom
chore/contributing/updates-documents-and-gh-templates

Conversation

@pm-McFly
Copy link
Copy Markdown
Collaborator

@pm-McFly pm-McFly commented Mar 18, 2026

Establishes the foundational contribution infrastructure for the project:

  • Coding style — opinionated JS/TS guide covering formatting, naming, functions, types, control flow, error handling, async patterns, and forbidden patterns. Every rule includes a stated reason; no rule is asserted without justification.
  • Contributing guidelines — explains how to propose changes, the review process, and the principle that this document evolves through argued pull requests, not preference.
  • PR and issue templates — standardise contributions from the start.
  • biome.json — mechanically enforces the subset of rules the linter can cover.

Why Biome over ESLint + Prettier

The short version: one tool, one config, one fast binary, zero plugin dependency hell.

Single tool, single pass. ESLint handles linting. Prettier handles formatting. They don't know about each other, which means you need eslint-config-prettier to turn off the ESLint rules that conflict with Prettier's output, and eslint-plugin-prettier if you want Prettier violations to surface as lint errors. That is two tools solving one problem, with a shim between them to stop them fighting. Biome formats and lints in a single pass with a single config file.

Speed. Biome is written in Rust and runs the formatter and linter concurrently. On a large codebase it is typically 10–25× faster than the ESLint + Prettier stack. This matters in CI and in pre-commit hooks — slow tooling gets disabled or skipped.

No plugin ecosystem to maintain. An ESLint setup for a TypeScript project typically pulls in @typescript-eslint/parser, @typescript-eslint/eslint-plugin, eslint-plugin-import, eslint-plugin-unicorn, and others. Each plugin has its own release cadence, its own breaking changes, and its own compatibility matrix with the ESLint version. Biome ships all of this in one versioned package. Upgrading is one line in package.json.

Stable, opinionated defaults. Prettier's formatting is largely non-configurable by design. ESLint's rule surface is enormous and requires deliberate curation. Biome strikes a middle ground: the formatter is opinionated (with a small set of meaningful options), and the linter ships a well-reasoned recommended ruleset that maps closely to this style guide. The rules we care about — noExplicitAny, noDoubleEquals, noConsole, useMaxParams, noFloatingPromises — are first-class, not community plugins.

The trade-off. Biome's rule coverage is narrower than the combined ESLint plugin ecosystem. Some rules in this style guide — as unknown as T, the Result/ActionResult return pattern, tail-call recursion — cannot be enforced by Biome today. They remain review-time concerns. This is an acceptable trade for the reduction in tooling complexity.

Fundamental issue

Tooling sprawl and inconsistent enforcement: multiple overlapping format/lint hooks (ESLint + Prettier + Husky) slowed CI, fractured rules across tools, and required ad-hoc reviewer enforcement. This PR consolidates to a single, mechanical tool (Biome) and codifies contribution/coding standards so CI and local checks are fast, consistent, and maintainable.

Systemic changes (data flow / core logic)

  • Linter/formatter unified: added biome.json, replaced root scripts with biome check / biome check --write, added per-package check scripts, and added devDependency @biomejs/biome@2.4.8.
  • CI refactor: introduced reusable workflows and composite actions (build-affected, build, _build-affected.yml, _build.yml, _test.yml, _lint.yml), standardized Nx invocations (npx nx run-many / npx nx affected), added skip-nx-cache and upload-artifacts inputs, and made artifact names run-specific. CI now runs Build before Test and forwards NX_CLOUD_ACCESS_TOKEN where required.
  • Nx/caching: updated nx.json to tighten inputs (JS/TS globs + workspace biome.json) for correct cache invalidation and pruned legacy targetDefaults.
  • Local hooks to CI: removed Husky pre-commit/pre-push hooks and moved enforcement to Biome + CI.
  • Process/docs: added CODING_STYLE.md and CONTRIBUTING.md, PR/issue templates, and a PR template enforcing checklists and Conventional Commits.

Deleted / deprecated tooling and legacy code

  • Removed ESLint/Prettier/Husky configs and ignores: deleted .eslintrc.cjs, .prettierrc, .prettierignore, .husky/pre-commit, .husky/pre-push.
  • Removed related devDependencies and npm scripts (format:*, lint, lint-fix, prepare, postinstall diffs).
  • Workflows updated to replace format/lint steps with Biome check and to adapt Nx workflow inputs/outputs.
  • Per-package changes: normalized test invocations to set LOG_TRANSPORTS=File LOG_FILE=/dev/null and added biome check . scripts across packages.

Deprecated runtime APIs / public surface changes

  • None. No public APIs or exported runtime code were modified.

Explicitly ignored technical debt (acknowledged)

  • Biome cannot enforce higher-level semantic/architectural rules from CODING_STYLE.md. The team accepts that reviewers must still enforce, by code review, rules such as:
    • banning any in ambiguous contexts, double-casts (as unknown as T), undocumented @ts-ignore/@ts-expect-error;
    • Result/ActionResult error-handling discipline and boundary throw semantics;
    • recursion constraints, cognitive-complexity limits, and other architectural/design rules.
      This is an intentional trade-off: faster, simpler tooling for mechanical checks; some semantics remain human-enforced.

Other notable changes

  • Large docs added: CODING_STYLE.md (~1k lines) and CONTRIBUTING.md (~220 lines).
  • biome.json encodes many former lint rules (noExplicitAny, noDoubleEquals, noConsole, max params, noFloatingPromises, complexity caps, import organization).
  • Minor documentation updates: AGENTS.md, CLAUDE.md, workflow docs, and new GitHub issue/PR templates.

Bottom line: remove brittle ESLint+Prettier+Husky stack, centralize mechanical checks in Biome, refactor CI to a build-then-test flow with correct Nx caching, and document coding/review rules that remain manual.

@pm-McFly pm-McFly self-assigned this Mar 18, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 18, 2026

📝 Walkthrough

Walkthrough

Removed ESLint/Prettier/Husky configs and hooks; replaced with Biome config and Biome-driven scripts; added CONTRIBUTING/CODING_STYLE and issue/PR templates; introduced reusable and composite workflows for affected builds/tests with skip-nx-cache and NX_CLOUD_ACCESS_TOKEN wiring; added per-package biome check scripts and test env tweaks.

Changes

Cohort / File(s) Summary
Removed lint/format configs & hooks
\.eslintrc.cjs, \.prettierrc, \.prettierignore, \.husky/pre-commit, \.husky/pre-push
Deleted ESLint/Prettier configuration and Husky hook scripts.
Biome configuration
biome.json
Added Biome formatting and linter configuration (format rules, linter rule groups, assists).
Root scripts & devDependencies
package.json
Replaced ESLint/Prettier/Husky toolchain with Biome: removed ESLint/Prettier/Husky devDeps; added @biomejs/biome; added check/check:fix scripts.
Per-package scripts
packages/*/package.json (e.g., packages/amqp-connector/package.json, packages/...)
Added check = biome check . to many packages; standardized test scripts to run Jest with LOG_TRANSPORTS=File LOG_FILE=/dev/null (minor punctuation edits in some packages).
Nx config
nx.json
Reformatted namedInputs/targetDefaults; removed nxCloudAccessToken and added nxCloudId; simplified/removed many legacy targetDefaults; updated test and check target defaults and caching inputs.
Reusable workflows & CI wiring
.github/workflows/_build-affected.yml, .github/workflows/_build.yml, .github/workflows/_test.yml, .github/workflows/_test-ci.yml, .github/workflows/_lint.yml, .github/workflows/ci.yml, .github/workflows/release.yml
Added _build-affected workflow; propagated skip-nx-cache input and NX_CLOUD_ACCESS_TOKEN secret; switched some steps to npx nx run-many/nx affected and to check; added build job and wired test to depend on it.
Composite GitHub Actions
.github/actions/build-affected/action.yml, .github/actions/build/action.yml
New/updated composite actions to run Nx builds with conditional --skip-nx-cache and optional artifact upload named with github.run_id.
Issue & PR templates
.github/ISSUE_TEMPLATE/bug_report.yml, .github/ISSUE_TEMPLATE/feature_request.yml, .github/pull_request_template.md
Added structured bug and feature issue forms and a PR template with checklists and required fields.
Contributor & coding docs
CONTRIBUTING.md, CODING_STYLE.md, AGENTS.md, CLAUDE.md, .github/workflows/AGENTS.md
Added CONTRIBUTING and comprehensive CODING_STYLE; updated AGENTS.md and CLAUDE.md to reflect Biome and remove previous lint/format references; formatting edits.
Misc CI docs/formatting
.github/workflows/AGENTS.md, AGENTS.md, CLAUDE.md
Documentation and table formatting adjustments; removed references to ESLint/Prettier where applicable.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the primary changes: comprehensive documentation of coding standards and contribution guidelines added alongside tooling migration from ESLint/Prettier to Biome.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pm-McFly pm-McFly force-pushed the chore/contributing/updates-documents-and-gh-templates branch from d9eee17 to 3b312c2 Compare March 18, 2026 19:09
@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Mar 18, 2026

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit 80cdf4d

Command Status Duration Result
nx affected -t check ❌ Failed 11s View ↗
nx affected -t test ✅ Succeeded 2s View ↗
nx affected -t build ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-23 08:56:23 UTC

@pm-McFly pm-McFly force-pushed the chore/contributing/updates-documents-and-gh-templates branch 3 times, most recently from 189a519 to ffcc91f Compare March 18, 2026 20:32
@pm-McFly pm-McFly marked this pull request as ready for review March 18, 2026 20:35
@pm-McFly pm-McFly force-pushed the chore/contributing/updates-documents-and-gh-templates branch from ffcc91f to 94d5674 Compare March 18, 2026 20:37
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 26

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
AGENTS.md (1)

33-33: ⚠️ Potential issue | 🟡 Minor

Stale documentation: Husky was removed in this PR.

You're documenting a .husky/ directory that no longer exists. The PR removes Husky entirely. Either delete this line or update it to reflect reality—dead documentation is worse than no documentation.

Suggested fix
-| `.husky/` | Git hooks: `pre-commit` (lint), `pre-push` (test) |

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 691b51ce-c8a9-4d3b-ac8a-42d16dee7f95

📥 Commits

Reviewing files that changed from the base of the PR and between 3e28a0a and ffcc91f.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (35)
  • .eslintrc.cjs
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/ISSUE_TEMPLATE/feature_request.yml
  • .github/actions/build-affected/action.yml
  • .github/actions/build/action.yml
  • .github/pull_request_template.md
  • .github/workflows/AGENTS.md
  • .github/workflows/_build-affected.yml
  • .github/workflows/_build.yml
  • .github/workflows/_lint.yml
  • .github/workflows/_test-ci.yml
  • .github/workflows/_test.yml
  • .github/workflows/ci.yml
  • .husky/pre-commit
  • .husky/pre-push
  • .prettierignore
  • .prettierrc
  • AGENTS.md
  • CLAUDE.md
  • CODING_STYLE.md
  • CONTRIBUTING.md
  • biome.json
  • nx.json
  • package.json
  • packages/amqp-connector/package.json
  • packages/common-settings-bridge/package.json
  • packages/config-parser/package.json
  • packages/crypto/package.json
  • packages/db/package.json
  • packages/federated-identity-service/package.json
  • packages/logger/package.json
  • packages/matrix-identity-server/package.json
  • packages/matrix-resolve/package.json
  • packages/tom-server/package.json
  • packages/utils/package.json
💤 Files with no reviewable changes (5)
  • .prettierignore
  • .eslintrc.cjs
  • .husky/pre-commit
  • .husky/pre-push
  • .prettierrc
📜 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 (3)
packages/*/package.json

📄 CodeRabbit inference engine (AGENTS.md)

packages/*/package.json: Each package must have its own package.json, tsconfig.json, and rollup.config.js configuration files
All inter-package dependencies must be managed via npm workspace protocol (using @twake/ naming convention)

packages/*/package.json: Each package must have its own package.json, tsconfig.json, rollup.config.js, and src/ directory
Each package uses the @twake/* workspace protocol for inter-package dependencies

Files:

  • packages/db/package.json
  • packages/config-parser/package.json
  • packages/tom-server/package.json
  • packages/logger/package.json
  • packages/amqp-connector/package.json
  • packages/utils/package.json
  • packages/crypto/package.json
  • packages/federated-identity-service/package.json
  • packages/matrix-resolve/package.json
  • packages/matrix-identity-server/package.json
  • packages/common-settings-bridge/package.json
packages/config-parser/**/package.json

📄 CodeRabbit inference engine (packages/config-parser/AGENTS.md)

@twake/config-parser must have zero runtime dependencies

Files:

  • packages/config-parser/package.json
package.json

📄 CodeRabbit inference engine (CLAUDE.md)

This is an npm workspaces + Lerna monorepo with ESM modules ("type": "module")

Files:

  • package.json
🧠 Learnings (68)
📓 Common learnings
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to package.json : This is an npm workspaces + Lerna monorepo with ESM modules (`"type": "module"`)
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to package.json : This is an npm workspaces + Lerna monorepo with ESM modules (`"type": "module"`)

Applied to files:

  • biome.json
  • AGENTS.md
  • packages/db/package.json
  • packages/config-parser/package.json
  • packages/tom-server/package.json
  • nx.json
  • packages/amqp-connector/package.json
  • packages/utils/package.json
  • packages/crypto/package.json
  • packages/federated-identity-service/package.json
  • packages/matrix-resolve/package.json
  • packages/matrix-identity-server/package.json
  • package.json
  • packages/common-settings-bridge/package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use .eslintrc.cjs configuration (TypeScript + Prettier) for code linting and formatting

Applied to files:

  • biome.json
  • CODING_STYLE.md
  • package.json
📚 Learning: 2026-03-17T11:19:38.170Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:38.170Z
Learning: Applies to packages/*/tsconfig.json : TypeScript configuration in each package follows the shared base `tsconfig.json` at the root

Applied to files:

  • biome.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx} : Enforce TypeScript strict mode across all packages

Applied to files:

  • biome.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx,mjs} : Use ES modules (`"type": "module"` in package.json) for all packages

Applied to files:

  • biome.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Use Jest for all unit and integration tests, extending jest-base.config.js configuration

Applied to files:

  • biome.json
  • packages/config-parser/package.json
  • packages/logger/package.json
  • packages/amqp-connector/package.json
  • packages/crypto/package.json
  • CLAUDE.md
  • .github/workflows/_test.yml
  • packages/matrix-resolve/package.json
  • packages/common-settings-bridge/package.json
📚 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:

  • biome.json
  • packages/config-parser/package.json
  • packages/logger/package.json
📚 Learning: 2026-03-17T11:23:35.727Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/admin-settings-api/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:35.727Z
Learning: Applies to packages/tom-server/src/admin-settings-api/admin-settings-api/**/*.ts : Admin-settings-api module structure should follow the pattern: index.ts for module export, routes/, controllers/, middlewares/, services/, tests/, and types.ts for type definitions

Applied to files:

  • AGENTS.md
📚 Learning: 2026-01-30T11:53:24.486Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 320
File: .compose/synapse/hs-config/cs-bridge.yaml:26-27
Timestamp: 2026-01-30T11:53:24.486Z
Learning: The `.compose/` directory contains Docker Compose configurations with hard-coded secrets intended only for local development and testing, not for production use.

Applied to files:

  • AGENTS.md
📚 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:

  • AGENTS.md
  • packages/tom-server/package.json
📚 Learning: 2026-03-17T11:23:21.167Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:21.167Z
Learning: Applies to packages/tom-server/src/src/types.ts : Global type definitions and shared interfaces must be defined in `types.ts`

Applied to files:

  • AGENTS.md
  • packages/tom-server/package.json
📚 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:

  • AGENTS.md
📚 Learning: 2026-03-17T11:23:21.167Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:21.167Z
Learning: Applies to packages/tom-server/src/**/*/routes/index.ts : Follow the module structure pattern: `module/routes/index.ts` defines the Express Router and imports from `controllers/` and `middlewares/`

Applied to files:

  • AGENTS.md
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/packages/tom-server/**/*.{ts,tsx} : Use Express framework for HTTP server implementation

Applied to files:

  • AGENTS.md
📚 Learning: 2026-03-17T11:23:35.727Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/admin-settings-api/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:35.727Z
Learning: Applies to packages/tom-server/src/admin-settings-api/admin-settings-api/tests/**/*.test.ts : Test files in admin-settings-api must cover controller, middleware, and service layers with separate test files: controller.test.ts, middleware.test.ts, and service.test.ts

Applied to files:

  • AGENTS.md
📚 Learning: 2026-03-17T11:19:38.170Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:38.170Z
Learning: Applies to packages/*/package.json : Each package must have its own `package.json`, `tsconfig.json`, `rollup.config.js`, and `src/` directory

Applied to files:

  • AGENTS.md
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js} : Tests should run with `LOG_TRANSPORTS=File LOG_FILE=/dev/null jest` to suppress log output

Applied to files:

  • packages/db/package.json
  • packages/config-parser/package.json
  • packages/tom-server/package.json
  • packages/amqp-connector/package.json
  • packages/utils/package.json
  • packages/crypto/package.json
  • packages/federated-identity-service/package.json
  • CLAUDE.md
  • packages/matrix-resolve/package.json
  • packages/matrix-identity-server/package.json
  • packages/common-settings-bridge/package.json
📚 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: Run tests using `npx nx run twake/logger:test`

Applied to files:

  • packages/db/package.json
  • packages/tom-server/package.json
  • packages/logger/package.json
  • .github/workflows/_lint.yml
  • packages/utils/package.json
  • .github/workflows/_test-ci.yml
  • packages/federated-identity-service/package.json
  • CLAUDE.md
  • .github/workflows/_test.yml
  • packages/matrix-resolve/package.json
  • packages/matrix-identity-server/package.json
📚 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: Test twake/config-parser using `npx nx run twake/config-parser:test`

Applied to files:

  • packages/db/package.json
  • packages/tom-server/package.json
  • packages/logger/package.json
  • packages/utils/package.json
  • .github/workflows/_test-ci.yml
  • packages/federated-identity-service/package.json
  • CLAUDE.md
  • .github/workflows/_test.yml
  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:24:55.383Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/utils/AGENTS.md:0-0
Timestamp: 2026-03-17T11:24:55.383Z
Learning: Run tests using `npx nx run twake/utils:test` command

Applied to files:

  • packages/db/package.json
  • packages/tom-server/package.json
  • packages/logger/package.json
  • .github/workflows/_lint.yml
  • packages/utils/package.json
  • .github/workflows/_test-ci.yml
  • packages/federated-identity-service/package.json
  • CLAUDE.md
  • .github/workflows/_test.yml
  • packages/matrix-identity-server/package.json
📚 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/src/index.ts : The main export file `src/index.ts` must export: `getLogger()`, `ETransportType`, `Config` type, and `TwakeLogger` type

Applied to files:

  • packages/db/package.json
  • packages/utils/package.json
📚 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: Run tests using `npx nx run twake/tom-server:test` to execute all unit and integration tests

Applied to files:

  • packages/db/package.json
  • packages/tom-server/package.json
  • packages/utils/package.json
  • .github/workflows/_test-ci.yml
  • packages/federated-identity-service/package.json
  • .github/workflows/_test.yml
  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to jest.config.{ts,js} : Jest config should map `twake/*` imports to local `packages/*/src` directories so tests run against source directly without building

Applied to files:

  • packages/db/package.json
  • packages/logger/package.json
  • packages/utils/package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Run npm build before running tests on a fresh checkout to ensure packages are built

Applied to files:

  • packages/db/package.json
  • packages/config-parser/package.json
  • packages/tom-server/package.json
  • packages/logger/package.json
  • packages/amqp-connector/package.json
  • .github/workflows/_test-ci.yml
  • packages/crypto/package.json
  • packages/federated-identity-service/package.json
  • CLAUDE.md
  • packages/matrix-resolve/package.json
  • packages/matrix-identity-server/package.json
  • package.json
  • .github/workflows/_build.yml
  • packages/common-settings-bridge/package.json
📚 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} : Type dependency-injected logger instances as `TwakeLogger` type alias for Winston's `Logger`

Applied to files:

  • packages/db/package.json
  • packages/utils/package.json
📚 Learning: 2026-03-17T11:20:04.027Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/common-settings-bridge/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:04.027Z
Learning: Use `npx nx run twake/common-settings-bridge:test` to run tests for this service

Applied to files:

  • packages/db/package.json
  • .github/workflows/_test-ci.yml
  • packages/federated-identity-service/package.json
  • .github/workflows/_test.yml
  • packages/matrix-identity-server/package.json
  • packages/common-settings-bridge/package.json
📚 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/package.json
  • packages/logger/package.json
📚 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/package.json
📚 Learning: 2026-03-17T11:20:10.724Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/common-settings-bridge/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:10.724Z
Learning: Applies to packages/common-settings-bridge/src/src/common-settings-bridge/**/*.test.ts : Use Jest for testing TypeScript code in the bridge module

Applied to files:

  • packages/config-parser/package.json
  • packages/logger/package.json
  • packages/amqp-connector/package.json
  • packages/crypto/package.json
  • CLAUDE.md
  • packages/matrix-resolve/package.json
  • package.json
  • packages/common-settings-bridge/package.json
📚 Learning: 2026-03-17T11:23:21.167Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:21.167Z
Learning: Applies to packages/tom-server/src/src/index.ts : All new API modules must be registered in `index.ts` (`_initServer()` method)

Applied to files:

  • packages/tom-server/package.json
📚 Learning: 2026-03-17T11:23:51.582Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:51.582Z
Learning: Run identity-server tests using the command: npx nx run twake/tom-server:test -- --testPathPattern=identity-server

Applied to files:

  • packages/tom-server/package.json
  • .github/workflows/_test-ci.yml
  • packages/federated-identity-service/package.json
  • .github/workflows/_test.yml
  • packages/matrix-identity-server/package.json
📚 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: TwakeServer is the deployable server binary that composes MatrixIdentityServer with 12 Twake-specific REST API modules into a single Express application

Applied to files:

  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:21:03.013Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/federated-identity-service/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:03.013Z
Learning: Run tests using npx nx run twake/federated-identity-service:test

Applied to files:

  • packages/tom-server/package.json
  • .github/workflows/_test-ci.yml
  • packages/federated-identity-service/package.json
  • .github/workflows/_test.yml
  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to rollup.config.{ts,js} : Packages should be built with Rollup

Applied to files:

  • packages/logger/package.json
  • packages/amqp-connector/package.json
  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.test.{ts,tsx} : Mock amqplib in tests — no live broker required for testing

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:52.544Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:52.544Z
Learning: Applies to packages/amqp-connector/src/amqp-connector/src/index.test.ts : Jest tests in index.test.ts must mock amqplib and cover connection lifecycle, reconnection, and error handling scenarios

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.{ts,tsx} : Use `twake/logger` (TwakeLogger type) for logging in the AMQP connector package

Applied to files:

  • packages/amqp-connector/package.json
  • packages/utils/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.{ts,tsx} : Use instanceof checks with exported error types (`AMQPConnectorError`, `ExchangeNotSpecifiedError`, `QueueNotSpecifiedError`, `MessageHandlerNotProvidedError`) for error handling

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.{ts,tsx} : Implement exponential backoff with jitter for reconnection logic in the AMQPConnector

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.{ts,tsx} : Use fluent builder pattern with methods `withConfig()`, `withExchange()`, `withQueue()`, `onMessage()` chained before calling `build()` for AMQPConnector configuration

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.{ts,tsx} : Handle channel recreation on failure in the AMQP connector

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:52.544Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:52.544Z
Learning: Applies to packages/amqp-connector/src/amqp-connector/src/types.ts : Type definitions for AmqpConfig, ReconnectionConfig, MessageHandler, and ConnectionState should be maintained in types.ts

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Build all packages using Lerna and Rollup; output goes to dist/ directory

Applied to files:

  • .github/actions/build/action.yml
  • CLAUDE.md
  • package.json
📚 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/utils/package.json
📚 Learning: 2026-03-17T11:23:29.212Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/addressbook-api/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:29.212Z
Learning: Run addressbook tests using: npx nx run twake/tom-server:test -- --testPathPattern=addressbook

Applied to files:

  • .github/workflows/_test-ci.yml
  • CLAUDE.md
  • .github/workflows/_test.yml
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx} : Use camelCase naming convention for variables and functions in TypeScript

Applied to files:

  • CODING_STYLE.md
📚 Learning: 2026-03-17T11:20:35.300Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:35.300Z
Learning: Applies to packages/crypto/**/*.{ts,tsx} : In the `twake/crypto` package, use `canonicalJson` to sort keys recursively before signing to ensure deterministic output

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:20:39.621Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:39.621Z
Learning: Applies to packages/crypto/src/crypto/src/**/*.{ts,tsx} : generateKeyPair uses tweetnacl for actual key generation and wraps result in { keyId, publicKey, privateKey }

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:20:35.300Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:35.300Z
Learning: The `twake/crypto` package exports: `Hash`, `generateKeyPair`, `signJson`, `canonicalJson`, `randomString`, `toBase64Url`, and `supportedHashes` from `src/index.ts`

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:20:39.621Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:39.621Z
Learning: Applies to packages/crypto/src/crypto/src/**/*.{ts,tsx} : canonicalJson is recursive and sorts object keys lexicographically

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:20:35.300Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:35.300Z
Learning: Applies to packages/crypto/**/*.{ts,tsx} : In the `twake/crypto` package, `signJson` mutates the input object in-place by adding a `signatures` field and returns the mutated object

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:23:29.212Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/addressbook-api/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:29.212Z
Learning: Applies to packages/tom-server/src/addressbook-api/tests/*.test.ts : Test files must follow the pattern controller.test.ts, middleware.test.ts, router.test.ts, service.test.ts in tests/ directory

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/src/**/*.ts : Implement `matrixResolve()` as a simple stateless API without caching for resolving Matrix homeserver addresses

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:20:10.724Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/common-settings-bridge/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:10.724Z
Learning: Applies to packages/common-settings-bridge/src/src/common-settings-bridge/**/*.test.ts : Mock the `matrix-appservice-bridge` library in Jest tests using the mock in `__mocks__/matrix-appservice-bridge.ts`

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/matrix-identity-server/package.json
  • packages/common-settings-bridge/package.json
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/src/index.ts : Export `matrixResolve()`, `MatrixResolve` class, `WellKnownMatrixServer` type, `MatrixResolveArgs`, and `CacheType` from `src/index.ts`

Applied to files:

  • packages/matrix-resolve/package.json
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/src/**/*.ts : Implement `MatrixResolve` class to support optional `toad-cache` LRU caching with configurable TTL and size parameters

Applied to files:

  • packages/matrix-resolve/package.json
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/**/*.test.ts : Mock `node-fetch` and DNS in tests — no network calls required for test execution

Applied to files:

  • packages/matrix-resolve/package.json
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/src/**/*.ts : Ensure `cacheReady` promise is awaited before calling `resolve()` when caching is enabled

Applied to files:

  • packages/matrix-resolve/package.json
📚 Learning: 2026-03-17T11:25:05.124Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/utils/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:25:05.124Z
Learning: Applies to packages/utils/src/utils/src/**/*.ts : Add new Matrix error codes to the `errCodes` object in `errors.ts` when needed, rather than hardcoding error strings elsewhere

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/matrix-identity-server/package.json
📚 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/package.json
📚 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/{account,3pid,lookup,terms,validate,keyManagement}/**/*.ts : All spec endpoints should be mounted at /_matrix/identity/v2/

Applied to files:

  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:22:12.102Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/keyManagement/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:12.102Z
Learning: Applies to packages/matrix-identity-server/src/keyManagement/keyManagement/**/*.ts : Use Ed25519 for public key management in the Matrix Identity Server

Applied to files:

  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:21:40.136Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:40.136Z
Learning: Applies to packages/matrix-identity-server/src/src/index.ts : Register new Matrix Identity Server endpoints in `index.ts` and mount them at `/_matrix/identity/v2/` prefix

Applied to files:

  • packages/matrix-identity-server/package.json
📚 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/validate/**/*.ts : Email sending requires SMTP config keys: smtp_server, smtp_port, smtp_user, smtp_password

Applied to files:

  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:23:51.582Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:51.582Z
Learning: Applies to packages/tom-server/src/identity-server/identity-server/{index.test,with-cache.test}.ts : Write integration tests for TwakeIdentityServer in index.test.ts and cache-enabled lookup behavior in with-cache.test.ts

Applied to files:

  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:19:38.170Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:38.170Z
Learning: Applies to packages/*/package.json : Each package uses the `twake/*` workspace protocol for inter-package dependencies

Applied to files:

  • package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to packages/*/package.json : All inter-package dependencies must be managed via npm workspace protocol (using twake/<name> naming convention)

Applied to files:

  • package.json
🪛 actionlint (1.7.11)
.github/workflows/_build.yml

[error] 37-37: could not parse action metadata in "/home/jailuser/git/.github/actions/build": line 5: unexpected key "type" for definition of input "skip-nx-cache"

(action)

🪛 LanguageTool
CODING_STYLE.md

[style] ~774-~774: Consider simply using “of” instead.
Context: ...y formatter, which means every consumer of any of those things gets pulled into the chang...

(OF_ANY_OF)

CONTRIBUTING.md

[uncategorized] ~45-~45: The official name of this software platform is spelled with a capital “H”.
Context: ...sue Use the appropriate issue template. Fill every field — spa...

(GITHUB)


[grammar] ~45-~45: Ensure spelling is correct
Context: ...ery field — sparse issues get closed or deprioritised. The template will guide you through wh...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~103-~103: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... as possible. | | priority::high | We want to do this soon. | | priority::normal | ...

(REP_WANT_TO_VB)


[uncategorized] ~144-~144: The official name of this software platform is spelled with a capital “H”.
Context: ... ### Opening a PR Use the PR template. Link the iss...

(GITHUB)

🪛 markdownlint-cli2 (0.21.0)
.github/pull_request_template.md

[warning] 6-6: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 26-26: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

CONTRIBUTING.md

[warning] 164-164: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 176-176: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 206-206: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (28)
CLAUDE.md (1)

223-223: Marker cleanup is fine.

Doc-only change, no functional risk.

packages/db/package.json (1)

38-39: Script updates look solid.

test now suppresses noisy logs and check enables package-local Biome validation.

.github/workflows/_test-ci.yml (1)

18-18: Job naming is clearer now.

“Test Affected Packages” better reflects actual scope.

packages/federated-identity-service/package.json (1)

38-39: Good consistency update for package scripts.

The test and check commands align with the new repo-wide workflow.

packages/common-settings-bridge/package.json (1)

10-12: Nice cleanup of package scripts.

This matches the Biome rollout and keeps tests quieter in CI.

packages/tom-server/package.json (1)

39-40: Good, this is aligned with the monorepo direction.

test and check scripts are consistent with the new standards.

packages/crypto/package.json (1)

37-38: Solid package script update.

No issues in this change set.

packages/utils/package.json (1)

49-50: LGTM — test script correctly suppresses logs.

The LOG_TRANSPORTS=File value matches the case-sensitive enum (ETransportType.FILE = 'File') and /dev/null cleanly discards output. The check script aligns with the repo-wide Biome migration.

packages/config-parser/package.json (1)

55-56: LGTM — zero runtime dependencies preserved.

Scripts are correct. The package maintains zero runtime dependencies as required by coding guidelines. As per coding guidelines: "@twake/config-parser must have zero runtime dependencies".

packages/amqp-connector/package.json (1)

10-11: LGTM.

Standard script updates consistent with the repo-wide Biome migration. Log suppression correctly configured.

packages/matrix-resolve/package.json (1)

37-38: LGTM.

Script updates are consistent with the repo-wide pattern. Log suppression correctly configured.

biome.json (1)

2-2: Schema version 2.4.8 exists and is accessible—no action required.

The schema URL resolves successfully with HTTP 200. The config validates fine.

.github/workflows/AGENTS.md (1)

19-19: LGTM.

Documentation accurately reflects the workflow's new behavior. Clean.

packages/matrix-identity-server/package.json (1)

40-41: LGTM.

Consistent with the repo-wide Biome migration. The check script aligns with the nx.json target definition and other packages.

nx.json (2)

25-34: Solid cache invalidation setup for the check target.

Including {workspaceRoot}/biome.json in the inputs is the right call—rule changes will properly bust the cache. The file patterns align with what Biome is configured to lint.


21-24: Test target depends on ^build—intentional?

The dependsOn: ["^build"] means tests wait for upstream packages to build first. This is correct for integration tests but might slow down unit tests that don't need built dependencies. If this was working before, carry on. If test times balloon, revisit.

.github/workflows/_lint.yml (2)

27-28: LGTM—correctly invokes the Biome check target.

The nx affected -t check properly resolves to the Biome check command via the target definition in nx.json.


14-14: continue-on-error: true makes lint failures non-blocking.

This means broken lint won't fail CI. If that's intentional during migration, fine—but don't forget to flip it back to false once the codebase is clean, or you'll be playing whack-a-mole with lint violations forever.

.github/ISSUE_TEMPLATE/bug_report.yml (1)

1-89: Well-structured bug report template.

Clear required fields, sensible severity scale, proper YAML structure. This will actually get useful bug reports instead of "it's broken plz fix."

CONTRIBUTING.md (1)

20-28: Philosophy section is gold.

Simplicity over cleverness, explicit over implicit, boundaries over conventions. This is how you write maintainable code. If every codebase had this ethos, I'd have fewer gray hairs.

package.json (1)

22-36: ESLint/Prettier purge is complete.

No orphaned configs, no stale scripts, no Husky ghosts. Single tool, single config, faster execution. This is how tooling migrations should be done.

CODING_STYLE.md (5)

1-30: Solid foundation document. Respect the brutal honesty about subjectivity.

The preface sets the right tone — acknowledging that style is opinion while still enforcing it as law during review. The "merge first, argue later" policy (lines 25-29) is the only sane way to run a codebase. I've seen too many projects devolve into bikeshedding purgatory.

The principle that code is for humans first (line 19-23) should be tattooed on every developer's forearm.


235-294: The void prohibition is aggressive — I like it.

Most codebases are littered with void functions that leave callers guessing whether the operation succeeded. The ActionResult pattern forces explicit success/failure handling. The exemption for framework callbacks (lines 290-293) is the right escape hatch.

One edge case to consider: event handlers in frameworks like Express middleware that call next() — these inherently don't "return" success to their direct caller. The exemption covers this, but you might want to explicitly call out middleware patterns.


463-476: The as Direction exception is well-justified.

Lines 466-467 demonstrate the one acceptable type assertion: after membership is proven via runtime check. The inline comment requirement (line 475) ensures future readers understand why this cast isn't violating the rules. This is the difference between "trust me" casting and "I just proved it" casting.


579-612: The exceptions-vs-results distinction is the most valuable section in this document.

I've reviewed codebases where "user not found" throws an exception, forcing every caller into try/catch for a completely routine database query result. The decision table at lines 754-765 should be printed and posted above every developer's monitor.


1038-1045: console.log prohibition is correct. Fight me.

I've debugged production incidents where the only "logging" was console.log statements that got swallowed by process managers, had no timestamps, no correlation IDs, and no way to filter by severity. The one-import cost of pino or equivalent pays for itself the first time you need to debug a 3 AM incident.

.github/workflows/_build.yml (1)

33-34: Good addition of nrwl/nx-set-shas@v4.

This correctly sets up the base/head SHAs for Nx affected commands, enabling proper incremental builds. Essential for monorepo efficiency.

.github/workflows/_build-affected.yml (1)

31-34: The build-affected action exists and is correctly referenced.

.github/actions/build-affected/action.yml is a real, separate action that properly accepts the upload-artifacts input. No changes needed.

			> Likely an incorrect or invalid review comment.

Comment thread .github/actions/build-affected/action.yml
Comment thread .github/actions/build-affected/action.yml Outdated
Comment thread .github/actions/build/action.yml Outdated
Comment thread .github/actions/build/action.yml
Comment thread .github/ISSUE_TEMPLATE/bug_report.yml
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread package.json Outdated
Comment thread package.json
Comment thread packages/logger/package.json
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (7)
.github/workflows/_build-affected.yml (1)

18-18: ⚠️ Potential issue | 🟠 Major

Stop masking build failures at the job level.

Line 18 turns a failing build into a non-blocking signal, so CI gating is unreliable for downstream jobs.

🔧 Minimal fix
   build:
     name: Build Affected Packages
     runs-on: ubuntu-latest
-    continue-on-error: true
     steps:
In GitHub Actions reusable workflows, does `continue-on-error: true` on a job allow downstream `needs` jobs to proceed as if successful?
.github/workflows/_test.yml (1)

33-33: ⚠️ Potential issue | 🔴 Critical

Line 33 wires --skip-nx-cache to the wrong process.

-- --skip-nx-cache goes to the test executor, not Nx. Put the flag directly on the Nx command.

🔧 Fix
-        run: npx nx run-many -t test ${{ inputs.skip-nx-cache && '-- --skip-nx-cache' || '' }}
+        run: npx nx run-many -t test ${{ inputs.skip-nx-cache && '--skip-nx-cache' || '' }}
For `npx nx run-many -t test`, should `--skip-nx-cache` be passed as a top-level Nx flag (not after `--`)?
.github/workflows/_build.yml (1)

23-23: ⚠️ Potential issue | 🟠 Major

Line 23 makes build failures non-fatal.

This job should fail hard in CI unless you intentionally want advisory-only builds.

🔧 Fix
   build:
     name: Build
     runs-on: ubuntu-latest
-    continue-on-error: true
     steps:
In GitHub Actions, what is the exact effect of job-level `continue-on-error: true` on workflow success and downstream `needs`?
.github/workflows/_test-ci.yml (1)

36-36: ⚠️ Potential issue | 🔴 Critical

Line 36: skip-cache flag is misplaced and ineffective.

-- --skip-nx-cache is not consumed by Nx; it must be passed as a top-level Nx option.

🔧 Fix
-        run: npx nx affected -t test ${{ inputs.skip-nx-cache && '-- --skip-nx-cache' || '' }}
+        run: npx nx affected -t test ${{ inputs.skip-nx-cache && '--skip-nx-cache' || '' }}
For `nx affected -t test`, is `--skip-nx-cache` only effective when passed before `--` as an Nx CLI option?
.github/actions/build/action.yml (2)

5-9: ⚠️ Potential issue | 🔴 Critical

Composite action input schema is invalid at Line 8.

type is not supported for composite action inputs. Also, Line 6 says “running tests” in a build action.

🔧 Fix
 inputs:
   skip-nx-cache:
-    description: 'Skip nx cache when running tests'
+    description: 'Skip nx cache when building'
     required: false
-    type: boolean
-    default: false
+    default: 'false'
In GitHub composite actions (`action.yml`), which keys are valid under `inputs`? Is `type` supported there or only in `workflow_call`?

18-18: ⚠️ Potential issue | 🔴 Critical

Line 18 has broken skip-cache wiring (logic + flag position).

Two problems: composite action inputs are strings, so a plain truthy check is unsafe, and -- --skip-nx-cache sends the flag away from Nx.

🔧 Fix
-      run: npx nx run-many -t build ${{ inputs.skip-nx-cache && '-- --skip-nx-cache' || '' }}
+      run: npx nx run-many -t build ${{ inputs.skip-nx-cache == 'true' && '--skip-nx-cache' || '' }}
For Nx `run-many`, should `--skip-nx-cache` be passed as a top-level Nx flag, and in GitHub composite actions are input values treated as strings (`'true'/'false'`)?
packages/logger/package.json (1)

38-39: ⚠️ Potential issue | 🟡 Minor

Line 38 still ignores the repo’s test log-suppression contract.

You added Biome on Line 39, good. But Line 38 remains plain jest, so this package still drifts from the standardized test command.

Suggested fix
-    "test": "jest",
+    "test": "LOG_TRANSPORTS=File LOG_FILE=/dev/null jest",
     "check": "biome check ."

Based on learnings: Applies to **/*.{test,spec}.{ts,tsx,js} : Tests should run with LOG_TRANSPORTS=File LOG_FILE=/dev/null jest to suppress log output.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c288c609-1d53-4d7d-afec-12afcacf88bf

📥 Commits

Reviewing files that changed from the base of the PR and between ffcc91f and 94d5674.

📒 Files selected for processing (22)
  • .github/actions/build-affected/action.yml
  • .github/actions/build/action.yml
  • .github/workflows/_build-affected.yml
  • .github/workflows/_build.yml
  • .github/workflows/_lint.yml
  • .github/workflows/_test-ci.yml
  • .github/workflows/_test.yml
  • .github/workflows/ci.yml
  • biome.json
  • nx.json
  • package.json
  • packages/amqp-connector/package.json
  • packages/common-settings-bridge/package.json
  • packages/config-parser/package.json
  • packages/crypto/package.json
  • packages/db/package.json
  • packages/federated-identity-service/package.json
  • packages/logger/package.json
  • packages/matrix-identity-server/package.json
  • packages/matrix-resolve/package.json
  • packages/tom-server/package.json
  • packages/utils/package.json
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
packages/*/package.json

📄 CodeRabbit inference engine (AGENTS.md)

packages/*/package.json: Each package must have its own package.json, tsconfig.json, and rollup.config.js configuration files
All inter-package dependencies must be managed via npm workspace protocol (using @twake/ naming convention)

packages/*/package.json: Each package must have its own package.json, tsconfig.json, rollup.config.js, and src/ directory
Each package uses the @twake/* workspace protocol for inter-package dependencies

Files:

  • packages/matrix-resolve/package.json
  • packages/db/package.json
  • packages/logger/package.json
  • packages/crypto/package.json
  • packages/config-parser/package.json
  • packages/tom-server/package.json
  • packages/amqp-connector/package.json
  • packages/federated-identity-service/package.json
  • packages/matrix-identity-server/package.json
  • packages/utils/package.json
  • packages/common-settings-bridge/package.json
packages/config-parser/**/package.json

📄 CodeRabbit inference engine (packages/config-parser/AGENTS.md)

@twake/config-parser must have zero runtime dependencies

Files:

  • packages/config-parser/package.json
package.json

📄 CodeRabbit inference engine (CLAUDE.md)

This is an npm workspaces + Lerna monorepo with ESM modules ("type": "module")

Files:

  • package.json
🧠 Learnings (61)
📓 Common learnings
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to package.json : This is an npm workspaces + Lerna monorepo with ESM modules (`"type": "module"`)
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/src/**/*.ts : Implement `matrixResolve()` as a simple stateless API without caching for resolving Matrix homeserver addresses

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js} : Tests should run with `LOG_TRANSPORTS=File LOG_FILE=/dev/null jest` to suppress log output

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/db/package.json
  • packages/logger/package.json
  • packages/crypto/package.json
  • .github/workflows/_test-ci.yml
  • packages/config-parser/package.json
  • packages/tom-server/package.json
  • packages/amqp-connector/package.json
  • packages/federated-identity-service/package.json
  • packages/matrix-identity-server/package.json
  • .github/workflows/_test.yml
  • packages/utils/package.json
  • packages/common-settings-bridge/package.json
📚 Learning: 2026-03-17T11:20:10.724Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/common-settings-bridge/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:10.724Z
Learning: Applies to packages/common-settings-bridge/src/src/common-settings-bridge/**/*.test.ts : Mock the `matrix-appservice-bridge` library in Jest tests using the mock in `__mocks__/matrix-appservice-bridge.ts`

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/logger/package.json
  • packages/common-settings-bridge/package.json
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/**/*.test.ts : Mock `node-fetch` and DNS in tests — no network calls required for test execution

Applied to files:

  • packages/matrix-resolve/package.json
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/src/**/*.ts : Implement `MatrixResolve` class to support optional `toad-cache` LRU caching with configurable TTL and size parameters

Applied to files:

  • packages/matrix-resolve/package.json
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/src/index.ts : Export `matrixResolve()`, `MatrixResolve` class, `WellKnownMatrixServer` type, `MatrixResolveArgs`, and `CacheType` from `src/index.ts`

Applied to files:

  • packages/matrix-resolve/package.json
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/src/**/*.ts : Ensure `cacheReady` promise is awaited before calling `resolve()` when caching is enabled

Applied to files:

  • packages/matrix-resolve/package.json
📚 Learning: 2026-03-17T11:25:05.124Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/utils/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:25:05.124Z
Learning: Applies to packages/utils/src/utils/src/**/*.ts : Add new Matrix error codes to the `errCodes` object in `errors.ts` when needed, rather than hardcoding error strings elsewhere

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:20:10.724Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/common-settings-bridge/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:10.724Z
Learning: Applies to packages/common-settings-bridge/src/src/common-settings-bridge/**/*.test.ts : Use Jest for testing TypeScript code in the bridge module

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/logger/package.json
  • packages/crypto/package.json
  • packages/config-parser/package.json
  • packages/amqp-connector/package.json
  • packages/common-settings-bridge/package.json
  • package.json
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to package.json : This is an npm workspaces + Lerna monorepo with ESM modules (`"type": "module"`)

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/crypto/package.json
  • packages/config-parser/package.json
  • packages/tom-server/package.json
  • packages/amqp-connector/package.json
  • biome.json
  • packages/federated-identity-service/package.json
  • packages/matrix-identity-server/package.json
  • nx.json
  • packages/utils/package.json
  • packages/common-settings-bridge/package.json
  • package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Run npm build before running tests on a fresh checkout to ensure packages are built

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/db/package.json
  • packages/logger/package.json
  • packages/crypto/package.json
  • .github/workflows/_test-ci.yml
  • .github/workflows/ci.yml
  • packages/config-parser/package.json
  • packages/tom-server/package.json
  • packages/amqp-connector/package.json
  • .github/workflows/_build.yml
  • packages/federated-identity-service/package.json
  • packages/matrix-identity-server/package.json
  • packages/common-settings-bridge/package.json
  • package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Use Jest for all unit and integration tests, extending jest-base.config.js configuration

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/logger/package.json
  • packages/crypto/package.json
  • packages/config-parser/package.json
  • packages/amqp-connector/package.json
  • biome.json
  • .github/workflows/_test.yml
  • packages/common-settings-bridge/package.json
📚 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: Run tests using `npx nx run twake/logger:test`

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/db/package.json
  • packages/logger/package.json
  • .github/workflows/_test-ci.yml
  • packages/tom-server/package.json
  • .github/workflows/_lint.yml
  • packages/federated-identity-service/package.json
  • packages/matrix-identity-server/package.json
  • .github/workflows/_test.yml
  • packages/utils/package.json
📚 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: Test twake/config-parser using `npx nx run twake/config-parser:test`

Applied to files:

  • packages/db/package.json
  • packages/logger/package.json
  • .github/workflows/_test-ci.yml
  • packages/config-parser/package.json
  • packages/tom-server/package.json
  • packages/federated-identity-service/package.json
  • packages/matrix-identity-server/package.json
  • .github/workflows/_test.yml
  • packages/utils/package.json
📚 Learning: 2026-03-17T11:24:55.383Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/utils/AGENTS.md:0-0
Timestamp: 2026-03-17T11:24:55.383Z
Learning: Run tests using `npx nx run twake/utils:test` command

Applied to files:

  • packages/db/package.json
  • packages/logger/package.json
  • .github/workflows/_test-ci.yml
  • packages/tom-server/package.json
  • .github/workflows/_lint.yml
  • packages/federated-identity-service/package.json
  • packages/matrix-identity-server/package.json
  • .github/workflows/_test.yml
  • packages/utils/package.json
📚 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/src/index.ts : The main export file `src/index.ts` must export: `getLogger()`, `ETransportType`, `Config` type, and `TwakeLogger` type

Applied to files:

  • packages/db/package.json
  • packages/utils/package.json
📚 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: Run tests using `npx nx run twake/tom-server:test` to execute all unit and integration tests

Applied to files:

  • packages/db/package.json
  • .github/workflows/_test-ci.yml
  • packages/tom-server/package.json
  • packages/federated-identity-service/package.json
  • packages/matrix-identity-server/package.json
  • .github/workflows/_test.yml
  • packages/utils/package.json
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to jest.config.{ts,js} : Jest config should map `twake/*` imports to local `packages/*/src` directories so tests run against source directly without building

Applied to files:

  • packages/db/package.json
  • packages/logger/package.json
  • packages/utils/package.json
📚 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} : Type dependency-injected logger instances as `TwakeLogger` type alias for Winston's `Logger`

Applied to files:

  • packages/db/package.json
  • packages/utils/package.json
📚 Learning: 2026-03-17T11:20:04.027Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/common-settings-bridge/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:04.027Z
Learning: Use `npx nx run twake/common-settings-bridge:test` to run tests for this service

Applied to files:

  • packages/db/package.json
  • .github/workflows/_test-ci.yml
  • packages/federated-identity-service/package.json
  • packages/matrix-identity-server/package.json
  • .github/workflows/_test.yml
  • packages/common-settings-bridge/package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Build all packages using Lerna and Rollup; output goes to dist/ directory

Applied to files:

  • .github/actions/build/action.yml
  • package.json
📚 Learning: 2026-03-17T11:21:21.409Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/logger/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:21.409Z
Learning: Applies to packages/logger/src/logger/src/__testData__/**/*.json : Use `__testData__/` directory to store JSON fixtures for testing logger config error paths

Applied to files:

  • packages/logger/package.json
  • packages/config-parser/package.json
📚 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} : Use `ETransportType` enum with values: `Console`, `File`, `DailyRotateFile` for configuring logger transports

Applied to files:

  • packages/logger/package.json
  • biome.json
📚 Learning: 2026-03-17T11:19:52.544Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:52.544Z
Learning: Applies to packages/amqp-connector/src/amqp-connector/src/index.test.ts : Jest tests in index.test.ts must mock amqplib and cover connection lifecycle, reconnection, and error handling scenarios

Applied to files:

  • packages/logger/package.json
  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to packages/*/jest.config.ts : Each package in the monorepo should have its own `jest.config.ts` extending `jest-base.config.js` at the root

Applied to files:

  • packages/logger/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.{ts,tsx} : Use `twake/logger` (TwakeLogger type) for logging in the AMQP connector package

Applied to files:

  • packages/logger/package.json
  • packages/amqp-connector/package.json
  • biome.json
  • packages/utils/package.json
📚 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/logger/package.json
  • packages/config-parser/package.json
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to rollup.config.{ts,js} : Packages should be built with Rollup

Applied to files:

  • packages/logger/package.json
  • packages/crypto/package.json
  • packages/amqp-connector/package.json
📚 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/logger/package.json
  • packages/config-parser/package.json
  • biome.json
📚 Learning: 2026-03-17T11:20:35.300Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:35.300Z
Learning: Applies to packages/crypto/**/*.{ts,tsx} : In the `twake/crypto` package, use `canonicalJson` to sort keys recursively before signing to ensure deterministic output

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:20:39.621Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:39.621Z
Learning: Applies to packages/crypto/src/crypto/src/**/*.{ts,tsx} : generateKeyPair uses tweetnacl for actual key generation and wraps result in { keyId, publicKey, privateKey }

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:20:35.300Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:35.300Z
Learning: The `twake/crypto` package exports: `Hash`, `generateKeyPair`, `signJson`, `canonicalJson`, `randomString`, `toBase64Url`, and `supportedHashes` from `src/index.ts`

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:20:39.621Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:39.621Z
Learning: Applies to packages/crypto/src/crypto/src/**/*.{ts,tsx} : canonicalJson is recursive and sorts object keys lexicographically

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:20:35.300Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:35.300Z
Learning: Applies to packages/crypto/**/*.{ts,tsx} : In the `twake/crypto` package, `signJson` mutates the input object in-place by adding a `signatures` field and returns the mutated object

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:21:03.013Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/federated-identity-service/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:03.013Z
Learning: Run tests using npx nx run twake/federated-identity-service:test

Applied to files:

  • .github/workflows/_test-ci.yml
  • packages/tom-server/package.json
  • packages/federated-identity-service/package.json
  • packages/matrix-identity-server/package.json
  • .github/workflows/_test.yml
📚 Learning: 2026-03-17T11:23:51.582Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:51.582Z
Learning: Run identity-server tests using the command: npx nx run twake/tom-server:test -- --testPathPattern=identity-server

Applied to files:

  • .github/workflows/_test-ci.yml
  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
  • .github/workflows/_test.yml
📚 Learning: 2026-03-17T11:23:29.212Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/addressbook-api/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:29.212Z
Learning: Run addressbook tests using: npx nx run twake/tom-server:test -- --testPathPattern=addressbook

Applied to files:

  • .github/workflows/_test-ci.yml
  • .github/workflows/_test.yml
📚 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/package.json
📚 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/tom-server/package.json
📚 Learning: 2026-03-17T11:23:21.167Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:21.167Z
Learning: Applies to packages/tom-server/src/src/index.ts : All new API modules must be registered in `index.ts` (`_initServer()` method)

Applied to files:

  • packages/tom-server/package.json
📚 Learning: 2026-03-17T11:23:21.167Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:21.167Z
Learning: Applies to packages/tom-server/src/src/types.ts : Global type definitions and shared interfaces must be defined in `types.ts`

Applied to files:

  • packages/tom-server/package.json
📚 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: TwakeServer is the deployable server binary that composes MatrixIdentityServer with 12 Twake-specific REST API modules into a single Express application

Applied to files:

  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.test.{ts,tsx} : Mock amqplib in tests — no live broker required for testing

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.{ts,tsx} : Use instanceof checks with exported error types (`AMQPConnectorError`, `ExchangeNotSpecifiedError`, `QueueNotSpecifiedError`, `MessageHandlerNotProvidedError`) for error handling

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.{ts,tsx} : Implement exponential backoff with jitter for reconnection logic in the AMQPConnector

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.{ts,tsx} : Use fluent builder pattern with methods `withConfig()`, `withExchange()`, `withQueue()`, `onMessage()` chained before calling `build()` for AMQPConnector configuration

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use .eslintrc.cjs configuration (TypeScript + Prettier) for code linting and formatting

Applied to files:

  • biome.json
  • package.json
📚 Learning: 2026-03-17T11:19:38.170Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:38.170Z
Learning: Applies to packages/*/tsconfig.json : TypeScript configuration in each package follows the shared base `tsconfig.json` at the root

Applied to files:

  • biome.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx} : Enforce TypeScript strict mode across all packages

Applied to files:

  • biome.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx,mjs} : Use ES modules (`"type": "module"` in package.json) for all packages

Applied to files:

  • biome.json
📚 Learning: 2026-03-17T11:19:38.170Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:38.170Z
Learning: Applies to packages/*/package.json : Each package uses the `twake/*` workspace protocol for inter-package dependencies

Applied to files:

  • packages/federated-identity-service/package.json
  • package.json
📚 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/package.json
📚 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/{account,3pid,lookup,terms,validate,keyManagement}/**/*.ts : All spec endpoints should be mounted at /_matrix/identity/v2/

Applied to files:

  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:22:12.102Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/keyManagement/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:12.102Z
Learning: Applies to packages/matrix-identity-server/src/keyManagement/keyManagement/**/*.ts : Use Ed25519 for public key management in the Matrix Identity Server

Applied to files:

  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:21:40.136Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:40.136Z
Learning: Applies to packages/matrix-identity-server/src/src/index.ts : Register new Matrix Identity Server endpoints in `index.ts` and mount them at `/_matrix/identity/v2/` prefix

Applied to files:

  • packages/matrix-identity-server/package.json
📚 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/package.json
📚 Learning: 2026-03-17T11:21:40.136Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:40.136Z
Learning: Organize Matrix Identity Server feature modules to mirror the Matrix Identity Server v2 specification, with each subdirectory handling one area of the spec

Applied to files:

  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:21:55.851Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/cron/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:55.851Z
Learning: Applies to packages/matrix-identity-server/src/cron/cron/**/*.ts : Use `node-cron` schedule syntax for new jobs in the cron directory

Applied to files:

  • packages/matrix-identity-server/package.json
📚 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/utils/package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to packages/*/package.json : All inter-package dependencies must be managed via npm workspace protocol (using twake/<name> naming convention)

Applied to files:

  • package.json
🪛 actionlint (1.7.11)
.github/workflows/_build.yml

[error] 37-37: could not parse action metadata in "/home/jailuser/git/.github/actions/build": line 5: unexpected key "type" for definition of input "skip-nx-cache"

(action)

🔇 Additional comments (21)
.github/actions/build-affected/action.yml (1)

16-23: Solid artifact upload gate and dist targeting.

The conditional upload in Line 17 and packages/*/dist path in Line 21-22 are aligned with the build output layout.

.github/workflows/ci.yml (1)

19-26: Good CI sequencing change.

Adding build and wiring test with needs: [build] is the right pipeline order.

packages/matrix-resolve/package.json (1)

37-38: Solid script update.

Line 37 and Line 38 are clean: test logs are suppressed consistently, and check wires this package into the Biome flow.

.github/workflows/_lint.yml (1)

28-28: Correct target switch for lint pipeline.

Line 28 correctly moves affected checks to the check target, matching the Biome migration path.

packages/tom-server/package.json (1)

39-40: Good: scripts are now aligned with monorepo standards.

Line 39 and Line 40 are exactly what this migration needs.

packages/crypto/package.json (1)

37-38: Clean migration update.

Line 37 and Line 38 are correct and consistent with the new lint/test conventions.

packages/utils/package.json (1)

49-50: Nice and consistent.

Line 49 and Line 50 are on point: quieter tests + Biome check hook.

packages/matrix-identity-server/package.json (1)

40-41: Strong update for package scripts.

Line 40 and Line 41 cleanly align this package with the new test and lint pipeline.

packages/config-parser/package.json (1)

55-56: Good, this is exactly the right script shape.

Line 55 and Line 56 are correct for the Biome migration and standardized test execution.

packages/common-settings-bridge/package.json (2)

10-10: Same LOG_FILE no-op risk here (Line 10).

This is the same pattern already flagged above; please apply the same verification/fix here too.


12-12: Good Biome script addition.

Line 12 cleanly exposes package-level lint/check.

packages/amqp-connector/package.json (2)

10-10: Line 10 repeats the same logger env mismatch risk.

LOG_FILE likely won’t be consumed by current logger config flow; same concern as already raised.


11-11: check script looks good.

No concerns on Line 11.

packages/db/package.json (2)

38-38: Line 38 has the same LOG_FILE no-op pattern.

Already flagged above; apply the same correction here.


39-39: Biome check entry is fine.

Line 39 is consistent with the migration plan.

biome.json (1)

1-118: No new actionable issue in this revision.

The previously raised rule-strictness trade-offs are already on record; nothing new here warrants another pass-level comment.

package.json (2)

48-48: Re-verify Biome pin before merge (Line 48).

This was previously flagged; do a fresh registry check to avoid install-time surprises.

What versions of `@biomejs/biome` are currently published on npm, and is 2.4.8 available?

25-33: Script reshuffle is coherent.

softClean + Biome-focused check/fix commands are aligned with the migration and keep the root scripts readable.

packages/federated-identity-service/package.json (2)

39-39: Biome check hook is wired correctly.

Line 39 is clean and consistent with the repo-wide Biome migration.


38-38: Line 38: LOG_FILE is actually properly supported by the logger.

The logger explicitly handles the LOG_FILE environment variable. Test cases in packages/logger/src/index.test.ts (lines 1268–1305, 1313–1344) demonstrate that setting LOG_TRANSPORTS=File with LOG_FILE=/path/to/file correctly creates log files at the specified path. The original concern about this being a "dead switch" is unfounded.

Line 38 is correct as written.

nx.json (1)

26-33: Good move on explicit check inputs.

This makes cache invalidation for Biome checks predictable.

Comment thread nx.json Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

♻️ Duplicate comments (1)
.github/pull_request_template.md (1)

1-1: ⚠️ Potential issue | 🟡 Minor

Markdown lint will keep barking here — fix heading structure.
Line 1 should be a top-level heading (MD041), and Lines 17/24/28/32/37 need a blank line after each heading (MD022).

🛠️ Minimal fix
-## What
+# What
@@
 ### Code
+
 - [ ] Tests pass (`npm test`)
@@
 ### Scope
+
 - [ ] This PR addresses one concern (not a mix of bug fixes, refactors, and features)
@@
 ### Documentation
+
 - [ ] Inline comments explain *why*, not *what*
@@
 ### Tests
+
 - [ ] New behaviour is covered by tests
@@
 ### Git
+
 - [ ] Commits follow [convco / Conventional Commits](https://convco.github.io/)

Also applies to: 17-17, 24-24, 28-28, 32-32, 37-37


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 47d6c25a-f4d5-4001-a6e9-a60341742619

📥 Commits

Reviewing files that changed from the base of the PR and between 94d5674 and c549bea.

📒 Files selected for processing (13)
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/ISSUE_TEMPLATE/feature_request.yml
  • .github/actions/build-affected/action.yml
  • .github/actions/build/action.yml
  • .github/pull_request_template.md
  • .github/workflows/_build-affected.yml
  • .github/workflows/_build.yml
  • .github/workflows/_test-ci.yml
  • .github/workflows/_test.yml
  • AGENTS.md
  • CONTRIBUTING.md
  • nx.json
  • package.json
📜 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: Build / Build Affected Packages
🧰 Additional context used
📓 Path-based instructions (1)
package.json

📄 CodeRabbit inference engine (CLAUDE.md)

This is an npm workspaces + Lerna monorepo with ESM modules ("type": "module")

Files:

  • package.json
🧠 Learnings (26)
📓 Common learnings
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to package.json : This is an npm workspaces + Lerna monorepo with ESM modules (`"type": "module"`)
📚 Learning: 2026-03-18T21:20:57.515Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: .github/actions/build-affected/action.yml:12-14
Timestamp: 2026-03-18T21:20:57.515Z
Learning: In the ToM-server repository, `npx nx affected` commands in CI do not need an explicit `--base` flag. The `nrwl/nx-set-shasv4` action runs beforehand and sets the `NX_BASE` and `NX_HEAD` environment variables, which `nx affected` picks up automatically. Suggesting `--base=origin/...` is unnecessary and incorrect in this context.

Applied to files:

  • .github/actions/build-affected/action.yml
  • .github/workflows/_test.yml
  • nx.json
  • package.json
  • .github/workflows/_test-ci.yml
  • .github/workflows/_build.yml
  • .github/actions/build/action.yml
📚 Learning: 2026-03-18T21:36:05.902Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: biome.json:58-58
Timestamp: 2026-03-18T21:36:05.902Z
Learning: In linagora/ToM-server, the `noConsole: "error"` rule in `biome.json` is intentionally strict. The linting pipeline is expected to fail temporarily while existing `console.*` calls are progressively replaced with `twake/logger` (TwakeLogger). This is a deliberate enforcement strategy, not an oversight.

Applied to files:

  • AGENTS.md
  • .github/pull_request_template.md
  • CONTRIBUTING.md
📚 Learning: 2026-03-18T21:38:08.765Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: biome.json:94-94
Timestamp: 2026-03-18T21:38:08.765Z
Learning: In linagora/ToM-server, the `noEnum: "warn"` rule in `biome.json` is intentional. The linting pipeline is expected to fail temporarily while existing `enum` declarations (e.g., `ETransportType`, `ProfileField`, `ProfileVisibility`, `SMS_FOOTERS`, `SynapseAdminRetryMode`, `ConnectionState`) are progressively replaced with string unions and runtime type guards, as prescribed in CODING_STYLE.md. This is a deliberate enforcement strategy, not an oversight.

Applied to files:

  • AGENTS.md
📚 Learning: 2026-01-30T11:53:24.486Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 320
File: .compose/synapse/hs-config/cs-bridge.yaml:26-27
Timestamp: 2026-01-30T11:53:24.486Z
Learning: The `.compose/` directory contains Docker Compose configurations with hard-coded secrets intended only for local development and testing, not for production use.

Applied to files:

  • AGENTS.md
📚 Learning: 2026-03-17T11:23:35.727Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/admin-settings-api/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:35.727Z
Learning: Applies to packages/tom-server/src/admin-settings-api/admin-settings-api/**/*.ts : Admin-settings-api module structure should follow the pattern: index.ts for module export, routes/, controllers/, middlewares/, services/, tests/, and types.ts for type definitions

Applied to files:

  • AGENTS.md
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to package.json : This is an npm workspaces + Lerna monorepo with ESM modules (`"type": "module"`)

Applied to files:

  • AGENTS.md
  • nx.json
  • package.json
📚 Learning: 2026-03-17T11:24:55.383Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/utils/AGENTS.md:0-0
Timestamp: 2026-03-17T11:24:55.383Z
Learning: Run tests using `npx nx run twake/utils:test` command

Applied to files:

  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-17T11:21:03.013Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/federated-identity-service/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:03.013Z
Learning: Run tests using npx nx run twake/federated-identity-service:test

Applied to files:

  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 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: Run tests using `npx nx run twake/tom-server:test` to execute all unit and integration tests

Applied to files:

  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 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: Run tests using `npx nx run twake/logger:test`

Applied to files:

  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 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: Test twake/config-parser using `npx nx run twake/config-parser:test`

Applied to files:

  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-17T11:20:04.027Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/common-settings-bridge/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:04.027Z
Learning: Use `npx nx run twake/common-settings-bridge:test` to run tests for this service

Applied to files:

  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-17T11:23:51.582Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:51.582Z
Learning: Run identity-server tests using the command: npx nx run twake/tom-server:test -- --testPathPattern=identity-server

Applied to files:

  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-17T11:23:29.212Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/addressbook-api/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:29.212Z
Learning: Run addressbook tests using: npx nx run twake/tom-server:test -- --testPathPattern=addressbook

Applied to files:

  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Use Jest for all unit and integration tests, extending jest-base.config.js configuration

Applied to files:

  • .github/workflows/_test.yml
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js} : Tests should run with `LOG_TRANSPORTS=File LOG_FILE=/dev/null jest` to suppress log output

Applied to files:

  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 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/index.ts : Include response fields for Matrix client auto-discovery: `m.homeserver.base_url`, `m.identity_server.base_url`, `m.integrations`, `org.matrix.msc3575.proxy`, and Jitsi, OIDC, and Twake-specific keys

Applied to files:

  • .github/ISSUE_TEMPLATE/feature_request.yml
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Run npm build before running tests on a fresh checkout to ensure packages are built

Applied to files:

  • nx.json
  • package.json
  • .github/workflows/_test-ci.yml
  • .github/workflows/_build.yml
📚 Learning: 2026-03-17T17:57:16.582Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 338
File: packages/db/.node-version:1-1
Timestamp: 2026-03-17T17:57:16.582Z
Learning: In the ToM-server project (linagora/ToM-server), the Node.js upgrade from 18.20.8 to 24.14.0 (Active LTS) in PR `#338` was intentional and deliberate. Node 24 was chosen because it is the current Active LTS (Node 18 is end-of-life). The team confirmed no Node 18-specific engine incompatibilities exist in the codebase, all tests pass on Node 24, and the branch serves as a validation baseline with easy rollback if needed. npm was also upgraded to 11.9.0.

Applied to files:

  • package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Build all packages using Lerna and Rollup; output goes to dist/ directory

Applied to files:

  • package.json
  • .github/actions/build/action.yml
📚 Learning: 2026-03-17T11:19:38.170Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:38.170Z
Learning: Applies to packages/*/package.json : Each package uses the `twake/*` workspace protocol for inter-package dependencies

Applied to files:

  • package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to packages/*/package.json : All inter-package dependencies must be managed via npm workspace protocol (using twake/<name> naming convention)

Applied to files:

  • package.json
📚 Learning: 2026-03-17T11:20:10.724Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/common-settings-bridge/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:10.724Z
Learning: Applies to packages/common-settings-bridge/src/src/common-settings-bridge/**/*.test.ts : Use Jest for testing TypeScript code in the bridge module

Applied to files:

  • package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use .eslintrc.cjs configuration (TypeScript + Prettier) for code linting and formatting

Applied to files:

  • package.json
📚 Learning: 2026-03-18T21:43:50.846Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: packages/logger/package.json:38-39
Timestamp: 2026-03-18T21:43:50.846Z
Learning: In `packages/logger/package.json`, the `test` script intentionally runs plain `jest` without `LOG_TRANSPORTS=File LOG_FILE=/dev/null`. Adding those env vars causes the logger package's tests to fail, because those tests exercise the logger's own transport behavior and rely on actual log output. Do not suggest adding log-suppression env vars to this package's test script.

Applied to files:

  • .github/workflows/_test-ci.yml
🪛 LanguageTool
CONTRIBUTING.md

[uncategorized] ~45-~45: The official name of this software platform is spelled with a capital “H”.
Context: ...sue Use the appropriate issue template. Fill every field — spa...

(GITHUB)


[grammar] ~45-~45: Ensure spelling is correct
Context: ...ery field — sparse issues get closed or deprioritised. The template will guide you through wh...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~103-~103: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... as possible. | | priority::high | We want to do this soon. | | priority::normal | ...

(REP_WANT_TO_VB)


[uncategorized] ~144-~144: The official name of this software platform is spelled with a capital “H”.
Context: ... ### Opening a PR Use the PR template. Link the iss...

(GITHUB)

🪛 markdownlint-cli2 (0.21.0)
.github/pull_request_template.md

[warning] 1-1: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)


[warning] 17-17: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 24-24: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 28-28: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 32-32: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 37-37: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🔇 Additional comments (11)
AGENTS.md (1)

20-20: Good correction — this now describes Biome correctly.
Line 20 is now precise and no longer undersells linting support.

.github/workflows/_test.yml (1)

33-33: Solid fix — test command wiring is clean now.
No blockers on Line 33.

.github/workflows/_test-ci.yml (1)

18-18: Clean and consistent CI update.
Line 18 improves intent, and Line 36 keeps test execution aligned with the cache-skip input.

Also applies to: 36-36

.github/actions/build-affected/action.yml (1)

13-13: Good composite action shape.
Build step is straightforward, and artifact naming with run_id avoids collisions.

Also applies to: 20-23

.github/ISSUE_TEMPLATE/bug_report.yml (1)

11-30: This is a strong bug template — good triage ergonomics.
Required fields are practical, and package coverage looks complete.

Also applies to: 32-96

.github/ISSUE_TEMPLATE/feature_request.yml (1)

11-41: Nice template discipline — problem-first framing is exactly right.
The required use-case section will filter low-signal feature asks.

Also applies to: 43-67

.github/workflows/_build.yml (1)

6-10: Good wiring — inputs and SHAs setup are connected correctly.
This is coherent workflow plumbing with no obvious footguns.

Also applies to: 32-33, 38-39

.github/actions/build/action.yml (1)

17-17: Good: explicit 'true' comparison avoids composite-input truthiness traps.

This is the right way to gate --skip-nx-cache in composite actions.

package.json (1)

25-30: Biome script wiring is clean and practical.

softClean, check, and check:fix are straightforward and match the migration intent.

nx.json (2)

35-35: No actionable issue in this hunk.


26-33: The check.inputs configuration is correct as-is.

Biome's biome.json explicitly configures files.includes to only packages/**/*.{js,jsx,ts,tsx} with ignoreUnknown: true. This means Biome ignores all other file types—including .mjs, .cjs, .json, .jsonc files present in the repo. Adding those extensions to nx.json cache inputs would be unnecessary and produce false cache invalidations when unrelated file types change.

The current inputs properly cover what Biome actually processes, plus biome.json itself (which affects behavior). No changes needed.

			> Likely an incorrect or invalid review comment.

Comment thread .github/actions/build/action.yml Outdated
Comment thread .github/workflows/_build-affected.yml
Comment thread CONTRIBUTING.md
Comment thread CONTRIBUTING.md Outdated
Comment thread nx.json Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
.github/workflows/_build-affected.yml (1)

35-39: ⚠️ Potential issue | 🔴 Critical

Build-affected action is missing skip-nx-cache input — it's silently dropped.

Look at .github/actions/build/action.yml — that one's implemented correctly with proper skip-nx-cache handling. Now look at .github/actions/build-affected/action.yml. It declares nothing, runs npx nx affected -t build bare-bones. You're passing skip-nx-cache from the workflow, but the action doesn't know what to do with it. Dead weight.

The regular build action has the right pattern. Copy it:

Fix for `.github/actions/build-affected/action.yml`
 inputs:
+  skip-nx-cache:
+    description: "Skip nx cache when building"
+    required: false
+    default: "false"
   upload-artifacts:
     description: Whether to upload dist artifacts
     default: 'false'
@@
     - name: Build all packages
-      run: npx nx affected -t build
+      run: npx nx affected -t build ${{ inputs.skip-nx-cache == 'true' && '--skip-nx-cache' || '' }}
       shell: bash

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8c2e5054-6517-4c40-997e-2b9146669340

📥 Commits

Reviewing files that changed from the base of the PR and between c549bea and 65fb3f4.

📒 Files selected for processing (4)
  • .github/actions/build/action.yml
  • .github/workflows/_build-affected.yml
  • CONTRIBUTING.md
  • nx.json
📜 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
🧠 Learnings (7)
📓 Common learnings
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to package.json : This is an npm workspaces + Lerna monorepo with ESM modules (`"type": "module"`)
📚 Learning: 2026-03-18T21:20:57.515Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: .github/actions/build-affected/action.yml:12-14
Timestamp: 2026-03-18T21:20:57.515Z
Learning: In the ToM-server repository, `npx nx affected` commands in CI do not need an explicit `--base` flag. The `nrwl/nx-set-shasv4` action runs beforehand and sets the `NX_BASE` and `NX_HEAD` environment variables, which `nx affected` picks up automatically. Suggesting `--base=origin/...` is unnecessary and incorrect in this context.

Applied to files:

  • .github/workflows/_build-affected.yml
  • nx.json
  • .github/actions/build/action.yml
📚 Learning: 2026-03-18T21:36:05.902Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: biome.json:58-58
Timestamp: 2026-03-18T21:36:05.902Z
Learning: In linagora/ToM-server, the `noConsole: "error"` rule in `biome.json` is intentionally strict. The linting pipeline is expected to fail temporarily while existing `console.*` calls are progressively replaced with `twake/logger` (TwakeLogger). This is a deliberate enforcement strategy, not an oversight.

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Run npm build before running tests on a fresh checkout to ensure packages are built

Applied to files:

  • CONTRIBUTING.md
  • nx.json
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to package.json : This is an npm workspaces + Lerna monorepo with ESM modules (`"type": "module"`)

Applied to files:

  • nx.json
📚 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: Run tests using `npx nx run twake/tom-server:test` to execute all unit and integration tests

Applied to files:

  • nx.json
📚 Learning: 2026-03-17T11:19:38.170Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:38.170Z
Learning: Applies to packages/*/tsconfig.json : TypeScript configuration in each package follows the shared base `tsconfig.json` at the root

Applied to files:

  • nx.json
🪛 actionlint (1.7.11)
.github/workflows/_build-affected.yml

[error] 38-38: input "skip-nx-cache" is not defined in action "Build" defined at "./.github/actions/build-affected". available inputs are "upload-artifacts"

(action)

🪛 Checkov (3.2.508)
nx.json

[low] 9-10: Base64 High Entropy String

(CKV_SECRET_6)

🪛 Gitleaks (8.30.0)
nx.json

[high] 9-9: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🪛 LanguageTool
CONTRIBUTING.md

[uncategorized] ~45-~45: The official name of this software platform is spelled with a capital “H”.
Context: ...sue Use the appropriate issue template. Fill every field — spa...

(GITHUB)


[grammar] ~45-~45: Ensure spelling is correct
Context: ...ery field — sparse issues get closed or deprioritised. The template will guide you through wh...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~103-~103: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... as possible. | | priority::high | We want to do this soon. | | priority::normal | ...

(REP_WANT_TO_VB)


[uncategorized] ~145-~145: The official name of this software platform is spelled with a capital “H”.
Context: ... ### Opening a PR Use the PR template. Link the iss...

(GITHUB)

🔇 Additional comments (13)
CONTRIBUTING.md (4)

138-141: PR preflight checklist is finally sane and executable.

Good ordering: build first, then tests, then lint. This avoids fresh-checkout false failures and matches monorepo reality.


145-145: Correct PR template path and clear closure instruction.

Link target is correctly cased and the Closes #<number> guidance is explicit. No ambiguity for contributors.


165-214: Commit/branch conventions are crisp and enforceable.

Language-tagged examples, constrained patterns, and concrete naming rules make this easy to follow and easy to review against.


32-36: Policy quality is strong: behavior-doc coupling and anti-any stance are explicit.

These rules tighten review standards without bloating process. This is the right level of strictness.

Also applies to: 147-153

.github/actions/build/action.yml (2)

5-8: LGTM — previous feedback properly addressed.

The skip-nx-cache input is correctly declared as a string (no invalid type key), and the flag is now placed in the right position. The string comparison == 'true' handles composite action inputs properly since they're always strings.

Also applies to: 17-17


24-24: Good: Unique artifact naming.

Adding github.run_id prevents artifact name collisions during concurrent workflow runs. Since no downstream workflow currently downloads by the old name dist-artifacts, this is a clean improvement with zero breakage risk.

.github/workflows/_build-affected.yml (1)

1-18: Workflow structure and permissions look solid.

Permissions are properly scoped to read-only, workflow_call inputs are correctly typed as booleans (valid for reusable workflows unlike composite actions), and the job structure follows the established pattern. Based on learnings, the nrwl/nx-set-shas@v4 action handles NX_BASE/NX_HEAD automatically, so no explicit --base flag needed.

nx.json (6)

5-7: Formatting consolidation. Clean.

Single-line arrays for default and production inputs—no semantic change, just tidier config. Nothing to complain about here.


11-14: Build target properly scoped.

dependsOn: ["^build"] is exactly right. Build artifacts depend on other builds, not on test execution. Previous review caught the ^test coupling violation and it's been correctly removed.


16-18: Test dependency chain is now correct.

["^build", "^test"] establishes the proper ordering: build dependencies first, then run their tests, then run current package tests. This ensures you're testing against valid, tested dependencies.

In CI, since your workflow already sequences build before test jobs (see _test-ci.yml context), the ^build calls will hit cache. Locally, nx test my-package will correctly trigger builds. Good fix.


20-28: Explicit inputs for check target—proper cache hygiene.

Listing specific file patterns and {workspaceRoot}/biome.json as inputs ensures the check target only invalidates when relevant files change. The workspace-root reference to biome.json is correct—confirmed it exists at root per context snippet.

This is how caching should be configured. No wasted cycles.


30-30: Dev target with empty dependencies—fine.

"dev": { "dependsOn": [] } explicitly declares no automatic prerequisites. Dev servers should start fast without triggering the full dependency graph. Correct call.


9-9: ⚠️ Potential issue | 🟡 Minor

Remove the unused Nx Cloud token or restrict its scope.

The token in nx.json decodes to read-write scope and is flagged by static analysis—fair catch. However, there's a critical gap: Nx Cloud distributed caching isn't actually configured in this repo. No nx-set-shasv4 action, no NX_CLOUD_ACCESS_TOKEN injection in CI, no cache remoting setup. Only local caching is enabled.

So either:

  1. This token is dead code from a previous setup—yank it.
  2. You plan to use Nx Cloud distributed caching—then follow the suggested pattern (read-only token in config, write-capable token via NX_CLOUD_ACCESS_TOKEN in CI).

Don't carry security cargo you're not using. If you're not distributing cache, the token has zero purpose. If you intend to later, architect it properly from the start rather than retrofitting belt-and-suspenders after the fact.

⛔ Skipped due to learnings
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: .github/actions/build-affected/action.yml:12-14
Timestamp: 2026-03-18T21:20:57.515Z
Learning: In the ToM-server repository, `npx nx affected` commands in CI do not need an explicit `--base` flag. The `nrwl/nx-set-shasv4` action runs beforehand and sets the `NX_BASE` and `NX_HEAD` environment variables, which `nx affected` picks up automatically. Suggesting `--base=origin/...` is unnecessary and incorrect in this context.

@pm-McFly
Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 18, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

pm-McFly added 13 commits March 19, 2026 13:44
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
@pm-McFly pm-McFly force-pushed the chore/contributing/updates-documents-and-gh-templates branch from dc44235 to 6e2232f Compare March 19, 2026 12:45
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
packages/matrix-identity-server/package.json (1)

51-51: 🧹 Nitpick | 🔵 Trivial

jest belongs in devDependencies, not dependencies.

Test framework shouldn't ship with production code. This isn't new to this PR, but since you're touching this file anyway:

   "dependencies": {
     "@twake/config-parser": "*",
     "@twake/crypto": "*",
     "@twake/logger": "*",
     "@twake/utils": "*",
     "express": "^4.19.2",
     "express-rate-limit": "^7.2.0",
     "generic-pool": "^3.9.0",
-    "jest": "^29.7.0",
     "matrix-resolve": "^1.0.1",

Add to a devDependencies block instead. Low priority—not blocking this PR, but worth fixing.

CLAUDE.md (1)

115-115: 🧹 Nitpick | 🔵 Trivial

RTK documentation references "ESLint/Biome" but ESLint is gone.

Line 115 says rtk lint # ESLint/Biome violations grouped (84%). Since this PR removes ESLint entirely, consider updating to just "Biome violations" for accuracy.

AGENTS.md (1)

33-33: ⚠️ Potential issue | 🟠 Major

Remove or update the stale .husky/ entry in the subdirectories table.

The .husky/ directory no longer exists in the repository, yet AGENTS.md line 33 still documents it with pre-commit (lint), pre-push (test) hooks. This is a straight-up lie to anyone reading the docs. Either restore the directory (unlikely) or strip this line entirely to avoid sending developers on a wild goose chase.

♻️ Duplicate comments (1)
.github/workflows/_build-affected.yml (1)

35-39: ⚠️ Potential issue | 🔴 Critical

Stop passing skip-nx-cache to an action that doesn't accept it.

The workflow declares and passes skip-nx-cache to .github/actions/build-affected, but that action doesn't have the input defined. GitHub Actions silently drops undeclared inputs—so callers think they're controlling cache behavior when they're not.

The action only declares upload-artifacts:

inputs:
  upload-artifacts:
    description: Whether to upload dist artifacts
    default: 'false'

And the build command ignores any cache flags:

run: npx nx affected -t build

Wire it up or rip it out. No middle ground here.

Fix: Add the input and use it

In .github/actions/build-affected/action.yml:

 inputs:
+  skip-nx-cache:
+    description: 'Skip nx cache when building'
+    required: false
+    default: 'false'
   upload-artifacts:
     description: Whether to upload dist artifacts
     default: 'false'

 runs:
   using: composite
   steps:
     - name: Build all packages
-      run: npx nx affected -t build
+      run: npx nx affected -t build ${{ inputs.skip-nx-cache == 'true' && '--skip-nx-cache' || '' }}
       shell: bash

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 45159f16-c99c-4bbf-ab77-9af86184310a

📥 Commits

Reviewing files that changed from the base of the PR and between 65fb3f4 and 6e2232f.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (35)
  • .eslintrc.cjs
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/ISSUE_TEMPLATE/feature_request.yml
  • .github/actions/build-affected/action.yml
  • .github/actions/build/action.yml
  • .github/pull_request_template.md
  • .github/workflows/AGENTS.md
  • .github/workflows/_build-affected.yml
  • .github/workflows/_build.yml
  • .github/workflows/_lint.yml
  • .github/workflows/_test-ci.yml
  • .github/workflows/_test.yml
  • .github/workflows/ci.yml
  • .husky/pre-commit
  • .husky/pre-push
  • .prettierignore
  • .prettierrc
  • AGENTS.md
  • CLAUDE.md
  • CODING_STYLE.md
  • CONTRIBUTING.md
  • biome.json
  • nx.json
  • package.json
  • packages/amqp-connector/package.json
  • packages/common-settings-bridge/package.json
  • packages/config-parser/package.json
  • packages/crypto/package.json
  • packages/db/package.json
  • packages/federated-identity-service/package.json
  • packages/logger/package.json
  • packages/matrix-identity-server/package.json
  • packages/matrix-resolve/package.json
  • packages/tom-server/package.json
  • packages/utils/package.json
💤 Files with no reviewable changes (5)
  • .husky/pre-push
  • .prettierrc
  • .eslintrc.cjs
  • .prettierignore
  • .husky/pre-commit
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
packages/*/package.json

📄 CodeRabbit inference engine (AGENTS.md)

packages/*/package.json: Each package must have its own package.json, tsconfig.json, and rollup.config.js configuration files
All inter-package dependencies must be managed via npm workspace protocol (using @twake/ naming convention)

packages/*/package.json: Each package must have its own package.json, tsconfig.json, rollup.config.js, and src/ directory
Each package uses the @twake/* workspace protocol for inter-package dependencies

Files:

  • packages/crypto/package.json
  • packages/utils/package.json
  • packages/amqp-connector/package.json
  • packages/matrix-resolve/package.json
  • packages/config-parser/package.json
  • packages/common-settings-bridge/package.json
  • packages/federated-identity-service/package.json
  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
  • packages/db/package.json
  • packages/logger/package.json
packages/config-parser/**/package.json

📄 CodeRabbit inference engine (packages/config-parser/AGENTS.md)

@twake/config-parser must have zero runtime dependencies

Files:

  • packages/config-parser/package.json
package.json

📄 CodeRabbit inference engine (CLAUDE.md)

This is an npm workspaces + Lerna monorepo with ESM modules ("type": "module")

Files:

  • package.json
🧠 Learnings (69)
📓 Common learnings
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to package.json : This is an npm workspaces + Lerna monorepo with ESM modules (`"type": "module"`)
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use .eslintrc.cjs configuration (TypeScript + Prettier) for code linting and formatting
📚 Learning: 2026-03-17T11:24:55.383Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/utils/AGENTS.md:0-0
Timestamp: 2026-03-17T11:24:55.383Z
Learning: Run tests using `npx nx run twake/utils:test` command

Applied to files:

  • .github/workflows/_test.yml
  • .github/workflows/_lint.yml
  • packages/utils/package.json
  • packages/federated-identity-service/package.json
  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
  • packages/db/package.json
  • CLAUDE.md
  • packages/logger/package.json
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-17T11:21:03.013Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/federated-identity-service/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:03.013Z
Learning: Run tests using npx nx run twake/federated-identity-service:test

Applied to files:

  • .github/workflows/_test.yml
  • packages/federated-identity-service/package.json
  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
  • .github/workflows/_test-ci.yml
📚 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: Run tests using `npx nx run twake/tom-server:test` to execute all unit and integration tests

Applied to files:

  • .github/workflows/_test.yml
  • packages/utils/package.json
  • packages/federated-identity-service/package.json
  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
  • packages/db/package.json
  • nx.json
  • .github/workflows/_test-ci.yml
📚 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: Run tests using `npx nx run twake/logger:test`

Applied to files:

  • .github/workflows/_test.yml
  • .github/workflows/_lint.yml
  • packages/utils/package.json
  • packages/matrix-resolve/package.json
  • packages/federated-identity-service/package.json
  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
  • packages/db/package.json
  • CLAUDE.md
  • packages/logger/package.json
  • .github/workflows/_test-ci.yml
📚 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: Test twake/config-parser using `npx nx run twake/config-parser:test`

Applied to files:

  • .github/workflows/_test.yml
  • packages/utils/package.json
  • packages/config-parser/package.json
  • packages/federated-identity-service/package.json
  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
  • packages/db/package.json
  • CLAUDE.md
  • packages/logger/package.json
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-18T21:21:02.822Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: .github/actions/build-affected/action.yml:12-14
Timestamp: 2026-03-18T21:21:02.822Z
Learning: In the ToM-server repository, `npx nx affected` commands in CI do not need an explicit `--base` flag. The `nrwl/nx-set-shasv4` action runs beforehand and sets the `NX_BASE` and `NX_HEAD` environment variables, which `nx affected` picks up automatically. Suggesting `--base=origin/...` is unnecessary and incorrect in this context.

Applied to files:

  • .github/workflows/_test.yml
  • .github/workflows/_lint.yml
  • .github/actions/build-affected/action.yml
  • .github/workflows/ci.yml
  • .github/workflows/_build-affected.yml
  • .github/workflows/_build.yml
  • nx.json
  • .github/workflows/_test-ci.yml
  • package.json
  • .github/actions/build/action.yml
📚 Learning: 2026-03-17T11:20:04.027Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/common-settings-bridge/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:04.027Z
Learning: Use `npx nx run twake/common-settings-bridge:test` to run tests for this service

Applied to files:

  • .github/workflows/_test.yml
  • packages/federated-identity-service/package.json
  • packages/matrix-identity-server/package.json
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-17T11:23:51.582Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:51.582Z
Learning: Run identity-server tests using the command: npx nx run twake/tom-server:test -- --testPathPattern=identity-server

Applied to files:

  • .github/workflows/_test.yml
  • packages/federated-identity-service/package.json
  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-17T11:23:29.212Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/addressbook-api/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:29.212Z
Learning: Run addressbook tests using: npx nx run twake/tom-server:test -- --testPathPattern=addressbook

Applied to files:

  • .github/workflows/_test.yml
  • CLAUDE.md
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js} : Tests should run with `LOG_TRANSPORTS=File LOG_FILE=/dev/null jest` to suppress log output

Applied to files:

  • .github/workflows/_test.yml
  • packages/crypto/package.json
  • packages/utils/package.json
  • packages/amqp-connector/package.json
  • packages/matrix-resolve/package.json
  • packages/config-parser/package.json
  • packages/common-settings-bridge/package.json
  • packages/federated-identity-service/package.json
  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
  • packages/db/package.json
  • CLAUDE.md
  • packages/logger/package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Use Jest for all unit and integration tests, extending jest-base.config.js configuration

Applied to files:

  • .github/workflows/_test.yml
  • packages/crypto/package.json
  • packages/amqp-connector/package.json
  • packages/matrix-resolve/package.json
  • packages/config-parser/package.json
  • biome.json
  • CLAUDE.md
  • packages/logger/package.json
📚 Learning: 2026-03-18T21:43:54.137Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: packages/logger/package.json:38-39
Timestamp: 2026-03-18T21:43:54.137Z
Learning: In `packages/logger/package.json`, the `test` script intentionally runs plain `jest` without `LOG_TRANSPORTS=File LOG_FILE=/dev/null`. Adding those env vars causes the logger package's tests to fail, because those tests exercise the logger's own transport behavior and rely on actual log output. Do not suggest adding log-suppression env vars to this package's test script.

Applied to files:

  • packages/crypto/package.json
  • packages/utils/package.json
  • packages/amqp-connector/package.json
  • packages/matrix-resolve/package.json
  • packages/config-parser/package.json
  • packages/common-settings-bridge/package.json
  • packages/federated-identity-service/package.json
  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
  • packages/db/package.json
  • packages/logger/package.json
📚 Learning: 2026-03-17T11:20:35.300Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:35.300Z
Learning: Applies to packages/crypto/**/*.{ts,tsx} : In the `twake/crypto` package, use `canonicalJson` to sort keys recursively before signing to ensure deterministic output

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:20:10.724Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/common-settings-bridge/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:10.724Z
Learning: Applies to packages/common-settings-bridge/src/src/common-settings-bridge/**/*.test.ts : Use Jest for testing TypeScript code in the bridge module

Applied to files:

  • packages/crypto/package.json
  • packages/amqp-connector/package.json
  • packages/matrix-resolve/package.json
  • packages/config-parser/package.json
  • packages/common-settings-bridge/package.json
  • CLAUDE.md
  • packages/logger/package.json
  • package.json
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to package.json : This is an npm workspaces + Lerna monorepo with ESM modules (`"type": "module"`)

Applied to files:

  • packages/crypto/package.json
  • packages/utils/package.json
  • packages/amqp-connector/package.json
  • packages/matrix-resolve/package.json
  • packages/config-parser/package.json
  • packages/common-settings-bridge/package.json
  • packages/federated-identity-service/package.json
  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
  • biome.json
  • nx.json
  • AGENTS.md
  • packages/logger/package.json
  • package.json
📚 Learning: 2026-03-17T11:20:39.621Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:39.621Z
Learning: Applies to packages/crypto/src/crypto/src/**/*.{ts,tsx} : canonicalJson is recursive and sorts object keys lexicographically

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:20:39.621Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:39.621Z
Learning: Applies to packages/crypto/src/crypto/src/**/*.{ts,tsx} : generateKeyPair uses tweetnacl for actual key generation and wraps result in { keyId, publicKey, privateKey }

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:20:35.300Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/crypto/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:35.300Z
Learning: The `twake/crypto` package exports: `Hash`, `generateKeyPair`, `signJson`, `canonicalJson`, `randomString`, `toBase64Url`, and `supportedHashes` from `src/index.ts`

Applied to files:

  • packages/crypto/package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Run npm build before running tests on a fresh checkout to ensure packages are built

Applied to files:

  • packages/crypto/package.json
  • packages/amqp-connector/package.json
  • packages/matrix-resolve/package.json
  • packages/config-parser/package.json
  • packages/common-settings-bridge/package.json
  • .github/workflows/ci.yml
  • packages/federated-identity-service/package.json
  • packages/tom-server/package.json
  • packages/matrix-identity-server/package.json
  • packages/db/package.json
  • CONTRIBUTING.md
  • .github/workflows/_build.yml
  • nx.json
  • CLAUDE.md
  • packages/logger/package.json
  • .github/workflows/_test-ci.yml
  • package.json
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to rollup.config.{ts,js} : Packages should be built with Rollup

Applied to files:

  • packages/crypto/package.json
  • packages/amqp-connector/package.json
  • packages/logger/package.json
📚 Learning: 2026-03-18T21:36:12.246Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: biome.json:58-58
Timestamp: 2026-03-18T21:36:12.246Z
Learning: In linagora/ToM-server, the `noConsole: "error"` rule in `biome.json` is intentionally strict. The linting pipeline is expected to fail temporarily while existing `console.*` calls are progressively replaced with `twake/logger` (TwakeLogger). This is a deliberate enforcement strategy, not an oversight.

Applied to files:

  • .github/pull_request_template.md
  • packages/tom-server/package.json
  • CONTRIBUTING.md
  • biome.json
  • AGENTS.md
  • packages/logger/package.json
📚 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/src/index.ts : The main export file `src/index.ts` must export: `getLogger()`, `ETransportType`, `Config` type, and `TwakeLogger` type

Applied to files:

  • packages/utils/package.json
  • packages/db/package.json
📚 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} : Type dependency-injected logger instances as `TwakeLogger` type alias for Winston's `Logger`

Applied to files:

  • packages/utils/package.json
  • packages/db/package.json
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to jest.config.{ts,js} : Jest config should map `twake/*` imports to local `packages/*/src` directories so tests run against source directly without building

Applied to files:

  • packages/utils/package.json
  • packages/db/package.json
  • packages/logger/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.{ts,tsx} : Use `twake/logger` (TwakeLogger type) for logging in the AMQP connector package

Applied to files:

  • packages/utils/package.json
  • packages/amqp-connector/package.json
  • biome.json
  • packages/logger/package.json
📚 Learning: 2026-03-17T11:19:52.544Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:52.544Z
Learning: Applies to packages/amqp-connector/src/amqp-connector/src/index.test.ts : Jest tests in index.test.ts must mock amqplib and cover connection lifecycle, reconnection, and error handling scenarios

Applied to files:

  • packages/amqp-connector/package.json
  • packages/logger/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.test.{ts,tsx} : Mock amqplib in tests — no live broker required for testing

Applied to files:

  • packages/amqp-connector/package.json
  • packages/logger/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.{ts,tsx} : Use instanceof checks with exported error types (`AMQPConnectorError`, `ExchangeNotSpecifiedError`, `QueueNotSpecifiedError`, `MessageHandlerNotProvidedError`) for error handling

Applied to files:

  • packages/amqp-connector/package.json
  • biome.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.{ts,tsx} : Implement exponential backoff with jitter for reconnection logic in the AMQPConnector

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:52.544Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:52.544Z
Learning: Applies to packages/amqp-connector/src/amqp-connector/src/types.ts : Type definitions for AmqpConfig, ReconnectionConfig, MessageHandler, and ConnectionState should be maintained in types.ts

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.{ts,tsx} : Use fluent builder pattern with methods `withConfig()`, `withExchange()`, `withQueue()`, `onMessage()` chained before calling `build()` for AMQPConnector configuration

Applied to files:

  • packages/amqp-connector/package.json
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/src/**/*.ts : Implement `matrixResolve()` as a simple stateless API without caching for resolving Matrix homeserver addresses

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:20:10.724Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/common-settings-bridge/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:10.724Z
Learning: Applies to packages/common-settings-bridge/src/src/common-settings-bridge/**/*.test.ts : Mock the `matrix-appservice-bridge` library in Jest tests using the mock in `__mocks__/matrix-appservice-bridge.ts`

Applied to files:

  • packages/matrix-resolve/package.json
  • packages/common-settings-bridge/package.json
  • packages/matrix-identity-server/package.json
  • packages/logger/package.json
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/**/*.test.ts : Mock `node-fetch` and DNS in tests — no network calls required for test execution

Applied to files:

  • packages/matrix-resolve/package.json
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/src/**/*.ts : Implement `MatrixResolve` class to support optional `toad-cache` LRU caching with configurable TTL and size parameters

Applied to files:

  • packages/matrix-resolve/package.json
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/src/index.ts : Export `matrixResolve()`, `MatrixResolve` class, `WellKnownMatrixServer` type, `MatrixResolveArgs`, and `CacheType` from `src/index.ts`

Applied to files:

  • packages/matrix-resolve/package.json
📚 Learning: 2026-03-17T11:22:57.617Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-resolve/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:57.617Z
Learning: Applies to packages/matrix-resolve/src/**/*.ts : Ensure `cacheReady` promise is awaited before calling `resolve()` when caching is enabled

Applied to files:

  • packages/matrix-resolve/package.json
📚 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/tom-server/package.json
📚 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/**/*.{test,spec}.{ts,tsx} : Tests must use SQLite in-memory database and mock external services (SMTP, Matrix homeserver) rather than using real services

Applied to files:

  • packages/tom-server/package.json
  • packages/logger/package.json
📚 Learning: 2026-03-17T17:57:16.582Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 338
File: packages/db/.node-version:1-1
Timestamp: 2026-03-17T17:57:16.582Z
Learning: In the ToM-server project (linagora/ToM-server), the Node.js upgrade from 18.20.8 to 24.14.0 (Active LTS) in PR `#338` was intentional and deliberate. Node 24 was chosen because it is the current Active LTS (Node 18 is end-of-life). The team confirmed no Node 18-specific engine incompatibilities exist in the codebase, all tests pass on Node 24, and the branch serves as a validation baseline with easy rollback if needed. npm was also upgraded to 11.9.0.

Applied to files:

  • packages/tom-server/package.json
  • package.json
📚 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: TwakeServer is the deployable server binary that composes MatrixIdentityServer with 12 Twake-specific REST API modules into a single Express application

Applied to files:

  • packages/tom-server/package.json
📚 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/package.json
📚 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/{account,3pid,lookup,terms,validate,keyManagement}/**/*.ts : All spec endpoints should be mounted at /_matrix/identity/v2/

Applied to files:

  • packages/matrix-identity-server/package.json
  • .github/ISSUE_TEMPLATE/feature_request.yml
📚 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/validate/**/*.ts : Email sending requires SMTP config keys: smtp_server, smtp_port, smtp_user, smtp_password

Applied to files:

  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:22:45.233Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/utils/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:45.233Z
Learning: Applies to packages/matrix-identity-server/src/utils/**/utils/mailer.ts : SMTP configuration in `mailer.ts` should use keys: `smtp_server`, `smtp_port`, `smtp_user`, `smtp_password`, `smtp_tls`

Applied to files:

  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:21:55.851Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/cron/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:55.851Z
Learning: Applies to packages/matrix-identity-server/src/cron/cron/**/*.ts : Use `node-cron` schedule syntax for new jobs in the cron directory

Applied to files:

  • packages/matrix-identity-server/package.json
📚 Learning: 2026-03-17T11:22:12.102Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/keyManagement/AGENTS.md:0-0
Timestamp: 2026-03-17T11:22:12.102Z
Learning: Applies to packages/matrix-identity-server/src/keyManagement/keyManagement/**/*.ts : Use Ed25519 for public key management in the Matrix Identity Server

Applied to files:

  • packages/matrix-identity-server/package.json
📚 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/index.ts : Include response fields for Matrix client auto-discovery: `m.homeserver.base_url`, `m.identity_server.base_url`, `m.integrations`, `org.matrix.msc3575.proxy`, and Jitsi, OIDC, and Twake-specific keys

Applied to files:

  • .github/ISSUE_TEMPLATE/feature_request.yml
📚 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:

  • .github/ISSUE_TEMPLATE/feature_request.yml
📚 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:

  • .github/ISSUE_TEMPLATE/feature_request.yml
📚 Learning: 2026-03-17T11:21:40.136Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:40.136Z
Learning: Applies to packages/matrix-identity-server/src/src/db/index.ts : Add new database table names to the `Collections` enum in `db/index.ts`

Applied to files:

  • .github/ISSUE_TEMPLATE/feature_request.yml
📚 Learning: 2026-03-18T21:38:15.357Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: biome.json:94-94
Timestamp: 2026-03-18T21:38:15.357Z
Learning: In linagora/ToM-server, the `noEnum: "warn"` rule in `biome.json` is intentional. The linting pipeline is expected to fail temporarily while existing `enum` declarations (e.g., `ETransportType`, `ProfileField`, `ProfileVisibility`, `SMS_FOOTERS`, `SynapseAdminRetryMode`, `ConnectionState`) are progressively replaced with string unions and runtime type guards, as prescribed in CODING_STYLE.md. This is a deliberate enforcement strategy, not an oversight.

Applied to files:

  • biome.json
  • AGENTS.md
📚 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} : Use `ETransportType` enum with values: `Console`, `File`, `DailyRotateFile` for configuring logger transports

Applied to files:

  • biome.json
  • packages/logger/package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use .eslintrc.cjs configuration (TypeScript + Prettier) for code linting and formatting

Applied to files:

  • biome.json
  • package.json
📚 Learning: 2026-03-17T11:19:38.170Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:38.170Z
Learning: Applies to packages/*/tsconfig.json : TypeScript configuration in each package follows the shared base `tsconfig.json` at the root

Applied to files:

  • biome.json
  • nx.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx} : Enforce TypeScript strict mode across all packages

Applied to files:

  • biome.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx,mjs} : Use ES modules (`"type": "module"` in package.json) for all packages

Applied to files:

  • biome.json
📚 Learning: 2026-03-17T11:23:29.212Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/addressbook-api/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:29.212Z
Learning: Applies to packages/tom-server/src/addressbook-api/tests/*.test.ts : Test files must follow the pattern controller.test.ts, middleware.test.ts, router.test.ts, service.test.ts in tests/ directory

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Build all packages using Lerna and Rollup; output goes to dist/ directory

Applied to files:

  • CLAUDE.md
  • package.json
📚 Learning: 2026-01-30T11:53:24.486Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 320
File: .compose/synapse/hs-config/cs-bridge.yaml:26-27
Timestamp: 2026-01-30T11:53:24.486Z
Learning: The `.compose/` directory contains Docker Compose configurations with hard-coded secrets intended only for local development and testing, not for production use.

Applied to files:

  • AGENTS.md
📚 Learning: 2026-03-17T11:23:35.727Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/admin-settings-api/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:35.727Z
Learning: Applies to packages/tom-server/src/admin-settings-api/admin-settings-api/**/*.ts : Admin-settings-api module structure should follow the pattern: index.ts for module export, routes/, controllers/, middlewares/, services/, tests/, and types.ts for type definitions

Applied to files:

  • AGENTS.md
📚 Learning: 2026-03-17T11:21:21.409Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/logger/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:21.409Z
Learning: Applies to packages/logger/src/logger/src/__testData__/**/*.json : Use `__testData__/` directory to store JSON fixtures for testing logger config error paths

Applied to files:

  • packages/logger/package.json
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to packages/*/jest.config.ts : Each package in the monorepo should have its own `jest.config.ts` extending `jest-base.config.js` at the root

Applied to files:

  • packages/logger/package.json
📚 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/logger/package.json
📚 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/logger/package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx} : Use camelCase naming convention for variables and functions in TypeScript

Applied to files:

  • CODING_STYLE.md
📚 Learning: 2026-03-17T11:19:38.170Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:38.170Z
Learning: Applies to packages/*/package.json : Each package uses the `twake/*` workspace protocol for inter-package dependencies

Applied to files:

  • package.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to packages/*/package.json : All inter-package dependencies must be managed via npm workspace protocol (using twake/<name> naming convention)

Applied to files:

  • package.json
🪛 actionlint (1.7.11)
.github/workflows/_build-affected.yml

[error] 38-38: input "skip-nx-cache" is not defined in action "Build" defined at "./.github/actions/build-affected". available inputs are "upload-artifacts"

(action)

🪛 Checkov (3.2.508)
nx.json

[low] 9-10: Base64 High Entropy String

(CKV_SECRET_6)

🪛 Gitleaks (8.30.0)
nx.json

[high] 9-9: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🪛 LanguageTool
CONTRIBUTING.md

[uncategorized] ~45-~45: The official name of this software platform is spelled with a capital “H”.
Context: ...sue Use the appropriate issue template. Fill every field — spa...

(GITHUB)


[grammar] ~45-~45: Ensure spelling is correct
Context: ...ery field — sparse issues get closed or deprioritised. The template will guide you through wh...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~103-~103: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... as possible. | | priority::high | We want to do this soon. | | priority::normal | ...

(REP_WANT_TO_VB)


[uncategorized] ~145-~145: The official name of this software platform is spelled with a capital “H”.
Context: ... ### Opening a PR Use the PR template. Link the iss...

(GITHUB)

CODING_STYLE.md

[style] ~774-~774: Consider simply using “of” instead.
Context: ...y formatter, which means every consumer of any of those things gets pulled into the chang...

(OF_ANY_OF)

🪛 markdownlint-cli2 (0.21.0)
.github/pull_request_template.md

[warning] 1-1: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)


[warning] 17-17: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 24-24: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 28-28: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 32-32: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 37-37: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🔇 Additional comments (33)
packages/amqp-connector/package.json (1)

10-11: LGTM.

Test script correctly suppresses log output via LOG_TRANSPORTS=File LOG_FILE=/dev/null, and the Biome check script aligns with the repo-wide linting migration. No complaints here.

packages/matrix-resolve/package.json (1)

37-38: LGTM.

Consistent with the repo-wide test and linting standardization. Move along.

packages/crypto/package.json (1)

37-38: LGTM.

Log suppression and Biome integration look correct. Crypto package tests will run quietly as expected.

packages/config-parser/package.json (1)

55-56: LGTM.

Tooling scripts updated correctly. Zero runtime dependencies constraint remains satisfied. Good discipline.

packages/logger/package.json (1)

38-39: LGTM — intentional exception.

Plain jest without log suppression is correct here. The logger package tests exercise transport behavior and require actual log output. Biome check script added as expected.

Based on learnings: In packages/logger/package.json, the test script intentionally runs plain jest without LOG_TRANSPORTS=File LOG_FILE=/dev/null. Adding those env vars causes the logger package's tests to fail.

packages/db/package.json (1)

38-39: LGTM.

Log suppression correct. The --passWithNoTests flag is pragmatic for a db abstraction layer that may rely more on integration tests elsewhere. Biome check added.

packages/tom-server/package.json (1)

39-40: LGTM.

Standard tooling update for the main server package. Log suppression and Biome check integrated correctly.

biome.json (1)

1-118: Solid Biome configuration. Clean, opinionated, and well-reasoned.

The schema pin to 2.4.8 protects against nursery rule breakage. The file scoping to packages/**/*.{js,jsx,ts,tsx} is correct for this monorepo structure. The rules are aggressive but intentional—noConsole: error and noEnum: warn as forcing functions to drive cleanup is a legitimate (if brutal) strategy.

One small observation: the check target inputs in nx.json reference {workspaceRoot}/biome.json, so cache invalidation will correctly trigger when this file changes. Good.

packages/matrix-identity-server/package.json (1)

40-41: Scripts look correct. Consistent with the repo-wide Biome migration.

The check script properly invokes biome check . and will be picked up by the Nx check target. Test script correctly suppresses log output.

packages/common-settings-bridge/package.json (1)

10-12: Good. Test log suppression and Biome check script are correct.

The LOG_TRANSPORTS=File LOG_FILE=/dev/null prefix properly silences logger output during tests, and the check script aligns with the repo-wide Biome migration.

packages/federated-identity-service/package.json (1)

38-39: Consistent with the other packages. LGTM.

nx.json (2)

16-18: test.dependsOn: ["^build", "^test"] creates a correct dependency chain.

This ensures that when running tests for a package:

  1. All upstream packages are built first (^build)
  2. All upstream package tests pass first (^test)

This is the correct ordering for a monorepo where packages depend on each other. Previous review comments about this were addressed.


20-29: The check target cache inputs are well-defined.

Explicitly listing {projectRoot}/**/*.{js,jsx,ts,tsx} plus {workspaceRoot}/biome.json ensures cache invalidation happens correctly when:

  • Any source file in the package changes
  • The shared Biome config changes

This avoids stale lint results. Good work.

.github/workflows/_test.yml (1)

32-33: Correct. The --skip-nx-cache flag is now properly positioned.

Previous review caught that -- --skip-nx-cache would pass the flag to Jest instead of Nx. This fix ensures cache-skipping actually works. The nx run-many -t test invocation will respect the NX_BASE/NX_HEAD environment variables set by nrwl/nx-set-shas upstream.

.github/workflows/AGENTS.md (1)

19-19: Documentation updated to reflect reality. Good.

CLAUDE.md (1)

23-26: Update npm script names in CLAUDE.md to match actual Biome commands.

Lines 23-26 reference npm run format:check and npm run format:fix, but the root package.json contains only check and check:fix (both using Biome). Documentation that points to non-existent scripts is worse than useless—it breaks workflows. Change these to:

npm run check
npm run check:fix
.github/workflows/_lint.yml (1)

27-28: LGTM — clean target swap.

The check target is properly defined in nx.json with correct cache inputs, and every package defines "check": "biome check .". The Nx SHA setup handles base/head automatically. This works.

.github/pull_request_template.md (1)

1-40: Solid template — gets the job done.

Script references are correct (npm run check), relative paths to CODING_STYLE.md and CONTRIBUTING.md work from .github/. The checklist is comprehensive without being bureaucratic.

Static analysis whines about missing blank lines around headings (MD022) and wanting a top-level H1 (MD041). For a PR template that GitHub renders contextually, these are irrelevant noise. Ignore them.

.github/workflows/ci.yml (1)

19-26: Proper job ordering — race condition squashed.

Build runs first, test waits for it via needs: [build]. Lint runs in parallel (no artifact dependency needed). Clean and correct.

packages/utils/package.json (1)

47-51: LGTM — correct log suppression for non-logger package.

LOG_TRANSPORTS=File LOG_FILE=/dev/null keeps test output clean without breaking anything. The check script properly invokes biome check .. Based on learnings, this is the correct pattern for utils (the logger package intentionally omits these env vars because it tests actual log output).

.github/workflows/_test-ci.yml (1)

35-36: --skip-nx-cache now correctly positioned.

Top-level Nx flag, not swallowed by the test executor. This actually works now.

.github/ISSUE_TEMPLATE/feature_request.yml (1)

1-67: Well-structured template — use-case-first approach is correct.

Package dropdown now lists all 11 packages (previous review addressed). Forcing use case before solution prevents solution-shaped problems from poisoning the issue tracker. Clean.

.github/ISSUE_TEMPLATE/bug_report.yml (1)

1-96: Package list now correct and consistent.

All 11 packages enumerated correctly (previous review about misnamed/missing packages addressed). Severity scale is reasonable. Required fields cover what's needed to actually reproduce bugs without being an interrogation.

CONTRIBUTING.md (1)

1-218: Solid contribution guide. Clean, opinionated, and actionable.

The philosophy section cuts through the usual corporate fluff. "Simplicity over cleverness" and "Boundaries over conventions" are the right principles for a maintainable codebase. The commit/branch naming conventions are strict but practical.

The build-before-test guidance (line 139) will save contributors from the classic "why do my tests fail on a fresh clone" confusion.

.github/actions/build/action.yml (2)

5-8: Clean implementation of the cache bypass flag.

String comparison inputs.skip-nx-cache == 'true' is correct — composite action inputs are always strings, no type coercion magic here. The conditional --skip-nx-cache placement before any -- separator is also correct.

Also applies to: 16-17


24-24: Good call on ${{ github.run_id }} in artifact names.

Prevents artifact name collisions when multiple workflow runs execute concurrently. Simple fix for a real problem.

package.json (2)

29-30: Biome scripts are minimal and correct.

biome check . does format + lint in one pass. biome check --write . auto-fixes. No elaborate script chains, no cross-tool coordination. This is what "single tool" should look like.


46-46: @biomejs/biome at 2.4.8 — pinned exact version, good.

No caret, no tilde. Formatter/linter versions should be pinned to prevent "it works on my machine" drift. The CI and local environments will produce identical results.

CODING_STYLE.md (5)

1-30: This preface is exactly how style guides should be written.

"Any claim that a stylistic rule is objectively correct, in the absence of measurable justification, is a matter of opinion." — Finally, someone who gets it. Most style guides are cargo-culted preferences dressed up as universal truths.

The enforcement model is also correct: "Merge the style fix first; argue the rule separately." This prevents review threads from becoming philosophy debates.


235-294: The "no void returns" rule is aggressive. It's also correct.

I've debugged more production incidents caused by silent void functions than I care to count. "Did the email send? Did the database write? Did the cache invalidate?" — nobody knows, because the function returned nothing.

The ActionResult pattern you've specified:

type ActionResult =
  | { success: true }
  | { success: false; error: string };

This is the minimum viable signal. It costs nothing at runtime (small object), it costs nothing at dev time (one line of type annotation), and it makes every call site explicitly handle both outcomes. The ROI is enormous.

The framework-callback exemption (line 290-293) is the right escape hatch — you can't fight Express middleware signatures.


295-365: Recursion section is ruthlessly practical.

Most devs don't know that V8 doesn't implement TCO. They write elegant recursive solutions that blow the stack on production data. Your guidance:

"Non-tail recursion is forbidden in production code."

Combined with the explicit worklist pattern for tree/graph traversal — this will prevent real crashes. The stack.pop()! with explicit stack management is the correct approach.


571-765: Error handling section is the heart of this document.

The core distinction table at the end (lines 754-765) should be printed and taped to every monitor. The difference between "expected failure → Result" and "invariant violation → throw" is the single most misunderstood concept in application code.

The Error.cause mandate is particularly important — it's been in the spec since ES2022, supported since Node 16.9, and almost nobody uses it. Debug chains that terminate at the first catch are a plague.


777-795: No barrel exports — the right call.

"it creates circular dependency risks... it prevents bundler tree-shaking... it makes the true source of any given export invisible"

All three are real problems I've seen kill build performance and cause mysterious import cycles. The "import from the specific file" guidance produces longer import paths but zero ambiguity.

Comment thread .github/actions/build-affected/action.yml
Comment thread .github/workflows/_build.yml Outdated
Comment thread nx.json Outdated
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Signed-off-by: Pierre 'McFly' Marty <pmarty@linagora.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 33980f5a-42c3-4438-81a0-a4fce22c8461

📥 Commits

Reviewing files that changed from the base of the PR and between 4a91195 and bcac048.

📒 Files selected for processing (14)
  • .github/pull_request_template.md
  • .github/workflows/AGENTS.md
  • .github/workflows/_build-affected.yml
  • .github/workflows/_build.yml
  • .github/workflows/_lint.yml
  • .github/workflows/_test-ci.yml
  • .github/workflows/_test.yml
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • AGENTS.md
  • CLAUDE.md
  • CODING_STYLE.md
  • CONTRIBUTING.md
  • nx.json
📜 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
🧠 Learnings (49)
📓 Common learnings
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to package.json : This is an npm workspaces + Lerna monorepo with ESM modules (`"type": "module"`)
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use .eslintrc.cjs configuration (TypeScript + Prettier) for code linting and formatting
📚 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: Run tests using `npx nx run twake/tom-server:test` to execute all unit and integration tests

Applied to files:

  • .github/workflows/release.yml
  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
  • nx.json
📚 Learning: 2026-03-17T11:23:51.582Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:51.582Z
Learning: Run identity-server tests using the command: npx nx run twake/tom-server:test -- --testPathPattern=identity-server

Applied to files:

  • .github/workflows/release.yml
  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-18T21:36:12.246Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: biome.json:58-58
Timestamp: 2026-03-18T21:36:12.246Z
Learning: In linagora/ToM-server, the `noConsole: "error"` rule in `biome.json` is intentionally strict. The linting pipeline is expected to fail temporarily while existing `console.*` calls are progressively replaced with `twake/logger` (TwakeLogger). This is a deliberate enforcement strategy, not an oversight.

Applied to files:

  • .github/pull_request_template.md
  • AGENTS.md
  • CONTRIBUTING.md
📚 Learning: 2026-03-18T21:38:15.357Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: biome.json:94-94
Timestamp: 2026-03-18T21:38:15.357Z
Learning: In linagora/ToM-server, the `noEnum: "warn"` rule in `biome.json` is intentional. The linting pipeline is expected to fail temporarily while existing `enum` declarations (e.g., `ETransportType`, `ProfileField`, `ProfileVisibility`, `SMS_FOOTERS`, `SynapseAdminRetryMode`, `ConnectionState`) are progressively replaced with string unions and runtime type guards, as prescribed in CODING_STYLE.md. This is a deliberate enforcement strategy, not an oversight.

Applied to files:

  • AGENTS.md
📚 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: TwakeServer is the deployable server binary that composes MatrixIdentityServer with 12 Twake-specific REST API modules into a single Express application

Applied to files:

  • AGENTS.md
  • CLAUDE.md
📚 Learning: 2026-03-17T11:23:51.582Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:51.582Z
Learning: Applies to packages/tom-server/src/identity-server/identity-server/index.ts : TwakeIdentityServer should extend MatrixIdentityServer with Twake-specific user lookup and search capabilities

Applied to files:

  • AGENTS.md
  • CLAUDE.md
📚 Learning: 2026-03-17T11:23:51.582Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:51.582Z
Learning: Applies to packages/tom-server/src/identity-server/identity-server/{index.test,with-cache.test}.ts : Write integration tests for TwakeIdentityServer in index.test.ts and cache-enabled lookup behavior in with-cache.test.ts

Applied to files:

  • AGENTS.md
  • CLAUDE.md
📚 Learning: 2026-03-17T11:24:13.473Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/metrics-api/AGENTS.md:0-0
Timestamp: 2026-03-17T11:24:13.473Z
Learning: Applies to packages/tom-server/src/metrics-api/**/metrics-api/services/**/*.ts : Services in metrics-api must query the Matrix (Synapse) database directly, not the identity server DB

Applied to files:

  • AGENTS.md
📚 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/**/(controllers|middlewares)/**/*.{ts,tsx} : Validate authentication via Matrix access tokens using the identity server's `authenticate()` method

Applied to files:

  • AGENTS.md
📚 Learning: 2026-03-17T11:21:40.136Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:40.136Z
Learning: Organize Matrix Identity Server feature modules to mirror the Matrix Identity Server v2 specification, with each subdirectory handling one area of the spec

Applied to files:

  • AGENTS.md
  • CLAUDE.md
📚 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/**/*.{ts,tsx} : Pass singleton services (AddressbookService, UserInfoService, TokenService, SmsService) created in `_initServer()` to API modules via dependency injection

Applied to files:

  • AGENTS.md
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/packages/tom-server/**/*.{ts,tsx} : Use Express framework for HTTP server implementation

Applied to files:

  • AGENTS.md
  • CLAUDE.md
📚 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/@(addressbook-api|admin-settings-api|deactivate-account-api|invitation-api|matrix-api|metrics-api|qrcode-api|sms-api|user-info-api|vault-api|wellKnown)/**/*.{ts,tsx} : All API modules must follow the pattern: `routes/index.ts` → router → `controllers/` + `middlewares/` + `services/`

Applied to files:

  • AGENTS.md
📚 Learning: 2026-03-17T11:23:51.582Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:51.582Z
Learning: Applies to packages/tom-server/src/identity-server/identity-server/index.ts : TwakeIdentityServer must add twakeDbCollections to extend the identity server database schema

Applied to files:

  • AGENTS.md
  • CLAUDE.md
📚 Learning: 2026-03-17T11:21:03.013Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/federated-identity-service/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:03.013Z
Learning: Run tests using npx nx run twake/federated-identity-service:test

Applied to files:

  • .github/workflows/_lint.yml
  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-17T11:20:04.027Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/common-settings-bridge/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:04.027Z
Learning: Use `npx nx run twake/common-settings-bridge:test` to run tests for this service

Applied to files:

  • .github/workflows/_lint.yml
  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-17T11:24:55.383Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/utils/AGENTS.md:0-0
Timestamp: 2026-03-17T11:24:55.383Z
Learning: Run tests using `npx nx run twake/utils:test` command

Applied to files:

  • .github/workflows/_lint.yml
  • CLAUDE.md
  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-18T21:21:02.822Z
Learnt from: pm-McFly
Repo: linagora/ToM-server PR: 341
File: .github/actions/build-affected/action.yml:12-14
Timestamp: 2026-03-18T21:21:02.822Z
Learning: In the ToM-server repository, `npx nx affected` commands in CI do not need an explicit `--base` flag. The `nrwl/nx-set-shasv4` action runs beforehand and sets the `NX_BASE` and `NX_HEAD` environment variables, which `nx affected` picks up automatically. Suggesting `--base=origin/...` is unnecessary and incorrect in this context.

Applied to files:

  • .github/workflows/_lint.yml
  • .github/workflows/_test.yml
  • .github/workflows/_build-affected.yml
  • .github/workflows/_build.yml
  • .github/workflows/ci.yml
  • .github/workflows/_test-ci.yml
  • nx.json
📚 Learning: 2026-03-17T11:23:29.212Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/addressbook-api/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:29.212Z
Learning: Run addressbook tests using: npx nx run twake/tom-server:test -- --testPathPattern=addressbook

Applied to files:

  • CLAUDE.md
  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 Learning: 2026-03-17T11:23:29.212Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/addressbook-api/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:29.212Z
Learning: Applies to packages/tom-server/src/addressbook-api/tests/*.test.ts : Test files must follow the pattern controller.test.ts, middleware.test.ts, router.test.ts, service.test.ts in tests/ directory

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Use Jest for all unit and integration tests, extending jest-base.config.js configuration

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js} : Tests should run with `LOG_TRANSPORTS=File LOG_FILE=/dev/null jest` to suppress log output

Applied to files:

  • CLAUDE.md
  • .github/workflows/_test.yml
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Run npm build before running tests on a fresh checkout to ensure packages are built

Applied to files:

  • CLAUDE.md
  • .github/workflows/ci.yml
  • CONTRIBUTING.md
  • .github/workflows/_test-ci.yml
  • nx.json
📚 Learning: 2026-03-17T11:20:10.724Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/common-settings-bridge/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:10.724Z
Learning: Applies to packages/common-settings-bridge/src/src/common-settings-bridge/**/*.test.ts : Use Jest for testing TypeScript code in the bridge module

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Build all packages using Lerna and Rollup; output goes to dist/ directory

Applied to files:

  • CLAUDE.md
📚 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: Test twake/config-parser using `npx nx run twake/config-parser:test`

Applied to files:

  • CLAUDE.md
  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 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: Run tests using `npx nx run twake/logger:test`

Applied to files:

  • CLAUDE.md
  • .github/workflows/_test.yml
  • .github/workflows/_test-ci.yml
📚 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:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:21:40.136Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:40.136Z
Learning: Applies to packages/matrix-identity-server/src/src/index.ts : Register new Matrix Identity Server endpoints in `index.ts` and mount them at `/_matrix/identity/v2/` prefix

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Implement Matrix Identity Server v2 spec-compliant REST API endpoints

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:21:40.136Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/matrix-identity-server/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:40.136Z
Learning: Applies to packages/matrix-identity-server/src/src/userdb/*.ts : Select userdb backend via `user_db` config key: `sqlite`, `pg`, `ldap`, or empty string

Applied to files:

  • CLAUDE.md
📚 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:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:21:09.401Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/federated-identity-service/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:21:09.401Z
Learning: `FederatedIdentityService` extends `MatrixIdentityServer` with federation-specific authentication, IP filtering, and routing

Applied to files:

  • CLAUDE.md
📚 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/**/*.{ts,tsx} : Mount TwakeServer endpoints by accessing `this.endpoints` (Express Router) and using `app.use('/', server.endpoints)`

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:24:55.383Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/utils/AGENTS.md:0-0
Timestamp: 2026-03-17T11:24:55.383Z
Learning: The twake/utils package provides shared utility functions and Matrix error definitions for use across all twake/* server packages

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:23:51.582Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/tom-server/src/identity-server/AGENTS.md:0-0
Timestamp: 2026-03-17T11:23:51.582Z
Learning: Applies to packages/tom-server/src/identity-server/identity-server/{index,lookup/**}.ts : Register two Twake-specific endpoints: POST /_twake/identity/v1/lookup/match for searching users by field (mail, uid, sn, givenName, etc.) and POST /_twake/identity/v1/lookup/diff for retrieving users updated since a timestamp

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Configuration should be loaded via `twake/config-parser` from (in priority order): `/etc/twake/server.conf`, `TWAKE_SERVER_CONF` env var, or constructor argument

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Always prefix RTK (Rust Token Killer) commands with `rtk` for token optimization, even in command chains with `&&`

Applied to files:

  • CLAUDE.md
📚 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/**/*.{test,spec}.{ts,tsx} : Tests must use SQLite in-memory database and mock external services (SMTP, Matrix homeserver) rather than using real services

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to packages/*/jest.config.ts : Each package in the monorepo should have its own `jest.config.ts` extending `jest-base.config.js` at the root

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:20:46.846Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/db/AGENTS.md:0-0
Timestamp: 2026-03-17T11:20:46.846Z
Learning: Applies to packages/db/**/*.test.{ts,tsx} : Use SQLite in-memory database for test isolation in twake/db tests

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:19:52.544Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/src/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:52.544Z
Learning: Applies to packages/amqp-connector/src/amqp-connector/src/index.test.ts : Jest tests in index.test.ts must mock amqplib and cover connection lifecycle, reconnection, and error handling scenarios

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:19:45.697Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/amqp-connector/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:45.697Z
Learning: Applies to packages/amqp-connector/src/**/*.test.{ts,tsx} : Mock amqplib in tests — no live broker required for testing

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to **/*.{ts,tsx,js,mjs} : Use `twake/*` package imports instead of relative imports for cross-package dependencies

Applied to files:

  • CLAUDE.md
📚 Learning: 2026-03-17T11:19:12.482Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to package.json : This is an npm workspaces + Lerna monorepo with ESM modules (`"type": "module"`)

Applied to files:

  • CLAUDE.md
  • nx.json
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx} : Use camelCase naming convention for variables and functions in TypeScript

Applied to files:

  • CODING_STYLE.md
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use .eslintrc.cjs configuration (TypeScript + Prettier) for code linting and formatting

Applied to files:

  • CODING_STYLE.md
📚 Learning: 2026-03-17T11:19:38.170Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: packages/AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:38.170Z
Learning: Applies to packages/*/tsconfig.json : TypeScript configuration in each package follows the shared base `tsconfig.json` at the root

Applied to files:

  • nx.json
🪛 LanguageTool
AGENTS.md

[uncategorized] ~32-~32: The official name of this software platform is spelled with a capital “H”.
Context: ...ocal dev (see .compose/AGENTS.md) | | .github/ | GitHub Actions CI/CD workflows (se...

(GITHUB)


[uncategorized] ~32-~32: The official name of this software platform is spelled with a capital “H”.
Context: ... | GitHub Actions CI/CD workflows (see .github/AGENTS.md) | | `...

(GITHUB)

CONTRIBUTING.md

[uncategorized] ~45-~45: The official name of this software platform is spelled with a capital “H”.
Context: ...sue Use the appropriate issue template. Fill every field — spa...

(GITHUB)


[grammar] ~45-~45: Ensure spelling is correct
Context: ...ery field — sparse issues get closed or deprioritised. The template will guide you through wh...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~104-~104: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...s possible. | | priority::high | We want to do this soon. | | `prior...

(REP_WANT_TO_VB)


[uncategorized] ~146-~146: The official name of this software platform is spelled with a capital “H”.
Context: ... ### Opening a PR Use the PR template. Link the iss...

(GITHUB)

CODING_STYLE.md

[style] ~780-~780: Consider simply using “of” instead.
Context: ...y formatter, which means every consumer of any of those things gets pulled into the chang...

(OF_ANY_OF)

🪛 markdownlint-cli2 (0.21.0)
.github/pull_request_template.md

[warning] 1-1: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🔇 Additional comments (14)
CLAUDE.md (1)

55-238: Documentation formatting changes look clean.

The blank line additions improve readability, the table reformatting maintains content integrity, and the removal of the old npm run lint/npm run lint-fix commands (mentioned in the summary) aligns perfectly with the ESLint/Prettier → Biome migration. The format:check/format:fix commands that remain are Biome's replacements.

Consistent spacing around code blocks and headers follows standard markdown conventions. No issues.

.github/workflows/release.yml (1)

17-19: LGTM — Clean secret forwarding for release builds.

Skipping Nx cache on releases (skip-nx-cache: true) combined with proper NX_CLOUD_ACCESS_TOKEN passthrough ensures deterministic release validation. The pattern is consistent with how other workflows in this PR handle the token.

.github/workflows/AGENTS.md (1)

12-23: LGTM — Documentation accurately reflects the Biome migration.

The _lint.yml description correctly states "Biome checks" instead of the old ESLint/Prettier reference. Table formatting is clean.

AGENTS.md (1)

11-24: LGTM — Key Files table properly updated for the tooling migration.

The biome.json entry correctly describes it as "Biome linter and formatter configuration" (addressing the earlier review feedback). The old .eslintrc.cjs reference is gone, matching the actual repo state.

.github/workflows/_lint.yml (1)

30-33: LGTM — Lint target correctly updated for Biome.

The switch from format:check to check aligns with Biome's unified lint+format target. The continue-on-error: true on line 17 is intentional — based on learnings, the pipeline is expected to temporarily fail while existing console.* and enum usages are progressively migrated.

.github/pull_request_template.md (1)

1-45: LGTM — Solid PR template with accurate tooling references.

The checklist is comprehensive and the npm run check command on line 20 correctly reflects the Biome migration. The relative paths (../CODING_STYLE.md, ../CONTRIBUTING.md) are correct for files in .github/ referencing root-level docs.

The MD041 warning about "first line should be H1" is irrelevant noise — PR templates conventionally start with ## sections, not document titles.

.github/workflows/_test.yml (1)

35-38: LGTM — Test execution correctly wired.

Using npx nx run-many -t test instead of lerna run test is fine — Nx respects the dependsOn graph in nx.json. The --skip-nx-cache flag is now correctly placed (not after --), and the token injection is consistent with other workflows.

No nx-set-shas step needed here since run-many targets all packages, unlike affected commands.

.github/workflows/ci.yml (1)

21-32: LGTM — CI pipeline correctly orchestrated.

The needs: [build] dependency ensures tests run after builds (addressing the earlier race condition). The artifact sharing between build and test jobs relies on Nx Cloud's remote cache rather than GitHub artifact upload/download — this is the intended design given NX_CLOUD_ACCESS_TOKEN is wired through.

If Nx Cloud is unavailable, the test job will simply rebuild what it needs. Not ideal, but not broken.

.github/workflows/_build-affected.yml (1)

1-44: LGTM — Clean reusable workflow for affected builds.

The workflow structure is solid:

  • Input names (skip-nx-cache, upload-artifacts) correctly align with the composite action at .github/actions/build-affected/action.yml
  • NX_CLOUD_ACCESS_TOKEN at job-level env (line 27) ensures the composite action inherits it
  • nrwl/nx-set-shas@v4 properly sets up NX_BASE/NX_HEAD for affected detection

Previous review concerns (continue-on-error removal, skip-nx-cache exposure) have been addressed.

.github/workflows/_build.yml (1)

6-16: LGTM — Clean workflow interface extension.

The skip-nx-cache and NX_CLOUD_ACCESS_TOKEN wiring is correctly implemented: optional input with a sensible default, optional secret (appropriate for reusable workflows), and proper environment injection at job level. The pass-through to the composite action is correctly structured.

Also applies to: 26-27, 40-41

.github/workflows/_test-ci.yml (1)

11-13: LGTM — Properly wired Nx Cloud token and fixed cache flag.

The --skip-nx-cache is now correctly placed as a top-level Nx CLI flag (not after --), which actually bypasses the cache layer instead of being swallowed by Jest. The required: true constraint on NX_CLOUD_ACCESS_TOKEN is appropriate here since ci.yml correctly passes it.

Also applies to: 38-41

CONTRIBUTING.md (1)

1-220: LGTM — Solid contribution guide.

This is a well-structured, no-nonsense contribution guide. The philosophy section (simplicity, explicitness, boundaries) sets clear expectations. The pre-PR checklist correctly includes the build step before tests. Label taxonomy is comprehensive without being bureaucratic. Commit conventions are properly documented with convco integration.

The "deprioritised" spelling is British English — perfectly valid, and trying to enforce American spelling in a project contribution guide is a waste of everyone's time.

nx.json (1)

9-34: LGTM — Properly restructured Nx configuration.

The critical security issue (read-write token in repo) is properly addressed by switching to nxCloudId with the actual token passed via NX_CLOUD_ACCESS_TOKEN environment variable in CI. The dependency graph is now correct:

  • build → ^build: builds depend on upstream builds only
  • test → ^build, ^test: tests depend on upstream builds AND upstream tests

The check target's inputs array correctly includes {workspaceRoot}/biome.json — cache invalidation will trigger when the linter config changes. No dependsOn is correct since linting operates on source files, not build artifacts.

CODING_STYLE.md (1)

1-1077: This is how a style guide should be written.

Every rule has a stated reason. The preface acknowledges subjectivity while demanding argued changes through PRs, not review thread derailments. The Result pattern explanation (Section 7) is particularly well-executed — it's the clearest treatment of "exceptions vs. expected failures" I've seen in a project style guide.

The "void is forbidden" stance will generate debate, but the reasoning is sound: a function that returns nothing tells its caller nothing about success or failure. The ActionResult pattern is a reasonable contract.

Two minor code example bugs flagged above — fix those and this document is ready to be the law.

Comment thread CODING_STYLE.md
Comment thread CODING_STYLE.md Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
CODING_STYLE.md (1)

58-69: ⚠️ Potential issue | 🟡 Minor

The "Non-standard" example shows the STANDARD pattern. Fix it.

Your comment on line 59 claims the example demonstrates "brace on new line" as non-standard, but the code immediately below it shows the brace on the same line — which is the standard you're advocating. The non-standard example needs to actually show the anti-pattern (opening brace on a new line).

🔧 Corrected example showing the actual anti-pattern
 ```ts
-// Non-standard — brace on new line, contradicts formatter defaults and wastes a line.
-function calculateTotal(items: Item[]) {
+// Non-standard — brace on new line wastes vertical space.
+function calculateTotal(items: Item[])
+{
   return items.reduce((sum, item) => sum + item.price, 0);
 }
 
 // Standard.
 function calculateTotal(items: Item[]): number {
   return items.reduce((sum, item) => sum + item.price, 0);
 }

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4a0ef989-566a-48a2-aa04-1d79785eca34

📥 Commits

Reviewing files that changed from the base of the PR and between bcac048 and 80cdf4d.

📒 Files selected for processing (1)
  • CODING_STYLE.md
📜 Review details
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T11:19:12.482Z
Learning: Applies to package.json : This is an npm workspaces + Lerna monorepo with ESM modules (`"type": "module"`)
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use .eslintrc.cjs configuration (TypeScript + Prettier) for code linting and formatting
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx} : Use camelCase naming convention for variables and functions in TypeScript

Applied to files:

  • CODING_STYLE.md
📚 Learning: 2026-03-17T11:19:25.539Z
Learnt from: CR
Repo: linagora/ToM-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T11:19:25.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use .eslintrc.cjs configuration (TypeScript + Prettier) for code linting and formatting

Applied to files:

  • CODING_STYLE.md
📚 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:

  • CODING_STYLE.md
📚 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:

  • CODING_STYLE.md
📚 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 : Export error classes (ConfigError, InvalidNumberFormatError, etc.) for consumer use

Applied to files:

  • CODING_STYLE.md
📚 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:

  • CODING_STYLE.md
🪛 LanguageTool
CODING_STYLE.md

[style] ~785-~785: Consider simply using “of” instead.
Context: ...y formatter, which means every consumer of any of those things gets pulled into the chang...

(OF_ANY_OF)

🔇 Additional comments (3)
CODING_STYLE.md (3)

394-397: Code example is now correct.

The past review flagged this as having inconsistent return types, but the current code correctly returns Result<AppConfig, string> in both success and failure branches. The issue has been resolved.


1-1083: Solid work. Ship it after fixing the documentation bug.

This is a well-reasoned, comprehensive coding standard. You've backed up nearly every rule with concrete justification — cognitive load, diff cleanliness, type safety, runtime behavior. The error handling section (Result pattern, catch at boundaries, Error.cause) is particularly strong. The prohibition list is aggressive but internally consistent.

Two actionable items:

  1. Fix the brace example bug (lines 58-69) — already flagged above
  2. Verify the TCO claim about JS engines is still current — also flagged

The integration with biome.json is consistent (120 char limit, 2-space indent, semicolons, trailing commas all match). The prohibition of void returns will be contentious but you've made the case clearly. Enforce it or don't, but the reasoning is there.

Minor: Your recursion section is thorough but might scare people away from legitimate tail-recursive solutions. Consider emphasizing that the iterative alternative is preferred not because recursion is wrong, but because TCO is unreliable across runtimes.


298-307: The TCO claims in the documentation are accurate.

JavaScriptCore (Safari) remains the only mainstream engine with proper tail-call optimization. V8 and SpiderMonkey still don't support it as of 2026. Your examples and rationale stand—no changes needed.

@pm-McFly pm-McFly merged commit 99244b1 into dev Mar 23, 2026
10 of 11 checks passed
@pm-McFly pm-McFly deleted the chore/contributing/updates-documents-and-gh-templates branch March 24, 2026 09:45
@coderabbitai coderabbitai bot mentioned this pull request Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant