PR L: persistent participant registry (plans_participants + API) #16

Open
nsatoshi wants to merge 1 commits from devin/1776881508-pr-l-participants into main
Owner

Closes gap-analysis v2 §4 + §10.9 (Participant Registry marked "missing").

What

  • Migration 005plans_participants(plan_id, participant_id, role, lei, did, created_at) with composite UNIQUE(plan_id, role, participant_id) and CHECK on the role vocabulary matching types/plan.ts.
  • services/participants.ts — idempotent add() / bulkAdd() / listForPlan() / listByRole() / remove(). The SoD layer resolves the authorised actor set for a transition by calling listByRole().
  • api/participants.ts + wiring in index.ts:
    • GET /api/plans/:planId/participants
    • POST /api/plans/:planId/participants → emits participants.authorized
    • DELETE /api/plans/:planId/participants/:role/:participantId
  • 7 unit tests against a Map-backed query stub.

Why

The Participant Registry is one of the canonical data objects in arch §4 and the source of truth for segregation-of-duties decisions (arch §13). Until this PR participants lived only on the in-flight Plan object and were discarded on restart.

Verification

  • npx tsc --noEmit clean.
  • npx jest 87/87 green.
Closes gap-analysis v2 §4 + §10.9 (Participant Registry marked "missing"). ## What - **Migration 005** — `plans_participants(plan_id, participant_id, role, lei, did, created_at)` with composite `UNIQUE(plan_id, role, participant_id)` and CHECK on the role vocabulary matching `types/plan.ts`. - **services/participants.ts** — idempotent `add()` / `bulkAdd()` / `listForPlan()` / `listByRole()` / `remove()`. The SoD layer resolves the authorised actor set for a transition by calling `listByRole()`. - **api/participants.ts + wiring in index.ts:** - `GET /api/plans/:planId/participants` - `POST /api/plans/:planId/participants` → emits `participants.authorized` - `DELETE /api/plans/:planId/participants/:role/:participantId` - 7 unit tests against a Map-backed query stub. ## Why The Participant Registry is one of the canonical data objects in arch §4 and the source of truth for segregation-of-duties decisions (arch §13). Until this PR participants lived only on the in-flight Plan object and were discarded on restart. ## Verification - `npx tsc --noEmit` clean. - `npx jest` 87/87 green.
nsatoshi added 1 commit 2026-04-22 18:15:42 +00:00
Persistent participant registry (plans_participants + API)
Some checks failed
CI / Frontend Lint (pull_request) Failing after 7s
CI / Frontend Type Check (pull_request) Failing after 7s
CI / Frontend Build (pull_request) Failing after 7s
CI / Frontend E2E Tests (pull_request) Failing after 10s
CI / Orchestrator Build (pull_request) Failing after 6s
CI / Contracts Compile (pull_request) Failing after 7s
CI / Contracts Test (pull_request) Failing after 5s
Code Quality / SonarQube Analysis (pull_request) Failing after 20s
Code Quality / Code Quality Checks (pull_request) Failing after 7s
Security Scan / Dependency Vulnerability Scan (pull_request) Failing after 4s
Security Scan / OWASP ZAP Scan (pull_request) Failing after 4s
5741fd5d9b
Closes gap-analysis v2 §4 + §10.9.

- Migration 005 adds plans_participants (plan_id, participant_id, role,
  lei, did, created_at) with a composite UNIQUE(plan_id, role,
  participant_id) and CHECK on role vocabulary matching types/plan.ts.
- services/participants.ts: idempotent add() / bulkAdd() / listForPlan() /
  listByRole() / remove() — the SoD layer reads listByRole() to resolve
  the authorised actor set for a transition.
- api/participants.ts + wiring in index.ts:
    GET    /api/plans/:planId/participants
    POST   /api/plans/:planId/participants          -> participants.authorized
    DELETE /api/plans/:planId/participants/:role/:participantId
- 7 unit tests against a Map-backed query stub; full suite 87/87 green.
Some checks failed
CI / Frontend Lint (pull_request) Failing after 7s
CI / Frontend Type Check (pull_request) Failing after 7s
CI / Frontend Build (pull_request) Failing after 7s
CI / Frontend E2E Tests (pull_request) Failing after 10s
CI / Orchestrator Build (pull_request) Failing after 6s
CI / Contracts Compile (pull_request) Failing after 7s
CI / Contracts Test (pull_request) Failing after 5s
Code Quality / SonarQube Analysis (pull_request) Failing after 20s
Code Quality / Code Quality Checks (pull_request) Failing after 7s
Security Scan / Dependency Vulnerability Scan (pull_request) Failing after 4s
Security Scan / OWASP ZAP Scan (pull_request) Failing after 4s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin devin/1776881508-pr-l-participants:devin/1776881508-pr-l-participants
git checkout devin/1776881508-pr-l-participants
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: d-bis/CurrenciCombo#16