docs(adr): accept ADR-0026 + ADR-0027 #219

Merged
julien merged 1 commits from docs/adr-0026-0027-accept into main 2026-05-24 16:58:40 +02:00
Owner

Summary

Promotes ADR-0026 and ADR-0027 from proposed to accepted. Both shipped as proposed in #217 after the cascade / acteurs_plus source-of-truth audit reshaped the org-hierarchy model. No open questions left on either.

No code changes — same shape as #205 (ADR-0025 acceptance).

What lands

File Change
docs/decisions/0026-person-user-portal-data-model.md Frontmatter status: proposed → accepted.
docs/decisions/0027-portal-side-organisational-hierarchy.md Frontmatter status: proposed → accepted.
docs/decisions/README.md Rows for 0026 and 0027 flip to accepted.
CLAUDE.md Roll-up bumped to 0001 → 0027 accepted; two new Architecture bullets ("Portal-side identity model" and "Portal-side organisational hierarchy") added after the ADR-0025 bullet; ADR-0025's bullet adjusted to clarify the scope literal etablissement:<structure-code> (with a pointer to ADR-0027 for the Structure.code semantics); the @RequireScope Prisma-resolver roadmap entry now references both ADRs as accepted with the two-schema-then-resolver phasing.

Notes for the reviewer

  • ADR-0025's bullet got a small touch-up, not a rewrite. The original copy listed scope kinds as etablissement:<finess>, which was accurate when ADR-0025 shipped but is now superseded by ADR-0027's Structure.code semantics (FINESS for medico-social rows, internal slugs otherwise). The change is <finess><structure-code> + a see ADR-0027 parenthetical. No actual decision in ADR-0025 changes.
  • Two new Architecture bullets, mirrored on the ADR-0024 / ADR-0025 pair of bullets that precede them in tone + length. The "Portal-side identity model" bullet calls out the entraOid-only v1 dedup and the non-unique Person.email (both decisions made during the split rework); the "Portal-side organisational hierarchy" bullet calls out the Structure.code round-trip semantics and the deferred-to-ADR-0028 items (Pole, Service, arbitrary nesting, per-source enrichment, full cascade sync).
  • No code changes, so no pnpm ci:check impact. pnpm exec prettier --check clean on the four touched files.

Test plan

  • pnpm exec prettier --check — clean on the four touched files.
  • Internal links resolve (ADR-0026 ↔ ADR-0027 mutual references, plus the ADR-0028 dangling marker left intentional for the future sync ADR).
  • Review focus — the two new Architecture bullets phrasing; the ADR-0025 bullet's small scope-literal touch-up; CLAUDE.md roll-up wording.

What's next

Now unblocked — per ADR-0026 §"Phasing" and ADR-0027 §"Phasing":

  1. ADR-0027 Implementation PR 1Region / Delegation / Structure Prisma schema + inline reference-data migration (Région Nouvelle-Aquitaine + Délégation 33 + a handful of test-tenant structures) + Structure.kind catalogue + drift-gate extension. Independent of (2) at the schema level.
  2. ADR-0026 Implementation PR 1Person / User / UserScope Prisma schema + PersonAndUserProvisioner called from SessionEstablisher + Person.source catalogue + drift-gate extension + updated PrincipalBuilder populating Principal.user.{id, personId} from the real rows. Can ship in parallel with (1).
  3. ADR-0026 Implementation PR 2PrismaScopeResolver replacing StubScopeResolver + /admin/users/:id/scopes admin-app screen + prisma/seed.ts populating the 19 test personas' user_scopes per notes/test-tenant-role-assignments.md. Depends on both (1) and (2).
  4. ADR-0028 (proposed) — Pléiades + Acteurs+ + cascade syncs + facet schemas (Salarié / Élu / Adhérent / Bénévole / Bénéficiaire / PartenaireExterne) + operator-confirmed Person-reconciliation flow + the deferred org-hierarchy extensions (Pole, Service, per-source enrichment).
## Summary Promotes [ADR-0026](docs/decisions/0026-person-user-portal-data-model.md) and [ADR-0027](docs/decisions/0027-portal-side-organisational-hierarchy.md) from `proposed` to `accepted`. Both shipped as `proposed` in #217 after the cascade / acteurs_plus source-of-truth audit reshaped the org-hierarchy model. No open questions left on either. No code changes — same shape as #205 (ADR-0025 acceptance). ## What lands | File | Change | | --- | --- | | `docs/decisions/0026-person-user-portal-data-model.md` | Frontmatter `status: proposed → accepted`. | | `docs/decisions/0027-portal-side-organisational-hierarchy.md` | Frontmatter `status: proposed → accepted`. | | `docs/decisions/README.md` | Rows for 0026 and 0027 flip to `accepted`. | | `CLAUDE.md` | Roll-up bumped to `0001 → 0027 accepted`; two new Architecture bullets ("Portal-side identity model" and "Portal-side organisational hierarchy") added after the ADR-0025 bullet; ADR-0025's bullet adjusted to clarify the scope literal `etablissement:<structure-code>` (with a pointer to ADR-0027 for the `Structure.code` semantics); the `@RequireScope` Prisma-resolver roadmap entry now references both ADRs as accepted with the two-schema-then-resolver phasing. | ## Notes for the reviewer - **ADR-0025's bullet got a small touch-up, not a rewrite.** The original copy listed scope kinds as `etablissement:<finess>`, which was accurate when ADR-0025 shipped but is now superseded by ADR-0027's `Structure.code` semantics (FINESS for medico-social rows, internal slugs otherwise). The change is `<finess>` → `<structure-code>` + a `see ADR-0027` parenthetical. No actual decision in ADR-0025 changes. - **Two new Architecture bullets, mirrored on the ADR-0024 / ADR-0025 pair of bullets that precede them in tone + length.** The "Portal-side identity model" bullet calls out the `entraOid`-only v1 dedup and the non-unique `Person.email` (both decisions made during the split rework); the "Portal-side organisational hierarchy" bullet calls out the `Structure.code` round-trip semantics and the deferred-to-ADR-0028 items (`Pole`, `Service`, arbitrary nesting, per-source enrichment, full cascade sync). - **No code changes**, so no `pnpm ci:check` impact. `pnpm exec prettier --check` clean on the four touched files. ## Test plan - [x] `pnpm exec prettier --check` — clean on the four touched files. - [x] Internal links resolve (ADR-0026 ↔ ADR-0027 mutual references, plus the `ADR-0028` dangling marker left intentional for the future sync ADR). - [ ] **Review focus** — the two new Architecture bullets phrasing; the ADR-0025 bullet's small scope-literal touch-up; CLAUDE.md roll-up wording. ## What's next Now unblocked — per ADR-0026 §"Phasing" and ADR-0027 §"Phasing": 1. **ADR-0027 Implementation PR 1** — `Region` / `Delegation` / `Structure` Prisma schema + inline reference-data migration (Région Nouvelle-Aquitaine + Délégation 33 + a handful of test-tenant structures) + `Structure.kind` catalogue + drift-gate extension. Independent of (2) at the schema level. 2. **ADR-0026 Implementation PR 1** — `Person` / `User` / `UserScope` Prisma schema + `PersonAndUserProvisioner` called from `SessionEstablisher` + `Person.source` catalogue + drift-gate extension + updated `PrincipalBuilder` populating `Principal.user.{id, personId}` from the real rows. Can ship in parallel with (1). 3. **ADR-0026 Implementation PR 2** — `PrismaScopeResolver` replacing `StubScopeResolver` + `/admin/users/:id/scopes` admin-app screen + `prisma/seed.ts` populating the 19 test personas' `user_scopes` per `notes/test-tenant-role-assignments.md`. Depends on both (1) and (2). 4. **ADR-0028 (proposed)** — Pléiades + Acteurs+ + cascade syncs + facet schemas (Salarié / Élu / Adhérent / Bénévole / Bénéficiaire / PartenaireExterne) + operator-confirmed Person-reconciliation flow + the deferred org-hierarchy extensions (`Pole`, `Service`, per-source enrichment).
julien added 1 commit 2026-05-24 16:58:10 +02:00
docs(adr): accept ADR-0026 + ADR-0027
CI / commits (pull_request) Successful in 2m45s
CI / check (pull_request) Successful in 3m0s
CI / scan (pull_request) Successful in 3m5s
CI / a11y (pull_request) Successful in 3m6s
Docs site / build (pull_request) Successful in 3m21s
CI / perf (pull_request) Successful in 6m34s
2c341a56e8
Both ADRs shipped as proposed in #217 after the cascade /
acteurs_plus source-of-truth audit reshaped the org-hierarchy
model. No open questions left on either - promote to accepted
in lockstep since they reference each other.

CLAUDE.md gets two new Architecture bullets ("Portal-side
identity model", "Portal-side organisational hierarchy") and
a small touch-up on the ADR-0025 bullet to clarify the scope
literal `etablissement:<structure-code>` semantics.
julien merged commit 0d8b3712fb into main 2026-05-24 16:58:40 +02:00
julien deleted branch docs/adr-0026-0027-accept 2026-05-24 16:58:43 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: julien/apf_portal#219