Life ConnectLife Connect
Wiki index
Architecture
Services
UI
Concepts
Runbooks
Infra
Swagger Docs
GitHub
Wiki index
Architecture
Services
UI
Concepts
Runbooks
Infra
Swagger Docs
GitHub
  • Cross-cutting concepts

    • EventBridge fanout
    • Atlas Triggers
    • ECS Fargate deploy lifecycle
    • Keycloak hosting
    • Cloudflare Pages auto-deploy
    • Bitbucket Pipelines (legacy)
    • Terraform-managed envs (legacy)
  • Accounting model

    • Accounting model
    • Events catalog
    • Accounting journals
    • Plan of accounts (PCG)
    • Auxiliary accounts
    • FEC fields (Fichier des Écritures Comptables)
    • pieceReference numbering
    • Tenant matrix (payable / receivable)
    • Owner matrix (payable / receivable)
    • Take-over UI display rules
    • Engine functional audit (2026-07) ↗
Last updated 2026-09-16

Test coverage — unit gates and capability coverage

AI-generated content

This document was generated by an AI assistant. Verify accuracy before relying on the details.

Two different things are called "coverage" here and they answer different questions. The unit gate is a percentage of executed lines, enforced per workspace member by vitest. The capability coverage is a count of the application's 248 user-facing capabilities that a test has actually driven against the live staging deployment — it says what the software is known to do, not how much of the code ran. The second is the one that found 21 confirmed defects; the first is the one that blocks a merge.

At a glance

unit gatecapability coverage
Questionhow much code did the tests execute?which capabilities are proven to work?
Unit% of lines/statements/functions/branchesone row per capability
Threshold85%, global and uniformno threshold — a verdict per row
Enforced byvitest, per member (vitest.shared.mjs:20)apps/ui/test/e2e-feature-index.test.mjs
Statusexpected RED until the test fan-out lands63% covered, measured 16/09/2026

Details

The unit gate

vitest.shared.mjs sets COVERAGE_THRESHOLD = 85 and applies it to lines, statements, functions and branches alike. Each member scopes coverage.include to its own sources and vitest exits non-zero below the threshold, which fails the Coverage workflow.

Measured 16/09/2026 across apps/*, packages/* and services/*: 99.18 % of lines, and no member below the gate. The numbers and the per-member table are in the coverage report, regenerated by pnpm report:coverage.

That contradicts the workflow's own header, which still describes the gate as "expected RED until the test fan-out lands" with a baseline of "~65% global lines" and names @adb/data, @adb/mongo-broker, @adb/doc-renderer-service and @adb/shared-types as "well below 85%". Re-measured today, those four are at 98.77 %, 100 %, 98.87 % and 98.63 %. The comment is stale — the fan-out landed. .github/workflows/coverage.yml should be updated; this page records the measurement rather than the comment.

Two things the headline figure does not say, and both matter:

  • it is not "99 % of the codebase". Each member measures only what its own coverage.include declares. apps/ui scopes its gate to logic (app/{server,api,lib,hooks,auth,i18n}, workers/**), holds app/lib/rights/** at 100 %, and deliberately excludes its components and route modules. The figure compares each member against its own declaration;
  • it says nothing about whether the tests passed. Two members — @adb/action-logs and @adb/aggregates — reported coverage above the gate and still failed their run, on a failing test rather than on the threshold. The report names them for that reason. Two others (@adb/ui-storybook, @adb/reports-service) produced no figure at all, which is an unknown and not a zero.

Capability coverage

Every capability the Angular application exposes is one row in apps/ui/e2e/feature-index.md, with the route, the Angular source, the upstream call, and a verdict naming the spec that proves it. The verdict vocabulary is closed to five values and a test rejects a sixth invented in passing.

verdictmeaningcountshare
staging: yesdriven end to end against the live app15663%
staging: partialpartly driven, and the row says which part3615%
characterised as unreachableno user path reaches it239%
characterised as brokenreached, and the application failed198%
staging: nonenot covered, and the row says why146%
total248

The 42 rows marked unreachable or broken are a result, not a backlog: they are what the exercise was for.

Trajectory. The column did not exist before this programme; the first pass verified 84 of 255 rows (33%) on 13/09/2026, and the count reached 156 of 248 (63%) on 16/09.

What it found

apps/ui/e2e/staging/TO-FIX.md carries 21 confirmed defects, ordered by what the user loses:

severitymeaningn
data lossan action destroys or overwrites what the user is not looking at3
silent wrong writethe save is acknowledged and something else is stored3
blocked capabilitythe function exists and cannot complete6
wrong figure displayeda money total on screen that does not match its lines1
server configurationa route denied to everyone, administrators included1
misleading messagethe screen asserts the opposite of the data1
mock screena static mock served as a real screen1
to qualifyestablished, severity not yet decided5

Each defect has two specs — see the staging suite.

Five findings were withdrawn

Writing the spec that specifies a fix forces a re-measurement, and five findings did not survive it. They are listed with their real cause in TO-FIX.md. This matters as much as the 21 that stood: a false finding is paid for by whoever is sent to fix working code. The most instructive was a row locator that matched the table's header — a collapsed column filter puts every one of its options in the header's text content, so hasText matched it for any value.

Open questions

  • The unit gate's path to green is the test fan-out, which is its own programme; no date.
  • Capability coverage is measured on account 1's organisation. A second organisation exercises a different data shape, and a handful of rows are known to differ between them.
  • The 5 defects marked "to qualify" need a product decision before they can be estimated.
Edit this page
Last Updated:
Contributors: Grégory Horion