NEO-79: Reconcile plan and E5M1 backlog for ability registry DI.
parent
bd4912004a
commit
b9644a0453
|
|
@ -139,8 +139,10 @@ Working backlog for **Epic 5 — Slice 1** ([combat rules MVP](../decomposition/
|
|||
|
||||
**Acceptance criteria**
|
||||
|
||||
- [ ] Unknown ability id fails hotbar/cast validation same as today.
|
||||
- [ ] All four prototype ids resolve with expected **`baseDamage`** / **`cooldownSeconds`**.
|
||||
- [x] Unknown ability id fails hotbar/cast validation same as today.
|
||||
- [x] All four prototype ids resolve with expected **`baseDamage`** / **`cooldownSeconds`**.
|
||||
|
||||
**Landed ([NEO-79](https://linear.app/neon-sprawl/issue/NEO-79)):** [`IAbilityDefinitionRegistry`](../../server/NeonSprawl.Server/Game/Combat/IAbilityDefinitionRegistry.cs) + DI; hotbar/cast migrated — [NEO-79-implementation-plan.md](NEO-79-implementation-plan.md).
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@
|
|||
|
||||
## Acceptance criteria checklist
|
||||
|
||||
- [ ] Unknown ability id fails hotbar/cast validation same as today (`unknown_ability`, no behavior regression).
|
||||
- [ ] All four prototype ids resolve with expected **`baseDamage`** / **`cooldownSeconds`** via `TryGetDefinition`.
|
||||
- [ ] DI resolves `IAbilityDefinitionRegistry` at host startup (test via `InMemoryWebApplicationFactory`).
|
||||
- [ ] Unit tests (AAA): lookup for known prototype ids; unknown id returns false without throwing; `TryNormalizeKnown` accepts trimmed/case-variant input for catalog ids; `GetDefinitionsInIdOrder` returns four rows ordered by `id`.
|
||||
- [x] Unknown ability id fails hotbar/cast validation same as today (`unknown_ability`, no behavior regression).
|
||||
- [x] All four prototype ids resolve with expected **`baseDamage`** / **`cooldownSeconds`** via `TryGetDefinition`.
|
||||
- [x] DI resolves `IAbilityDefinitionRegistry` at host startup (test via `InMemoryWebApplicationFactory`).
|
||||
- [x] Unit tests (AAA): lookup for known prototype ids; unknown id returns false without throwing; `TryNormalizeKnown` accepts trimmed/case-variant input for catalog ids; `GetDefinitionsInIdOrder` returns four rows ordered by `id`.
|
||||
|
||||
## Technical approach
|
||||
|
||||
|
|
@ -118,3 +118,9 @@ No Bruno or manual QA for this story (server-only DI + internal migration; HTTP
|
|||
| **Case-only mismatch** — client sends id not in catalog after normalize | **Deny `unknown_ability`** — same as today; catalog ids are lowercase frozen strings. | **adopted** |
|
||||
| **Dual lookup surfaces** — `TryGetDefinition` vs `TryNormalizeKnown` | **Keep both** — hotbar/cast need normalize-only; combat/HTTP need row lookup without re-implementing trim rules. | **adopted** |
|
||||
| **Test const indirection** | **Keep `PrototypeAbilityRegistry` const strings** in existing tests — no mass string-literal churn. | **adopted** |
|
||||
|
||||
## Reconciliation (implementation)
|
||||
|
||||
- **`IAbilityDefinitionRegistry`** + **`AbilityDefinitionRegistry`** registered in **`AddAbilityDefinitionCatalog`**; catalog-only eager resolve unchanged in **`Program.cs`**.
|
||||
- **`HotbarLoadoutApi`** / **`AbilityCastApi`** inject registry and call **`TryNormalizeKnown`**; **`PrototypeAbilityRegistry`** reduced to id constants.
|
||||
- **10** new AAA tests in **`AbilityDefinitionRegistryTests`**; **31** existing AbilityInput tests unchanged and green (41 total in filtered run).
|
||||
|
|
|
|||
Loading…
Reference in New Issue