BrighterCommand / BrighterCommand/Brighter
InboxScope is referenced nowhere outside its own declaration — the scope: argument does nothing
- Dominant language
- C#
- Stars
- 2.5k
- Forks
- 296
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 21
Description
## What happens
`InboxConfiguration` accepts a `scope:`:
```csharp
public InboxConfiguration(
IAmAnInbox? inbox = null,
InboxScope scope = InboxScope.All, // <-- this
bool onceOnly = true,
OnceOnlyAction actionOnExists = OnceOnlyAction.Throw,
Func? context = null)
```
`InboxScope` is a documented `[Flags]` enum with `Commands = 1`, `Events = 2`, `All = 3`, and `InboxConfiguration.Scope` is a public property. **Nothing reads it.**
```text
git grep -w InboxScope -- src excluding InboxConfiguration.cs : 0
git grep -w OnceOnlyAction -- src excluding its own file (control) : 43
```
Zero at `10.7.0` and zero at `master`. `PipelineBuilder.AddGlobalInboxAttributes` — the only consumer of `InboxConfiguration` on the pipeline path — reads `Context`, `OnceOnly` and `ActionOnExists`, and never `Scope`.
## Why it matters
It reads as a real knob. Setting `scope: InboxScope.Commands` to de-duplicate commands but not events is an obvious thing to reach for, it compiles, and it changes nothing — you get `All` behaviour whatever you pass. Our own documentation carried a table explaining when to choose `Commands` over `Events`; that text was wrong and has been removed.
## Suggested
Either implement it in `AddGlobalInboxAttributes` (filter by whether the request is an `ICommand` or an `IEvent` before adding the attribute), or mark it `[Obsolete]` and drop it from the constructor. **An inert argument with a type, a default and an XML comment is indistinguishable from a working one** — which is exactly why it went undetected.
Raised from documentation work; the maintainer asked for it to be filed.
Contributor guide
Research direction
Read InboxConfiguration.cs and PipelineBuilder.AddGlobalInboxAttributes, then use the reported git grep results to confirm Scope has no consumer. Determine with the maintainer whether Scope should be implemented or removed, and inspect existing inbox pipeline tests to establish coverage; done means the chosen behavior is explicit, tested, and no longer silently inert.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100