Notaire

Act III · What keeps it safe

AI Factory · Quality gates

Gates are commands, not opinions

Each gate is a script or a workflow that exits non-zero. The same checks run on the agent's machine before a push and again in GitHub Actions, and the repository refuses a merge that skipped them. When a CI gate is added or changed, preflight.sh changes in the same PR, so local and CI never drift.
Local gates → light CI → heavy CI → merge gate → post-merge release, deploy and weekly checks.Swipe sideways to see the whole diagram.

Before the push

Plan check

Every mandatory section and task group is present, and the Issue exists and is open on GitHub.

Preflight (pre-push hook)

A local mirror of the CI gates. mvn verify alone does not predict CI: Spotless is deliberately unbound from the Maven lifecycle.

Full pipeline (pre-PR)

Brings the Docker stack up, runs the security case catalog and preflight --full, lints markdown, and writes an HTML dashboard.

Light CI is not enough

PR Validation, Frontend CI and Process Checks finish first and can report "all N checks success" while the backend Integration suite and Playwright are still queued. A merge needs the heavy set to be terminal success: Unit, Integration, Coverage Gate, Bruno API and Playwright UI. check-heavy-ci.sh <pr> must exit 0. The protect-main ruleset also requires five named checks: CI, Frontend CI, Playwright E2E, Code Lint and PR Validation.

Path-scoped CI

On pull requests, docs, OpenSpec and agent-only paths skip the Java and Playwright leaf jobs. Suite aggregators keep the required check names green by treating an intentional skipped as success. Pushes to main, schedules and manual dispatch always run the full suite, and a test guards those invariants.

Coverage and tests

LevelWhereGate
Unit + integration (backend)backend-api/src/test/java/…/unit, …/integrationJaCoCo ratchet floor in mvn verify (80% line / 65% branch)
Component (frontend)frontend/src/**/*.test.tsx (Vitest)raise-only floors in vitest.config.ts
API contractBruno suite + OpenAPICU-API matrix + oasdiff breaking diff
E2Etesting/e2e/tests/TS-nnnn-*.spec.ts≥1 suite per critical Use Case; inventory drift guard
DatabaseFlyway migrations on PostgreSQLDatabase V&V workflow

Security by design

One security case catalog runs locally and in CI. Its families are threat-model, secrets, sast, sca, dast, policy. CI adds CodeQL (advanced setup only) and a blocking weekly OWASP ZAP baseline with a reviewed allowlist. A diff that touches authentication, authorization, personal data, secrets, dependencies or a public endpoint updates the threat model and the catalog in the same change. SonarQube runs in the local quality stack under infra/.

Every workflow and its job

WorkflowWhenWhat it provesTier
PR Validation
pr-validation.yml
PRTitle, branch naming, SDLC plan validation, Spotless/Checkstyle lint, quick buildlight
SDLC Process
sdlc-process.yml
PR · push · dailyProcess Checks on PRs; Main Health on main (archive hygiene, plans conform, harness self-tests)light
Frontend CI
frontend-ci.yml
PR · pushTypeScript, ESLint, Vitest with raise-only coverage floors, Next.js buildlight
OpenAPI Contract
openapi-contract.yml
PRCommitted OpenAPI matches the code; oasdiff flags breaking changeslight
CI - Build, Test & Security
ci.yml
PR · pushBuild, unit, integration, coverage gate (mvn verify), security scan, Docker image, reportsheavy
Playwright E2E — Full Suite
playwright-e2e.yml
PR · push · scheduleBruno API suite and Playwright UI in 3 shards, business coverage reportheavy
CodeQL
codeql.yml
PR · push · scheduleAdvanced-setup static analysis (never alongside default setup)heavy
Database V&V
database-vv.yml
PR · pushFlyway migrations verified against PostgreSQLheavy
CD - Build & Publish Docker
cd.yml
after CI on main · tagsRelease identity, sign and publish images to GHCR, SBOM assets on releasesafter
Release Please
release-please.yml
push to mainSemver release PR: poms, frontend package.json, release/product-release.json and CHANGELOG from merged commitsafter
Deploy GitHub Page
deploy-github-page.yml
after CI on mainBuilds this site with fresh coverage and E2E reportsafter
DAST — OWASP ZAP Baseline
dast-zap.yml
weeklyBlocking ZAP baseline with a reviewed allowlistscheduled
Performance - k6 Load Test
performance-test.yml
weeklyk6 load test against a live APIscheduled
Backup → Restore → Smoke
backup-restore-smoke.yml
weeklyRestores a backup and smoke-tests itscheduled
Test Coverage Report
test-coverage-report.yml
push · scheduleCoverage trend for the site and reportsscheduled
Cleanup Actions artifacts and logs
leanup-actions.yml
scheduleKeeps artifact storage under quotascheduled

Release and deploy

One product version

Backend, frontend and the Flyway schema ship under one SemVer tag. The version shows on /actuator/info, in OpenAPI and in the UI shell, and a coherence check runs in preflight, CI and CD.

Release Please

Merged Conventional Commits drive the release PR and the CHANGELOG. The Unreleased section is curated per release.

Signed images

CD runs only after CI succeeds on main. It builds, scans, signs with cosign and publishes the images to GHCR, and attaches product, database and image SBOMs to releases.