Skip to content

chore: mettre en place mise-en-place et fnox - #2796

Open
StephaneTrebel wants to merge 15 commits into
mainfrom
feat/environment-secrets
Open

StephaneTrebel wants to merge 15 commits into
mainfrom
feat/environment-secrets

Conversation

@StephaneTrebel

@StephaneTrebel StephaneTrebel commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Issues liées

Issues numéro: Refs #2125


Quel est le comportement actuel ?

La configuration des applications client et NestJS dépend de fichiers .env* et les secrets sont manipulés avec la configuration publique.

Quel est le nouveau comportement ?

mise expose les profils de configuration publique et fnox fournit les secrets aux processus consommateurs.

Les applications client et NestJS, Docker Compose et les workflows CI reçoivent explicitement leurs variables nécessaires.

Cette PR introduit-elle un breaking change ?

Non.

Autres informations

Retours de revue traités dans 60ae94e0b : transmission NestJS mutualisée, flags Compose explicites, configuration/secrets CI pour Playwright, bootstrap sans modification de la configuration suivie ni secret en argv, suppression des inputs Node inutilisés.

Validation locale : pnpm format, pnpm lint, cinq specs shell et mise -E ci run test:unit passent (1 332 tests réussis). Les régressions d’environnement sont ajoutées au job lint.

Images CI reconstruites, stack démarrée, santé NestJS 200 (database, Keycloak et OpenCDS up). mise -E ci run playwright:test passe : 162 réussis, 4 ignorés, 2 flaky réussis au retry (archivage de projet sous Chromium et suppression de dépôt sous Firefox).

CI verte sur bde64e256 ; dix fils résolus, nouvelle revue demandée à shikanime. Aucun critère global de #2125 coché par cette correction.

@StephaneTrebel StephaneTrebel added the enhancement New feature or request label Sep 29, 2026
@StephaneTrebel StephaneTrebel self-assigned this Sep 29, 2026
@StephaneTrebel StephaneTrebel added this to the 10.0.0 milestone Sep 29, 2026
@StephaneTrebel
StephaneTrebel removed the request for review from almorelle September 29, 2026 14:19
@github-actions github-actions Bot added the built label Sep 29, 2026
@StephaneTrebel
StephaneTrebel force-pushed the feat/environment-secrets branch 4 times, most recently from cd3dab1 to 058539d Compare October 5, 2026 13:05
Document mise/fnox and restrict the initializer to the frozen Fastify legacy.

Generated with AI assistance, reviewed by @StephaneTrebel

Refs #2125
Scope public configuration by consumer and bootstrap local pass secrets interactively.

Generated with AI assistance, reviewed by @StephaneTrebel

Refs #2125
Inject NestJS test configuration through the CI mise and fnox profile.

Generated with AI assistance, reviewed by @StephaneTrebel

Refs #2125
Whitelist browser-visible values and keep runtime substitution secret-free.

Generated with AI assistance, reviewed by @StephaneTrebel

Refs #2125
Add scoped NestJS public configuration and reject non-legacy tracked env files.

Generated with AI assistance, reviewed by @StephaneTrebel

Refs #2125
Use pinned mise tooling for lint, unit tests, and Playwright CI commands.

Generated with AI assistance, reviewed by @StephaneTrebel

Refs #2125
Map client and NestJS configuration from scoped mise and fnox inputs.

Generated with AI assistance, reviewed by @StephaneTrebel

Refs #2125
Use the pinned toolchain in package publishing and Sonar jobs.

Generated with AI assistance, reviewed by @StephaneTrebel

Refs #2125
Expose repository formatting through the supported task interface.

Generated with AI assistance, reviewed by @StephaneTrebel

Refs #2125
Document the agreed transition to mise and fnox.

Generated with AI assistance, reviewed by @StephaneTrebel

Refs #2125
Document mise/fnox and restrict the initializer to the frozen Fastify legacy.

Generated with AI assistance, reviewed by @StephaneTrebel

Refs #2125
Add scoped NestJS public configuration and reject non-legacy tracked env files.

Generated with AI assistance, reviewed by @StephaneTrebel

Refs #2125
Inject NestJS public configuration in unit tests.
Remove the obsolete Playwright dotenv load and retry delayed GHCR manifests.

