fix(events): fill randomized slots with distinct activity IDs - #33
Open
mwg-bender[bot] wants to merge 5 commits into
Open
mwg-bender[bot] wants to merge 5 commits into
mwg-bender[bot] wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Optimize repeated full-pool regrouping and scans that can make large requests quadratic.
Review effort: Lite
Findings: None
What changed in this PR
Updates randomized event generation to keep activity IDs distinct while preserving valid drafts, rerolls, and accessible errors.
Changes:
- Handles exhausted and orphan activity pools.
- Adds API and web regression tests.
- Documents development checks.
| File | Summary |
|---|---|
README.md |
Documents checks and selection behavior. |
MW-GC.EventManager.Web/Pages/Events.razor |
Updates randomization, filtering, rerolls, and errors. |
MW-GC.EventManager.Tests/SlotRerollTests.cs |
Adds web-handler regression coverage. |
MW-GC.EventManager.Tests/MW-GC.EventManager.Tests.csproj |
Includes the production generator in tests. |
MW-GC.EventManager.Tests/EventGeneratorTests.cs |
Adds API generator regression coverage. |
MW-GC.EventManager.API/Services/EventGenerator.cs |
Ensures distinct activity IDs during generation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
mwg-bender
Bot
force-pushed
the
fix/22-unique-activity-ids
branch
from
September 22, 2026 02:29
21f6873 to
934677b
Compare
The unique-games draw fixed each game to its first available activity and failed whenever an early greedy pick stole the only activity a later game could use, even when a valid assignment existed. Replace the greedy pass with an augmenting-path (Kuhn's) bipartite matcher between games and distinct activity IDs: randomize preference only, so earlier choices can be reassigned and every game is considered before declaring failure. Inject Random via an internal constructor for deterministic tests (public parameterless ctor unchanged). Add xUnit regression tests covering reassignment, games beyond an unmatchable initial subset, multi-hop repair chains, and an exhaustive 512-graph feasibility oracle.
mwg-bender
Bot
force-pushed
the
fix/22-unique-activity-ids
branch
from
September 22, 2026 04:33
972fdc5 to
ebf432c
Compare
This branch has not been deployed
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.

Summary
Closes #22
Verification
.NET SDK 10.0.401; DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 because this runner lacks ICU. Commands use local .dotnet/dotnet and -p:NoWarn=NETSDK1188 to suppress invariant-mode locale warnings.
Tests exercise production generator source and actual page handlers, not browser rendering or live Azure storage. No AGENTS.md, CONTRIBUTING.md, or docs directory existed on dev; README previously contained only the project title. Base dev is explicitly requested. No merge or deployment performed.