Repository navigation
Conversation
StephaneTrebel
previously approved these changes
Oct 7, 2026
StephaneTrebel
left a comment
Collaborator
There was a problem hiding this comment.
Les renommages sont cohérents avec l’intention : les opérations de convergence portent désormais le préfixe ensure, tandis que la réconciliation périodique reste distinguée et les contrats externes/DB sont préservés. Le diff est mécanique ; tests, lint et builds passent, sans finding à signaler (sans ledger).
shikanime
force-pushed
the
refactor/ensure-vocabulary
branch
3 times, most recently
from
October 7, 2026 15:48
cd7cce1 to
bfd27b3
Compare
shikanime
added a commit
that referenced
this pull request
Oct 7, 2026
Ratifies the get/create/ensure/reconcile vocabulary and module-local ensure() util routing from #2832. Co-authored-by: Automata <automata@shikanime.studio>
shikanime
added a commit
that referenced
this pull request
Oct 8, 2026
Ratifies the get/create/ensure/reconcile vocabulary and module-local ensure() util routing from #2832. Co-authored-by: Automata <automata@shikanime.studio>
shikanime
added a commit
that referenced
this pull request
Oct 8, 2026
Ratifies the get/create/ensure/reconcile vocabulary and module-local ensure() util routing from #2832. Co-authored-by: Automata <automata@shikanime.studio> Signed-off-by: Shikanime Deva <22115108+shikanime@users.noreply.github.com>
shikanime
force-pushed
the
refactor/ensure-vocabulary
branch
from
October 8, 2026 12:25
bfd27b3 to
28153e4
Compare
shikanime
added a commit
that referenced
this pull request
Oct 8, 2026
Ratifies the get/create/ensure/reconcile vocabulary and module-local ensure() util routing from #2832. Co-authored-by: Automata <automata@shikanime.studio> Signed-off-by: Shikanime Deva <22115108+shikanime@users.noreply.github.com>
StephaneTrebel
previously requested changes
Oct 9, 2026
StephaneTrebel
left a comment
Collaborator
There was a problem hiding this comment.
🔴 Le renommage laisse un appel upsertUser non migré, ce qui fait échouer la compilation Nest et les checks de CI. Voir le commentaire inline ; merci de corriger les consommateurs puis de relancer les checks.
shikanime
force-pushed
the
refactor/ensure-vocabulary
branch
from
October 9, 2026 08:52
28153e4 to
9aba574
Compare
…e/ensure Rename-only sweep over apps/server-nestjs so every external-system client service exposes three verbs: get* (read), create* (non-idempotent write), ensure* (converge to desired state and return the new state). - getOrCreate* renamed to ensure* (entity-returning) across gitlab, keycloak, observability; derived-URL lookups keep their converge-then-return shape (ensureProjectGroupPublicUrl and siblings), since the group is created as a side effect - client-service upsert* renamed to ensure* (gitlab custom-attributes/repo/user, vault sys-policies/approle/identity/kv); nexus and registry wrappers already used ensure - vault cron wrappers renamed to reconcile* to free ensureZone and ensureProject for the public converge methods - DB layer untouched: prisma .upsert calls and queries-utils upsert* keep Prisma vocabulary; Upsert*Request mirror types unchanged (external API shapes); keycloak-jwt upsertUser reverted (DB layer) No behavior change. tsc/vitest/eslint green on the touched modules. Co-authored-by: Automata <automata@shikanime.studio> Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr> Change-Id: If6d5c413a557b4705b1782182ccda1b36a6a6964 Signed-off-by: Shikanime Deva <22115108+shikanime@users.noreply.github.com>
…le ensure utils
Every ensure* method now goes through its module's ensure({ create, reload,
onCollision }) util; no hand-rolled get-or-create bodies remain in client
services.
- gitlab createGroup/createSubGroup/ensureRepo/createUser race catches
rewritten as ensure() calls; createUser is now the raw non-idempotent
write and ensureUser owns convergence (vocabulary-true split)
- createGroup and createSubGroup shared path-keyed attribute blocks
deduplicated into setManagedGroupAttributesByPath
- getUserByEmail returns undefined instead of null to match the util
contract and sibling getters
- custom-attribute ensure* log verbs aligned with the vocabulary
Keycloak, nexus, registry and sonarqube already routed through their
module utils; registry keep status-code handling local.
No behavior change. tsc error-set identical to main, vitest 106/106 on
gitlab, eslint clean.
Co-authored-by: Automata <automata@shikanime.studio>
Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
Change-Id: Ie4ed81c6c5c1ebffc0a453fcfec803866a6a6964
Signed-off-by: Shikanime Deva <22115108+shikanime@users.noreply.github.com>
shikanime
force-pushed
the
refactor/ensure-vocabulary
branch
from
October 9, 2026 09:02
9aba574 to
da73769
Compare
The adminRole consumer landed on main while this branch was in review; it called upsertUser and the admin-role specs mocked the old get-or-create names, which broke the merge build. Repoint the caller to ensureUser and refresh the spec mocks. Co-authored-by: Automata <automata@shikanime.studio> Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr> Change-Id: I44a3392ced9fd536b0d1a723711fe5326a6a6964
shikanime
force-pushed
the
refactor/ensure-vocabulary
branch
from
October 9, 2026 09:34
da73769 to
bd9d20b
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

0 New Issues
0 Fixed Issues
0 Accepted Issues
Quoi
Renommage mécanique (aucun changement de comportement) du vocabulaire des
services clients dans
apps/server-nestjsvers trois verbes :get*(lecture),
create*(écriture non idempotente),ensure*(converge versl'état désiré et retourne le nouvel état).
getOrCreate*renommésensure*(entités) dans gitlab, keycloak,observability ; les lookups d'URL dérivée conservent la forme
converge-puis-retourne (
ensureProjectGroupPublicUrl& co) puisque legroupe est créé par effet de bord
upsert*des services clients renommésensure*(custom-attributes /repo / user gitlab ; sys-policies / approle / identity / kv vault) ;
nexus et registry utilisaient déjà
ensurereconcile*pour libérerensureZone/ensureProjectau profit des méthodes publiques de convergenceprisma.upsertetupsert*de queries-utilsgardent le vocabulaire Prisma ; types miroirs
Upsert*Requestinchangés (formes d'API externes) ;
upsertUserkeycloak-jwt rétabli(couche DB)
Suit la convention déjà établie par les helpers
ensure({ create, reload, onCollision })présents dans cinq modules.Pourquoi
Un vocabulaire uniforme rend la sémantique lisible à l'appel :
ensuregarantit l'état (crée ou réutilise),
getlit,createcrée sansidempotence. Discussion née de la review de #2807.
Vérification
nest build(le verrou tsc du dépôt) : vert sur le SHA de headvitest run(suite complète server-nestjs) : 764 verts / 69 skippés / 0 écheceslintsur les fichiers adaptés : 0 signalementRéférences