Skip to content

feat!: generalize behavior contracts for IMessage - #28

Merged
PANiXiDA merged 14 commits into
mainfrom
refactor/share-domain-event-publication
Nov 2, 2026
Merged

PANiXiDA merged 14 commits into
mainfrom
refactor/share-domain-event-publication

Conversation

@PANiXiDA

@PANiXiDA PANiXiDA commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Generalize the before, after and finally behavior contracts to IMessage so they can be used by request and event pipelines. IRequest inherits the published Core.Domain IMessage marker.

The shared contracts move to PANiXiDA.Core.Application.Messaging.Behaviors.Abstractions:

  • IBeforeMessageBehavior
  • IAfterMessageBehavior<TMessage, TResult>
  • IFinallyMessageBehavior<TMessage, TResult>

All concrete behaviors now use TMessage and message consistently. Their existing request, command and handler constraints are preserved. Only PublishDomainEventsBehavior broadens its concrete constraint to IMessage; it skips queries before accessing aggregate tracking. Handler interfaces and return types are unchanged.

The before contract returns Result and does not require result or handler type parameters. These remain on concrete implementations where needed for pipeline binding.

The public interface renames, namespace move and named argument changes require Application version 6.0. Adapters and custom behaviors must migrate. Event-pipeline wiring remains an adapter responsibility; Wolverine is unchanged.

Validation: restore, formatting, Release build with zero warnings/errors and all 328 tests passed. Tests cover request/command/event publication, query exclusion, failed results and existing behavior regressions. Confirmed all concrete constraints are unchanged after normalizing generic parameter names. All SuppressMessage attributes have been removed; S2326/S2436 findings will be resolved manually in SonarQube. README documents the current API and usage without a separate message-contract section or migration instructions.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T11:57:31.357512Z cb95251 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@PANiXiDA PANiXiDA changed the title Share domain event publication between command and event pipelines Use one domain event publication behavior for commands and events Oct 31, 2026
@PANiXiDA PANiXiDA changed the title Use one domain event publication behavior for commands and events Allow request publication behavior while skipping queries Oct 31, 2026
@PANiXiDA PANiXiDA changed the title Allow request publication behavior while skipping queries feat!: generalize behavior contracts for IMessage Oct 31, 2026
@panixida-sonarqube

Copy link
Copy Markdown

@PANiXiDA

PANiXiDA commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: cb95251cc0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@PANiXiDA
PANiXiDA merged commit 60e0955 into main Nov 2, 2026
14 of 15 checks passed
@PANiXiDA
PANiXiDA deleted the refactor/share-domain-event-publication branch November 2, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant