4.4 KiB
Code review — NEO-92 (E5M2-06)
Date: 2026-05-27
Scope: Branch NEO-92 vs main — NEO-92 aggro store implementation, plan/docs, and code review
Base: main
Follow-up: Code review suggestions addressed (docs alignment, backlog hook bullet, exact-leash-boundary test).
Verdict
Approve with nits
Summary
This branch adds the prototype aggro spine for Epic 5 Slice 2: an in-memory IThreatStateStore, deterministic AggroOperations (first-hit acquire, leash-radius clear), and wiring in AbilityCastApi, PositionStateApi, and the dev combat-target fixture. The design keeps CombatOperations engine-pure and matches kickoff decisions (cast-layer acquire, move + pre-acquire leash clear, no proximity re-aggro). Test coverage is solid — unit, HTTP integration, cast guard skip, move clear, and fixture reset — and the filtered NEO-92-related test run passed locally. Risk is low for merge; remaining gaps are documentation tracking and a few optional test/doc polish items.
Documentation checked
| Path | Result |
|---|---|
docs/plans/NEO-92-implementation-plan.md |
Matches — store, ops, hooks, fixture, tests, and reconciliation section align with the diff. |
docs/plans/E5M2-prototype-backlog.md (E5M2-06) |
Matches — AC checkboxes, landed note, and in-scope hook bullet updated to AbilityCastApi. |
docs/decomposition/modules/E5_M2_NpcAiAndBehaviorProfiles.md |
Matches — E5M2-06 landed note and threat-store section present. |
docs/decomposition/modules/documentation_and_implementation_alignment.md |
Matches — E5.M2 row includes NEO-92 landed note and plan link. |
docs/decomposition/modules/client_server_authority.md |
Matches — server-owned aggro holder; no client projection in this slice (NEO-94 deferred). |
server/README.md |
Matches — threat/aggro section documents acquire, leash clear, fixture reset, and NEO-94 deferral. |
Blocking issues
None.
Suggestions
UpdateDone. E5.M2 row updated with NEO-92 landed note and References link.documentation_and_implementation_alignment.mdE5.M2 row — Add NEO-92 landed (IThreatStateStore,AggroOperations, cast/move/fixture hooks) and linkNEO-92-implementation-plan.mdin the References column, consistent with NEO-87–NEO-91 entries. The implementation plan and E5_M2 module doc already claim this update.Align E5M2-06 backlog “In scope” hook bullet — Change “Hook fromDone. E5M2-06 in-scope bullet updated.CombatOperations.TryResolve” toAbilityCastApiafter successful resolve whenDamageDealt > 0so the backlog matches the adopted kickoff decision and avoids misleading NEO-93 readers.Add an exact-leash-boundary unit test — Plan calls out inclusive boundary (Done.distance > leashRadiuskeeps holder). Existing tests use clearly inside/outside positions; a case atdistance == leashRadiuswould lock that invariant alongsideHorizontalReachconventions.TryClearOnLeashForPlayer_ShouldKeepHolder_WhenPlayerAtExactLeashRadiusinAggroOperationsTests.cs.
Nits
Nit: Branch mixes five unrelatedDone. MLX guide removed from NEO-92 branch (lives onchore:commits (docs/dev/local-mlx-cursor.md, README pointer) with NEO-92 work. Consider splitting or noting in the PR description so reviewers can focus on the aggro diff.docs/local-mlx-cursor); history rewritten to NEO-92-only commits.- Nit:
AbilityCastApiTestsstill names helpersLockPrototypeTargetAlphaAsyncwhile lockingprototype_npc_melee— harmless legacy naming from NEO-91 migration. - Nit: Plan mentioned an optional thread-safety spot check for
InMemoryThreatStateStore; acceptable to defer for three fixed prototype ids.
Verification
# NEO-92-focused tests (passed 2026-05-27)
dotnet test server/NeonSprawl.Server.Tests/NeonSprawl.Server.Tests.csproj \
--filter "FullyQualifiedName~Npc|FullyQualifiedName~MoveCommandApiTests.PostMove_ShouldClearAggro|FullyQualifiedName~AbilityCastApiTests.PostAbilityCast_ShouldSetAggro|FullyQualifiedName~AbilityCastApiTests.PostAbilityCast_ShouldReturnCombatResolution_WhenZeroDamage|FullyQualifiedName~CombatTargetFixtureApiTests"
# Full server suite before merge
dotnet test server/NeonSprawl.Server.Tests/NeonSprawl.Server.Tests.csproj
Manual: no Bruno changes required (store not on wire). Confirm dev fixture still resets HP + aggro between Bruno runs if exercising combat spines locally.