49aacb0 renamed ReplayMoveCommand -> ReplayMove (and siblings); sync the two stale expectations in data-state/src/replay/commands.test.ts (constructor names + core.ts source assertions).
Adds a third metric that calls the real calculateCritical for every monster on
the merged map and fully consumes the generator, plus a second console.table
with monsters / total ms (sampled median of one full-map sweep) / avg ms.
avg ms equals total ms divided by the monster count.
Merges the first 1/5/13 real 13x13 maps into one grid-tiled map
(13x13, 39x26, 52x52 with 11/79/204 monsters), builds the scene from a real
CoreState (real converters/reducer/calculator/final effect), assigns 12 real
Enemy prefabs (3 CommonAura ranges + GuardAura) via a seeded mulberry32, and
records buildup + map damage build timings with performance.mark/measure.
Zero assertions.
- measureCase sampling loop now pairs mark(startTag)/mark(endTag) with
measure(measureName, startTag, endTag) and clears marks/measures per sample
- tag names derive from caseName+scale so they never collide across cases
- WARMUP_RUNS/SAMPLE_RUNS/median/min/p95/toFixed(3)/columns unchanged
- HeroAttribute.loadState replaces its private base object; the HeroAttribute wrapper identity is preserved so equipment/combat references stay valid across load (#06-17-1/#06-17-2).
- Clone the incoming base attribute in the constructor so the shared HERO_DEFAULT_ATTRIBUTE is no longer mutated across CoreState instances.
- Use any for the hero position in combat handler/aura/enemy-view generics to clear the 45 new type errors introduced by HeroAttribute implementing ISaveableContent.
- migrate the top-level snapshot assertion to heroSave.attribute.values.hp
- add CoreState enemyContext.getBindedHero() regressions: same live attribute before/after load, no rebinding, across all compressions
- expand COMPRESSIONS to NoCompression / LowCompression / HighCompression so the matrix is 3 map counts x 3 compressions x 3 timing items = 27 rows
- keep measureCase, fixture build order, side load and 06-16 files untouched; still zero assertions
- one full run: 5 perf files / 45 tests passed, 0 WARNING/ERROR codes, saveablesReal.perf.ts (27 tests) in 379ms -- no case approaches the 30000ms testTimeout
- move root floors.json into packages-user/data-state/test/fixtures/ (byte-identical) and delete the root copy
- add saveablesReal.perf.ts: toFlat/clearCodes/registerTiles/createRealMapFixture with a one-shot compareWith baseline
- seed the minimum 1 equipment instance so HeroEquipsStore.loadState does not raise error 58
- 3 rows: save / load / round trip for 1 map x NoCompression, zero assertions
- seedState/mutateState/assertRestored now cover every key state: hero base attrs + modifier final atk + location, flags score/coins/stage, map two blocks + active status, enemy hp/atk, replay steps
- Replay seeded with 10 @system/replay steps mixing Up/Right/Down/Left/Teleport/UseItem/Equip/Unequip and varied param types, asserted per step
- New container test loops flags and replay through CoreState across the three compression tiers
- Append 06-13 create-or-append section to 06-COVERAGE-MAP.md; existing #06-09-1..5 skips unchanged
- drive real MainDamageCalculator over a monster with 10 top-level specials,
real aura 25, real support 26, common/special query and final effects
- assert one exact {damage,turn} with full per-branch derivation in comments
- add a control asserting the result differs without the support pipeline
- append the 06-10 coverage-map section (create-or-append, no new codes)
- play a recorded small-map route with bounded waiting and recording disabled
- assert a second recording equals the first step-by-step (code and param type/value)
- trigger warn 176 and errors 2001-2008 through the real replay commands
- append 06-07 code coverage map rows and record finding #06-07-1
- combine multiple top-level specials through the real damage calculator
- cover real support recursion, aura base/query combination and stage order
- cover final-effect priority order and damage cache markDirty/deleteEnemy/with
- add real-API single-special damage baselines via EnemyManager prefab
- add real EnemyContext single common aura and single guard aura baselines
- inline synthetic fixtures with no production changes
- add data-state/test/saveablesRoundTrip.test.ts: public CoreState.saveState/loadState over 5 saveables x 3 compressions, codes 112/113/177/178
- append 06-09 section to 06-COVERAGE-MAP.md (11 codes, create-or-append)
- register #06-09-1..5 suspected defects and the pre-existing test:ci blocker in 06-TEST-FINDINGS.md
- add a normal case for GuardAuraConverter.convert (code 26 -> GuardAura)
- assert GuardAura priority/couldApplyBase/couldApplySpecial/range/applySpecial
- keeps D-30 per-public-method coverage symmetric with CommonAura
- Zone/Repulse/Laser/Between/Ambush views: range params, damage info, guards
- MainMapDamageConverter: per-special view order and laser face lookup
- MainMapDamageReducer: sum, max-damage type and catch/repulse union
- MainDamageCalculator: base, defeat, all special branches, guard recursion/warn 137, negative-damage flag, critical limit
- MainEnemyFinalEffect: solid/mimic/unchanged branches and priority
- MainEnemyComparer: base attributes, special count/code/value deep equality
- rewrite every built-in as EventXxx implements BuiltInFunction<P, E>
(setBlock/moveBlock/deleteBlock/moveHero/moveHeroStep/touchFront/
insertEvents/insertEvent), matching the EventSetBlock reference style
- move shared helpers to event/utils.ts (getPossibleMap, getPossibleLayer,
getEventExecutor, enter/exitEventInsert); utils is not exported via index
- move per-class helpers into private methods (EventTouchFront and
EventInsertEvents collectInvocations)
- use IObjectMover.push for move sequences instead of manual step calls
- registrations.ts: one createEventRegistrations() writing the eight entries
in order, categories separated by single-line comments
- remove EventBuiltinName; classes own short string names
- update event tests; core.ts uses createEventRegistrations
- ReplayUseItemCommand / ReplayEquipCommand / ReplayUnequipCommand now extend
BaseReplayCommand with fixed numeric params and per-false-position logger
error codes (2006-2010); string item/slot params removed, autoUnload is a
required bool.
- remove isNumber/isItem/isBoolean/isSlot/resolveSlot helpers; all logic now
lives in the command classes.
- drop createReplayCommandItems/registerReplayCommandItems; CoreState owns a
private registerReplayCommand() registering the eight stable codes directly.
- prune unused replay boundary types from replay/types.ts.
- fix ReplaySandbox: a replay ending on a run of moves now finalizes the
trailing run through notExecuted (previously the last move never started).
- rewrite commands.test.ts for the base-class design and direct registration.
Verified: data type gate 0 in-scope; vitest 19 files / 112 tests pass; prettier
and eslint clean on touched files.
- BaseReplayCommand with name/paramTypes and assertParameter guard
- add optional IReplayCommand.notExecuted for trailing-step finalization
- sandbox invokes previous command notExecuted when the next command differs
- rewrite ReplayMoveCommand (batched step + notExecuted start/await) and ReplayTeleportCommand
- add replay logger error codes 2001-2005 and warn 175
NOTE: command tests still reference the pre-rewrite class names; updated in follow-up.
- Convert map, hero, event, and registration-assembly function JSDoc
into multiline form for every touched declaration
- Preserve export-only barrels, class-owned registration order, direct
Statement[] insertion, hero front-touch ownership, and Chinese event
test comments