Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.
- Updated the build to project-template v0.145.1: the repository's contribution policy is curated, so issues and discussion are welcome and code is by invitation ([#26](https://github.com/NCodeGroup/Mediator/issues/26)).
- Package versions come from version.json through Nerdbank.GitVersioning, and each pack is validated against the published 1.0.0 packages ([#26](https://github.com/NCodeGroup/Mediator/issues/26)).
- Each package carries its own readme on nuget.org ([#26](https://github.com/NCodeGroup/Mediator/issues/26)).
- `GOVERNANCE.md` names the maintainer and the owners, `ROADMAP.md` lists the plans for the next twelve months, and `docs/assurance-case.md` states the security requirements, the threat model, the design principles and the weaknesses it counters ([#35](https://github.com/NCodeGroup/Mediator/issues/35)).

## [1.0.0] - 2026-01-19

Expand Down
12 changes: 5 additions & 7 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ what and how decisions are made.

## Roles

[//]: # "Maintainers: name each maintainer in the Who column, such as @octocat."

| Role | Who | Responsibilities |
| --- | --- | --- |
| Maintainer | The repository's owners | Sets direction, triages issues, reviews and merges pull requests, answers vulnerability reports, owns the repository's settings and the nuget.org packages |
| Maintainer | [@polewskm](https://github.com/polewskm) | Sets direction, triages issues, reviews and merges pull requests, answers vulnerability reports, owns the repository's settings and the nuget.org packages |
| Contributor | Anyone | Opens issues, and a pull request a maintainer asked for on its issue, under [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md) |
| Automation | `ncode-review[bot]`, `ncode-review-approver[bot]`, Dependabot, GitHub Actions | Reviews and approves a clean pull request, as `ncode-review-approver[bot]` where NCode Review's approver is set up, whose approval meets the ruleset's required approval ([ADR-0036](docs/decisions/project-template/0036-a-required-approval-is-met-by-ncode-reviews-approver-app.md)), proposes dependency updates, runs CI, tags and publishes releases where `AGENTS.md`'s Landing section sets `release: tag+release`; never merges a pull request except the pin bump `code-review-auto-merge.yml` merges once the required checks pass and, where the ruleset requires an approval, it is approved: by `ncode-review-approver[bot]` after a clean review where NCode Review's approver is set up ([ADR-0041](docs/decisions/project-template/0041-ncode-review-reviews-and-approves-dependabots-pull-requests.md)), else by a maintainer |

Expand Down Expand Up @@ -41,10 +39,10 @@ organization that owns it, so anyone given access can carry on with no knowledge
owners can administer every repository it holds, so they can step in when the repository's maintainers can't. nuget.org
publishing runs in `.github/workflows/main.yml`: hand over whatever credential it uses with the repository.

[//]: # "Maintainers: name the owners, and keep the list current."

Owners today: the repository's owners and the owners of the nuget.org packages. Continuity needs at least two people who
can administer both; until there are two, it is incomplete, and the OpenSSF Best Practices silver level can't be claimed
Owners today: [@polewskm](https://github.com/polewskm), the one owner of the NCodeGroup organization and the one admin
of this repository. The packages on nuget.org belong to the nuget.org account
[`NCode`](https://www.nuget.org/profiles/NCode). Continuity needs at least two people who can administer both; until
there are two, it is incomplete, and the OpenSSF Best Practices silver level can't be claimed
([docs/best-practices-badge.md](docs/best-practices-badge.md)).

## Changing This Document
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,12 +486,13 @@ public async Task HandleExceptionAsync_WhenHandlerSetsHandled_ReturnsHandledStat
#region Exception Handling Integration Tests

[Fact]
public async Task HandleAsync_WhenPreProcessorThrows_NotifiesListenersAndInvokesHandlers()
public async Task HandleAsync_WhenPreProcessorThrows_SkipsNextNotifiesListenersAndInvokesHandlers()
{
var exception = new InvalidOperationException("pre-processor error");
var command = new TestCommand { Value = "test" };
var listenerInvoked = false;
var handlerInvoked = false;
var nextInvoked = false;

var mockListenerWrapper = new Mock<ICommandExceptionListenerWrapper<TestCommand>>();
mockListenerWrapper
Expand Down Expand Up @@ -520,10 +521,15 @@ public async Task HandleAsync_WhenPreProcessorThrows_NotifiesListenersAndInvokes
var middleware = new StandardCommandMiddleware<TestCommand>(serviceProvider, preProcessors, postProcessors);

await Assert.ThrowsAsync<InvalidOperationException>(
() => middleware.HandleAsync(command, () => ValueTask.CompletedTask, CancellationToken.None).AsTask());
() => middleware.HandleAsync(command, () =>
{
nextInvoked = true;
return ValueTask.CompletedTask;
}, CancellationToken.None).AsTask());

Assert.True(listenerInvoked);
Assert.True(handlerInvoked);
Assert.False(nextInvoked);
mockListenerWrapper.Verify();
mockHandlerWrapper.Verify();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,12 +545,13 @@ public async Task HandleExceptionAsync_WhenHandlerSetsHandled_ReturnsHandledStat
#region Exception Handling Integration Tests

[Fact]
public async Task HandleAsync_WhenPreProcessorThrows_NotifiesListenersAndInvokesHandlers()
public async Task HandleAsync_WhenPreProcessorThrows_SkipsNextNotifiesListenersAndInvokesHandlers()
{
var exception = new InvalidOperationException("pre-processor error");
var command = new TestCommand { Value = "test" };
var listenerInvoked = false;
var handlerInvoked = false;
var nextInvoked = false;

var mockListenerWrapper = new Mock<ICommandExceptionListenerWrapper<TestCommand>>();
mockListenerWrapper
Expand Down Expand Up @@ -579,10 +580,15 @@ public async Task HandleAsync_WhenPreProcessorThrows_NotifiesListenersAndInvokes
var middleware = new StandardCommandResponseMiddleware<TestCommand, string>(serviceProvider, preProcessors, postProcessors);

await Assert.ThrowsAsync<InvalidOperationException>(
() => middleware.HandleAsync(command, () => ValueTask.FromResult("response"), CancellationToken.None).AsTask());
() => middleware.HandleAsync(command, () =>
{
nextInvoked = true;
return ValueTask.FromResult("response");
}, CancellationToken.None).AsTask());

Assert.True(listenerInvoked);
Assert.True(handlerInvoked);
Assert.False(nextInvoked);
mockListenerWrapper.Verify();
mockHandlerWrapper.Verify();
}
Expand Down
31 changes: 20 additions & 11 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,35 @@
What NCode.Mediator intends to do over the next year. Open issues hold the detail and the current state; this page
is the direction. It is reviewed at least once a year and when a release changes it.

[//]: # "Maintainers: replace the prompts with the project's own plans, and review this page at least once a year."

## Scope

NCode.Mediator covers what [README.md](README.md) describes. A feature outside that starts as an issue, where the
maintainers say whether it fits.

## Next Twelve Months

[//]: # "Maintainers: list what the project plans to do in the next twelve months, one bullet each, linking its epic rather than listing its stories."

- **Supported .NET.** Move both packages off the older LTS they target, past its end of support as of 2026-11-29, so
they target only LTS releases Microsoft supports, and record which version ships the change
([#33](https://github.com/NCodeGroup/Mediator/issues/33),
[ADR-0155](docs/decisions/project-template/0155-dotnet-code-targets-only-lts-releases-and-prose-names-no-dotnet-version.md)).
- **Publishing.** Publish the packages through nuget.org trusted publishing instead of an API key kept as a secret,
retire the build and test jobs of `.github/workflows/main.yml`, which `ci.yml` already runs, and harden its publish
job ([#25](https://github.com/NCodeGroup/Mediator/issues/25)).
- **Decisions left from the template upgrades.** Settle the assembly version, the auto-merge exception, the
`CA1711` and `CA1716` names in the public API, who owns `Directory.Packages.props`, and the changelog's backfill of
1.0.0 ([#25](https://github.com/NCodeGroup/Mediator/issues/25)).
- **Supply chain.** Keep external inputs pinned and current
([ADR-0008](docs/decisions/project-template/0008-external-inputs-are-pinned-and-kept-current.md)),
and raise the OpenSSF Scorecard score where the repository controls it
([ADR-0008](docs/decisions/project-template/0008-external-inputs-are-pinned-and-kept-current.md)), drop NCode
Review v1.7.0's cooldown exception once the version is three days old
([#32](https://github.com/NCodeGroup/Mediator/issues/32),
[ADR-0009](docs/decisions/project-template/0009-new-dependency-versions-wait-a-cooldown.md)), and raise the OpenSSF
Scorecard score where the repository controls it
([ADR-0020](docs/decisions/project-template/0020-github-projects-are-scored-by-openssf-scorecard.md)).
- **OpenSSF Best Practices.** Reach the silver level, which needs a second owner for continuity
([GOVERNANCE.md](GOVERNANCE.md#continuity), [docs/best-practices-badge.md](docs/best-practices-badge.md)).
- **OpenSSF Best Practices.** Register the project at bestpractices.dev and reach the silver level, which needs a second
owner for continuity ([GOVERNANCE.md](GOVERNANCE.md#continuity),
[docs/best-practices-badge.md](docs/best-practices-badge.md)).

## Not Planned

[//]: # "Maintainers: list what the project rules out, and why."

- Nothing is ruled out yet.
No decision record or document rules out a feature yet. A request outside the [scope](#scope) starts as an issue; when
the maintainers rule one out, the decision is recorded in [docs/decisions/](docs/decisions/README.md) and listed here.
Loading
Loading