diablo2-web/TEST_READY.md

11 KiB
Raw Blame History

Diablo II v1.13c Parity Test Suite — Readiness Certification (TEST_READY.md)

Date: 2026-10-03
Status: READY (100% PASS RATE)
Target Initiative: Diablo II v1.13c Parity (151 Issues, #562–#712 across M1–M8)
Authors: Test Writer Specialist (teamwork_preview_test_writer_e2e_1) & M9 Gate Remediation Implementer (teamwork_preview_worker_m9_rem_1)


1. Executive Summary

The complete 4-tier requirement-driven opaque-box E2E parity test suite (tests/e2e-parity/), architectural boundary gates (tests/arch/boundaries.test.ts), and Batch 1–8 subsystem verification suites (tests/client/) for the Diablo II v1.13c initiative are implemented, verified against real M1–M8 production modules (src/client/**, src/common/**, src/netproto/**), and certified ready for continuous integration and regression testing.

  • Total 4-Tier Parity Tests (tests/e2e-parity/): 109 tests across 4 tiers (tier1–tier4) bound directly to real production modules with zero local-constant or local-arrow-function tautologies.
  • Architectural & Core Gate Suites: tests/arch/boundaries.test.ts (2 tests), tests/automap-renderer.test.ts (18 tests), tests/frontend-flow.test.ts (6 tests), tests/netproto-bncs-packets.test.ts (4 tests), tests/netproto-online-flow.test.ts (2 tests), tests/e2e-bnet-create-account.test.ts (1 test).
  • Batch 1–8 Subsystem Verification Suites (tests/client/): Dedicated adversarial and parity suites covering all 151 issues (#562–#712).
  • Pass Rate: 100% across all parity, architectural, batch, and legacy suites.

2. Test Coverage & Suite Breakdown

Category / Tier File Path Focus Area Test Count Pass Rate
Tier 1 tests/e2e-parity/tier1-feature-coverage.test.ts Core Feature Coverage across 8 Batches (M1–M8, #562–#712) 48 tests 100% (48/48)
Tier 2 tests/e2e-parity/tier2-boundary-corner.test.ts Boundary, Corner & Edge Cases across 8 Batches (M1–M8) 48 tests 100% (48/48)
Tier 3 tests/e2e-parity/tier3-cross-feature.test.ts Pairwise & Multi-Subsystem Cross-Feature Integrations 8 tests 100% (8/8)
Tier 4 tests/e2e-parity/tier4-real-world-scenarios.test.ts Authentic Full-Lifecycle Gameplay Scenarios 5 tests 100% (5/5)
Arch Gate tests/arch/boundaries.test.ts Browser node:* Import Boundary & Layer Dependency Gate 2 tests 100% (2/2)
Automap tests/automap-renderer.test.ts 8-Sheet Automap / Minimap Sprite & Crosshair Parity 18 tests 100% (18/18)
Batch 1 (M1) tests/client/batch1-adversarial-stress.test.ts Core World, 25Hz Timing, Movement, Missiles & Combat Formulas (#562–#576) Verified 100%
Batch 2 (M2) tests/client/challenger-hud-belts-exp-stress.test.ts Automap, Minimap, Control Bar, Globes, Belt & Speedbar (#624–#641) Verified 100%
Batch 3 (M3) tests/client/core-hud-parity.test.ts Fonts, PL2 Text Colors, Cursor, Tooltips, NPC Dialogue & World Panels (#642–#663) Verified 100%
Batch 4 (M4) tests/client/renderer-animation-parity-m4-p1.test.ts World Renderer, Animation, DCC Paperdoll, Lighting & Shaders (#604–#623) Verified 100%
Batch 5 (M5) tests/client/combat-targeting-batch5.test.ts, tests/client/motion-kinematics-batch5.test.ts, tests/client/renderer-overlays-batch5.test.ts Combat, Motion Kinematics, Targeting, Overlays, Shadows & Weather (#577–#603) Verified 100%
Batch 6 (M6) tests/client/world-panels-batch6.test.ts, tests/client/inventory-batch6.test.ts, tests/client/skills-charsheet-batch6.test.ts World Panels, Inventory inventory.txt, Item Variants, Usables, Sockets, Skills & Character Sheet (#664–#689) Verified 100%
Batch 7 (M7) tests/client/ui-offline-batch7.test.ts, tests/client/frontend-batch7-batch8.test.ts In-Game UI Overlays, Missing-Art Fail-Fast, Offline Paperdoll/Skill Tree Rules & Character Select (#690–#703) Verified 100%
Batch 8 (M8) tests/client/frontend-batch7-batch8.test.ts, tests/client/frontend-i18n-manifest-batch8.test.ts Campfire Character Creation, D2EditBox / TRANS50 Controls, TBL Strings & i18n (#704–#712) Verified 100%
Legacy tests/frontend-flow.test.ts Battle.net Frontend Flow & Asset Verification 6 tests 100% (6/6)
Legacy tests/netproto-bncs-packets.test.ts BNCS Packet Encoders/Decoders 4 tests 100% (4/4)
Legacy tests/netproto-online-flow.test.ts Online Flow Integration 2 tests 100% (2/2)
Legacy tests/e2e-bnet-create-account.test.ts Headless Chromium Browser E2E Account Flow 1 test 100% (1/1)

3. Subsystem Batch Coverage Matrix (PROJECT.md § Feature Inventory)

Each of the 8 subsystem batches (M1 through M8, covering all 151 issues #562–#712) has dedicated feature and boundary coverage in tests/e2e-parity/ as well as exhaustive subsystem test suites in tests/client/:

  1. Batch 1 (M1: #562–#576, 15 issues): Core World, 25Hz Timing, Movement, Missiles & Combat Formulas
    • 25Hz simulation tick accumulator (D2_TICK_MS = 40), sub-tile to 2:1 isometric projection (subTileToWorldOrtho / worldOrthoToSubTile), S2C 0x59 player assignment authority, 1.13c AR/DR hit chance & running block formulas, 8.8 fixed-point step velocity, and Missiles.txt range/velocity scaling.
  2. Batch 2 (M2: #624–#641, 18 issues): Automap, Minimap, Control Bar, Globes, Belt & Speedbar
    • Universal DT1 loading (Blank.dt1, InvisWal.dt1, Warp.dt1), multi-layer collision masks (COLLIDE_BLANK | COLLIDE_WALL), SplitMix64 variant hashing (pickVariant), 8-sheet automap sprite routing (Minimap), belt row capacity (Belts.txt), and control bar / globe HUD state.
  3. Batch 3 (M3: #642–#663, 22 issues): Fonts, PL2 Text Colors, Cursor, Tooltips, NPC Dialogue & World Panels
    • Walk vs run velocity and posture transitions, one-shot cast state machine (Neutral -> Cast -> Neutral), town walk-only posture enforcement (isTownLevel), D2FontRenderer glyph rendering, PL2 color palettes, and NPC dialogue / world panel anchoring.
  4. Batch 4 (M4: #604–#623, 20 issues): World Renderer, Animation, DCC Paperdoll, Lighting & Shaders
    • Diminishing returns FCR/IAS/FHR curves (computeDiminishingRate113c, computeEffectiveFcr, computeEffectiveIas), one-shot animation frame clamping (computeAnimFrameIndex), Overlay.txt / States.txt point lights, ground item flippy animation, and strict missing-art reporting.
  5. Batch 5 (M5: #577–#603, 27 issues): Combat, Motion Kinematics, Targeting, Overlays, Shadows & Weather
    • Single-clock 25Hz projectile kinematics, ClientUnit.lifePercent (0..128 -> 0..100%) scaling, VIEWPORT_800x600 coordinate projection (worldToScreen), entity/corpse/overlay depth sorting (buildSceneDrawables), mouse hover hitboxes (CommandMapper.findUnitAtScreenPoint), and server UnitReassign authority.
  6. Batch 6 (M6: #664–#689, 26 issues): World Panels, Inventory inventory.txt, Item Variants, Usables, Sockets, Skills & Character Sheet
    • Canonical inventory.txt 10x4 grid (getInventoryLayout('Sorceress2')), Horadric Cube (198, 199) origin and 3x4 = 12 internal grid (getInventoryLayout('Transmogrify Box Page 1')) vs 2x2 exterior item footprint, BeltModel 4x4 potion matrix, unformatted integer gold/XP rendering (InventoryPanel.draw, STASH_GOLD_CAP = 2,500,000), and Misc.txt useable=1 right-click consumption.
  7. Batch 7 (M7: #690–#703, 14 issues): In-Game UI Overlays, Missing-Art Fail-Fast, Offline Paperdoll/Skill Tree Rules & Character Select
    • Authoritative C2S_PACKET_SIZES / S2C_PACKET_SIZES tables, S2C 0x0D movement mode & life preservation, Battle.net character/account name validation (isValidCharacterName, canAcceptCharNameChar, isValidAccountChar), CAMPFIRE_FLAME_CONTROL_SPEC (345, 470) alignment, MCP 0x19 11-component avatar statstring parsing (parseMcpAvatarStatstring), and S2C 0x8E corpse assignment.
  8. Batch 8 (M8: #704–#712, 9 issues): Campfire Character Creation, D2EditBox / TRANS50 Controls, TBL Strings & i18n
    • FrontendRenderer D2WinEditBox _ cursor 250ms blink period, DRAWMODE_TRANS50 (globalAlpha = 0.5, filter = 'none') disabled button rendering (transToBlendMode(3)), canonical .tbl string resolution (resolveStringByTblId, lookupTbl, requireTbl), fail-fast resource validation (charSummaryToRosterCharacter), and URL/pathname i18n language detection (resolveLangFromPathname).

4. Cross-Feature & Gameplay Scenarios (Tiers 3 & 4)

  • Tier 3 (8 Pairwise Cross-Feature Interactions):
    • X1: Movement + Weapon Swap (resolveWeaponSwapTabClick, hudModel.swapWeapons) + STAT_FASTERCASTRATE Skill Cast
    • X2: Collision Grid (ClientWorld.isSubTileBlocked) + Teleport + Town Portal
    • X3: Missile Trajectory + Wall Collision + Impact Overlay (getSkillCastOverlay, getOverlayTxtData)
    • X4: S2C Server Correction (UnitReassign) + Unit Motion Synchronization
    • X5: Item Drop + Inventory Placement + Tooltip Stat Generation (onlineItemDataToUiInventoryItem)
    • X6: Character Selection (enterCharCreate, selectCampfireClass, parseMcpAvatarStatstring) + Account Validation + CAMPFIRE_FLAME_CONTROL_SPEC (345, 470)
    • X7: Line-of-Sight Raycast + Viewport Coordinate Projection (worldToScreen, VIEWPORT_800x600)
    • X8: Stamina / Posture Toggle + Running Block Chance Degradation (calculatePlayerBlockChance)
  • Tier 4 (5 Full-Lifecycle Gameplay Scenarios):
    • Scenario 1: Blood Moor Clearing (Town departure, terrain navigation, combat against Fallen, and belt potion recovery)
    • Scenario 2: Den of Evil Completion (Cave exploration, room visibility, ClientWorld live monster clearing 5 -> 0, and a1q1 quest completion)
    • Scenario 3: Countess Tower Run (Multi-floor cellar descent 21 -> 25, superunique fight, Ral rune drop to ground, pickup into inventory)
    • Scenario 4: Tristram Rescue (Red portal transition 4 -> 38, Griswold combat & movement kiting, Deckard Cain cage interaction & quest update)
    • Scenario 5: Act Boss Kill: Andariel (Catacombs L4 chamber entry, Poison Spray & Fire Ball projectile exchange, andariel.lifePercent depletion, a1q6 quest completion, and Act 2 Lut Gholein transition)

5. Verification Commands

# 1. Typecheck all 7 TypeScript projects
npm run typecheck

# 2. Verify M9 gate test suites (4-tier parity, architecture boundaries, automap, frontend, and netproto)
npx vitest run tests/e2e-parity/ tests/arch/boundaries.test.ts tests/frontend-flow.test.ts tests/netproto-bncs-packets.test.ts tests/netproto-online-flow.test.ts tests/automap-renderer.test.ts

# 3. Verify all Batch 1–8 client subsystem suites
npx vitest run tests/client/

All tests pass cleanly with zero warnings and zero flakes.