Repository navigation
Publish the Party Created and Updated integration events through the outbox, versioned and pinned by a schema contract test (roadmap 1.13) - #129
Merged
Conversation
…ion events through the outbox) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…outbox, versioned and pinned by a schema contract test (roadmap 1.13) - New RimBank.Party.PartyReferenceDataDirectory.PublishedLanguage (BCL only): PartyReferenceDataDirectoryEntryCreated and ...Updated carry the Control Record state (id, party type, date type and date) with EventId, OccurredAt and the stream Version; each declares its BIAN Channel and a versioned MessageIdentity (...created.v1 / ...updated.v1). - A pure mapper in core (Publication/) maps the decided domain events; RegisterParty and Update handlers cascade the event as (Result<Ack>, Event?), so it commits with the events and a refused command publishes nothing. - RimBank.Postgresql registers PublishedLanguageMessageNaming so every *.PublishedLanguage type goes on the wire under its declared identity, without a Wolverine attribute in the contract. - Outbox integration tests, approved JSON schema snapshots (JsonSchemaExporter), catalogue channel-to-event mapping, ADR 0036, ADR 0024, tech-stack, CONTRIBUTING and roadmap updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.13 Published language
Planning package:
specs/2026-11-08-party-published-language/Closes #38
Summary
Party Reference Data Directory now tells other contexts when a party is registered or its directory entry changes. This is the first published language in RimBank. Current Account (4.1) will use it to learn that a party exists, with no callback to Party.
Published language (new project
RimBank.Party.PartyReferenceDataDirectory.PublishedLanguage, BCL only)PartyReferenceDataDirectoryEntryCreated(BIAN channelPartyReferenceDataDirectoryEntry/Created) andPartyReferenceDataDirectoryEntryUpdated(…/Updated).PartyType,DirectoryEntryDateType(OpenDate/RefreshDate) andDirectoryEntryDate.EventId,OccurredAtand the entry's streamVersion, so a consumer can order events and drop duplicates.Command side only (CQRS)
Publication/PartyReferenceDataDirectoryPublication) builds the events from the decided domain events, never from a view.RegisterPartyandUpdatePartyReferenceDataDirectoryEntryreturn(Result<Ack>, Event?). The event is cascaded into Wolverine's Marten outbox and commits in the same transaction as the domain events.Versioning and contract
ChannelandMessageIdentityconstants:party-reference-data-directory-entry.created.v1and…updated.v1.RimBank.Postgresql.PublishedLanguageMessageNamingputs every*.PublishedLanguagetype on the wire under its declared identity, without a Wolverine attribute in the contract.JsonSchemaExporter. No new package..v2type.Docs
RimBank.Host.http: a note on where to see the envelopes.Definition of done
.Subscriptions→.PublishedLanguagedocs/adr/for any significant or BIAN-interpretation decision (ADR 0036, and ADR 0024 amended)Validation
The CI workflow's steps, run locally on Windows with Docker Desktop:
dotnet restore RimBank.slnx --locked-modeRimBank.Architecture.Testswas updated by hand to match the Windows onedotnet build RimBank.slnx -c Release --no-restoredotnet test --solution RimBank.slnx -c Release --no-buildpython -m unittest discover -s scriptsdotnet format RimBank.slnx --verify-no-changes --no-restoreNew tests:
PartyReferenceDataDirectoryPublicationTests(unit): Register maps to Created and Update maps to Updated; every party type has a published value.nullon not-found, version-conflict and decision errors.PublishedLanguageOutboxTests(Testcontainers):wolverineschema.PartyPublishedLanguageSchemaTests: the approved schema matches, Wolverine writes the same property names, the wire round trip is stable, a v1 reader tolerates an added field, and each type goes on the wire under its declared identity.PublishedLanguageMessageNamingTests: types outside.PublishedLanguagekeep Wolverine's name, and registering twice is harmless.Channelmatches its address in the BIAN AsyncAPI.Manual demo: not completed. The AppHost started, and the host was healthy with the party schema's envelope tables in place. But the host rejects every Keycloak token (
invalid_token, "The issuer … is invalid"), whatever address the token is issued for. This is a local Aspire/Keycloak authentication problem: Keycloak serves only HTTPS here, and the AppHost points the host at itshttpendpoint. This PR does not touch authentication, the AppHost or the host. The end-to-end behaviour is covered by the Testcontainers outbox tests above and by the unchanged Alba HTTP tests. The auth problem needs its own fix.Review focus
WolverineMessageNaming.InsertFirst. It is process-wide (static), so it only answers for*.PublishedLanguagetypes. Is aconst MessageIdentityon a BCL record the right contract hook?OccurredAtduplicatesDirectoryEntryDatetoday. It is kept as the envelope's meaning, independent of the BIAN field.🤖 Generated with Claude Code