Repository navigation
Record the Reference corporate and officer references as checked directory entries, on organisations only, completing the Reference BQ (roadmap 1.21) - #127
Merged
Conversation
…ked entry ids with party-type rules Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ctory entries, on organisations only (roadmap 1.21) CorporateCustomerReference, CorporateCustomerLegalEntityReference and CompanyOfficerReference are other registered entries, loaded by the Reference Update handler through the write port; the corporate customer and legal entity are organisations, the officer a person, and only an organisation's entry holds them. CompanyOfficerRole is a Max35Text that needs an officer. The entry Update refuses to make such an organisation a person. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KsiProgramming
deleted the
plan/1.21-reference-corporate-officer-refs
branch
November 10, 2026 16:02
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.
Roadmap phase
Phase: 1.21 Reference BQ: corporate and officer references
Planning package:
specs/2026-11-08-reference-corporate-officer-refs/No phase issue to close: the board sync has not yet created the issues for 1.18–1.21 (rows added in 1.10 and 1.20). The
roadmap-boardrun after this merge creates them, already closed (checked with--dry-run).Summary
This records the last four BIAN Reference fields, the references to other parties. It completes the Reference BQ: all 24
UpdateReferencefields are recorded, andPartyReferenceFields.Stagedis empty.What is recorded (ADR 0034)
CorporateCustomerReference,CorporateCustomerLegalEntityReferenceandCompanyOfficerReferencerecord theirPartyReference. Each one is the id of another registered directory entry, the same guarantee as the Associations associate (ADR 0033). There is one officer, because BIAN gives a single object.CompanyOfficerRoleis a plain Max35Text string, for exampleDirector. BIAN types it as aParty, which has no role property. A role is only recorded with an officer.InvolvementReference, and any part of an object-shapedCompanyOfficerRole, giveparty.reference-field-not-supported.Command side (CQRS)
UpdatePartyReferenceHandlerloads each entry the Update sets through the write portIPartyDirectory, never a view, asRegisterPartyAssociationHandlerdoes. References the Update keeps are not loaded again.The pure
Decidechecks the loaded facts on the resulting Reference. Four new 422 codes:party.corporate-references-need-organisation;party.self-reference;party.referenced-party-not-registered;party.referenced-party-type-mismatch.A role without an officer is
party.reference-invalid(400).The entry
Update(1.8) refusesPartyType: Personwhile corporate references are recorded, so the organisation rule cannot be broken from that side.Query side:
RetrievePartyReferencereads the same inline view. Its Reference section gainsCorporateReferences, a nullable member, so events and views stored before 1.21 still load, fold and rebuild.HTTP: there are no new routes. The Update request and the Update/Retrieve response gain the four fields, reusing the Associations
InvolvedPartyModel.Docs
Reference/tree in tech-stack §3.4 is updated, and the roadmap 1.21 checkbox is ticked.RimBank.Host.httphas new demo requests.Definition of done
.Subscriptions→.PublishedLanguagedocs/adr/for any significant or BIAN-interpretation decision (ADR 0034, with amendments to 0024, 0029 and 0032)Validation
dotnet restore RimBank.slnx --locked-mode: okdotnet build RimBank.slnx -c Release: 0 warnings, 0 errorsdotnet test --solution RimBank.slnx -c Release --no-build: 1852 passed, 0 faileddotnet format RimBank.slnx --verify-no-changes: exit 0CorporateReferencesDecisionTests(every rule, including the entry Update guard);PartyCorporateReferencesTests(the role, partial update, and pre-1.21 JSON read back);UpdatePartyReferenceHandlerTests(including an association id sent as a reference, which is "not registered" rather than an exception, and a kept reference that is not re-checked);PartyReferenceChangesTests(staged fields pinned at 0);CorporateReferencesEndpointTests:detailnaming the path;ReferenceLogPrivacyTestsshows that no referenced id or role is logged.PartyReferenceRoundTripTestschecks on the write side, stores the ids as plain strings, and rebuilds the inline view.src/RimBank.Host/RimBank.Host.httpare written but have not been run against a live AppHost.Review focus
detail, not inerrors.Errorcarries field errors only for validation (ADR 0015). ShouldError.BusinessRuletake field errors instead?CompanyOfficerRoleis read as a string. The request binds it as raw JSON, so an object is refused part by part.🤖 Generated with Claude Code