Generated with AI assistance, reviewed by @StephaneTrebel

Refs #2125
@StephaneTrebel
StephaneTrebel force-pushed the feat/environment-secrets branch from 058539d to 7b7e3c8 Compare October 5, 2026 13:28
@StephaneTrebel
StephaneTrebel marked this pull request as ready for review October 5, 2026 13:28
@StephaneTrebel
StephaneTrebel requested a review from a team as a code owner October 5, 2026 13:28
@StephaneTrebel StephaneTrebel changed the title feat: centralize environment and secrets management Add mise-en-place and fnox Oct 5, 2026
@StephaneTrebel StephaneTrebel changed the title Add mise-en-place and fnox Utiliser mise-en-place et fnox Oct 6, 2026
@StephaneTrebel StephaneTrebel changed the title Utiliser mise-en-place et fnox Mettre en place mise-en-place et fnox Oct 6, 2026

@shikanime shikanime left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

probe 0

Comment thread mise.toml Outdated

@shikanime shikanime left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

probe 1

Comment thread docker/docker-compose.ci.yml

@shikanime shikanime left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

probe 2

Comment thread scripts/bootstrap-secrets.sh Outdated

@shikanime shikanime left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

probe 4

Comment thread scripts/bootstrap-secrets.sh Outdated

@shikanime shikanime left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

probe 5

Comment thread docker/docker-compose.ci.yml

@shikanime shikanime left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verdict : Changements demandés

La migration mise + fnox est la bonne réponse à #2125 et le socle est sain — scan sécurité propre (les identifiants du diff sont les valeurs de démo préexistantes, déplacées), CI verte sur les chemins exercés. Deux bloquants subsistent : le boot dev casse faute de USE_* nus, et docker-compose.ci.yml exigera des secrets fnox que le workflow Playwright ne fournit pas — chemin jamais exercé par CI sur ce head. Reprise locale complète : install, setup, tests unitaires 1210 verts, prisma migrate deploy et boot vérifiés contre un Postgres jetable via DB_URL injecté par fnox.

Comment thread mise.toml Outdated
Comment thread docker/docker-compose.ci.yml
Comment thread scripts/bootstrap-secrets.sh Outdated
Comment thread .github/workflows/job-lint.yml
Comment thread docker/docker-compose.ci.yml
@StephaneTrebel StephaneTrebel changed the title Mettre en place mise-en-place et fnox chore: mettre en place mise-en-place et fnox Oct 19, 2026
Share NestJS environment mapping across launchers, pass explicit plugin
flags to Compose, and resolve CI configuration for Playwright consumers.
Keep fnox bootstrap writes isolated and send demonstration values via stdin.
Remove unused workflow Node inputs and exercise environment regressions in CI.

Refs #2125

Generated with AI assistance, reviewed by @StephaneTrebel
Integrate and verify the current application tree after CI exposed remaining
dotenv imports in three NestJS E2E specs and unused release Node exports.
Extend the environment boundary check to reject stale dotenv consumers.

Refs #2125

Generated with AI assistance, reviewed by @StephaneTrebel
@cloud-pi-native-sonarqube

Copy link
Copy Markdown

@StephaneTrebel

Copy link
Copy Markdown
Collaborator Author

Retours traités dans 60ae94e0b et bde64e256. Dix fils résolus ; nouvelle revue humaine demandée à shikanime, aucune fusion.

CI verte sur le head : lint (régressions d’environnement incluses), tests avec couverture, builds, CodeQL, Trivy et SonarQube.

Validation locale finale :

mise -E ci run test:unit : 1 332 passed
mise -E ci run playwright:test : 162 passed, 2 flaky, 4 skipped ; exit 0

Les deux flaky passent au retry : archivage de projet (Chromium), suppression de dépôt (Firefox). Images reconstruites, santé NestJS vérifiée, stack de validation nettoyée.

Les trois imports dotenv encore présents dans les specs E2E et les exports Node inutilisés du workflow release, signalés par le premier run CI, sont également corrigés ; le garde-fou vérifie désormais les consommateurs dotenv.

Ledger #2125 inchangé : la validation plénière de l’ADR et l’acceptation des étapes de livraison ne sont pas démontrées par ces corrections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

built enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants