Task: Choose the root legal entity from the register
Table of Contents
This page documents a task in the Implement the setup journeys in ores.web story. It captures the goal, current status, acceptance, and any notes or results.
1. Goal
The Operational card asks for the tenant's root legal entity the way the GLEIF entity card already does: by name or LEI, from the entities the deployment holds. A person with no entity yet leaves it out, which is the case the card supports today and keeps.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Implement the setup journeys in ores.web |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-09-30 |
3. Acceptance
- The Operational card's root entity is chosen from a search over the deployment's legal entities, not typed, and the card still allows the entity to be left out.
- A value that is not an LEI's shape is refused with a sentence about the field, so a mistyped code cannot reach the publication. A twenty-character code the register does not hold is still the publication's to refuse; the browser cannot produce one, because its field is a search.
- The card's own words and the journey documents say the same thing.
- A browser walk on the live deployment shows the search, the matches the deployment holds, and the chosen entity carried into the review.
4. Plan
The card's difference from the GLEIF entity card is one column: the seeded row
declares data_type: string, so the form renders a text box, while
legal_entity renders the search. So the change is the row, not the form:
- The seeded row:
empty_operational'sroot_leibecomeslegal_entity, and its label and hint are brought in line with what the field now does. - The form needs no change:
parts.tsxalready renderslegal_entityasLegalEntitySearch, and that component shows its search box while the value is empty, so the optional case is the empty state rather than a new branch. - The server already checks the shape: a
legal_entityvalue must be twenty alphanumeric characters, so a code that is not an LEI is refused naming the field instead of reaching the publication. - The live database predates the seed, so the row is set there by hand for the walk, and the walk is what proves the card. A fresh installation reads the seeded row.
5. Measurements
Every number this task claims about a tree, with the command that produced it
and the commit it was measured at. A number without both is not a measurement,
because a clean-up record describes a tree and trunk moves under a branch: a
consumer count, a gate's component count and a suite's size all change with no
code changing, and the reader of a bare number cannot tell which tree it came
from. Where the raw output matters, put it in an evidence/ file beside the
task and name that file in the Command column.
| What | Value | Command | Commit |
|---|---|---|---|
| The card on the live deployment | A search over the deployment's entities; BARCLAYS PLC chosen and carried to the review | evidence/operational_root_legal_entity.txt |
5a67ef6f04 |
Tests in ores.iam.core |
1 suite passing, the new legal_entity case included |
compass test run -- -R ores.iam.core |
5a67ef6f04 |
| Populate references | resolve | check_populate_references.py |
5a67ef6f04 |
6. Notes
7. Test Scenarios
Manual QA scenarios (scaffolded via compass add test_scenario)
that verify this task. Link
new ones here as they're created; the scenario doc itself links back
via its "Verifies task" field.
| Scenario | State | Notes |
|---|---|---|
8. PRs
| PR | Title |
|---|---|
| #2427 | [iam] Choose the Operational card's root legal entity |
9. Review
| # | Comment summary | File | Decision | Notes |
|---|---|---|---|---|
| 1 | The check guards the LEI's shape only, so a twenty-character code the register does not hold still reaches the publication, and the acceptance claimed the wrong code was fully refused | seed_profile_parameter_check.hpp |
Declined, restated | The check is shape-only by contract. The browser's field is a search and cannot produce such a code, so the acceptance and the Result now state the boundary rather than claiming it closed. |
| 2 | The comment above the seeded parameters still called Operational's root LEI a free-text GLEIF code | iam_seed_profiles_populate.sql |
Accepted | The comment now says the entity is chosen from the register. |
| 3 | Everything else the journey reaches for exists... appears twice in a row |
journey_first_run.org |
Accepted | The duplicate is removed. |
| 4 | The fixture keeps is_required = true, so "the card still allows the entity to be left out" had no unit proof |
service_seed_profile_parameter_check_tests.cpp |
Accepted | A new case proves an optional legal_entity accepts the entity omitted and cleared. |
| 5 | REQUIRE where the sibling tests use CHECK |
service_seed_profile_parameter_check_tests.cpp |
Accepted | Changed to CHECK. |
| 6 | The tool-written bookkeeping commit carries no Environment: or Co-Authored-By: trailer, and one commit body line is 73 characters |
git history | Declined, recorded | The trailer-less commit is written by compass pr create, and both are already pushed; rewriting published history to wrap a line is not worth the churn. |
10. Result
The Operational card now asks the deployment for its root legal entity the way
the GLEIF entity card does, and the change was one seeded row: legal_entity
instead of string. The form was already able to render that type as the
search, and the server already checked its shape, so no screen and no handler
changed.
The card was walked in a browser on the live deployment. It shows a search box
naming the field; the search answers with the entities the deployment holds, two
of them for barclays; the chosen entity stands in the field with its LEI, its
country and the parties its hierarchy would create; and the review carries the
LEI. The walk is evidence/operational_root_legal_entity.txt, with four
screenshots.
The gap the story recorded is closed for the browser: its field is a search, so nobody can type a code the deployment cannot check. The value that used to reach the publication and come back as its SQL is the one the parameter check now refuses first, and its new test states that with the eighteen-character code an earlier walk mistyped. What the check guards is the LEI's shape and not its existence, so a twenty-character code the register does not hold is still the publication's to refuse; that path is the shell's. The card stays optional, and a second test proves the check accepts the entity left out, which is the tenant whose parties come from the party stage.