Skip to content

[Quartermaster] Sprint: Level-Up Wizard Correctness & Debt - #2706

Draft
LordOfMyatar wants to merge 12 commits into
mainfrom
quartermaster/issue-2677
Draft

[Quartermaster] Sprint: Level-Up Wizard Correctness & Debt#2706
LordOfMyatar wants to merge 12 commits into
mainfrom
quartermaster/issue-2677

Conversation

@LordOfMyatar

@LordOfMyatar LordOfMyatar commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

Corrects the remaining level-up math errors and retires the duplicated logic that causes them.
Five items, sequenced so the correctness fixes land before the refactors.

Every claim was challenged against HEAD during pre-warm before planning. Three issue bodies
needed correction first: #2580's headline ("~600k uncached 2DA reads") was refuted — the 2DA
layer already caches, and its row counts came from ?? fallback constants — so it is rescoped
to the real hot spots. #2581 understated itself: all six auto-assign priority branches have
drifted, not one. #2578 was upgraded to confirmed-reachable.

Work Items

Related Issues

Checklist

  • Implementation complete
  • Tests added/updated
  • CHANGELOG updated with date
  • Manual spot-checks verified

🤖 Generated with Claude Code

)

Auto-Assign Skills passed current level + 1, capping ranks below the manual
+/- path and leaving pooled points unspent in multi-level level-ups. Both
sites now derive the level from CalculateFinalCharacterLevel.
Tests: 1335 passed, 0 failed.
#2578)

The wizard inlined the per-level formula and omitted the level-1 x4 rule,
so a level-0 creature gaining its first level got a quarter of the correct
points. Both paths now call CalculateSkillPointsForLevel.
Tests: 1342 passed, 0 failed.
…ices (#2581)

Auto-assign, the point-buy table, ability-name arrays, and gender display
had wizard-local copies. All six priority branches had drifted; #1737's
order is newer and is now canonical in the service and pinned by tests.
Tests: 1349 passed, 0 failed.
Four copies of the FeatsTable walk now call ForEachClassFeatRow, which also
settles the 200-vs-300 row-count fallback. The List filters stay distinct —
they are different queries, not drift.
Tests: 1350 passed, 0 failed.
…ebuild (#2580)

RenderSkillRows rebuilt the whole Grid tree on every +/- and every search
keystroke. Rows are now built once into a map; +/- refreshes only rank
labels and button states, and search toggles row visibility. Also passes
the resolved feat table through ForEachClassFeatRow to clear a null warning.
Tests: 1350 passed, 0 failed.
GetColumnIndex ran an O(columns) case-insensitive scan on every call, once
per 2DA cell read across all tools. It now builds a name-to-index map once
per file, rebuilt when the column count changes. First-occurrence and
invalidation behaviour pinned by tests.
Formats: 1768 passed. Quartermaster: 1350 passed.
The orchestrator now accepts a class-level range and a per-level ability map,
looping per-level work (class levels, granted feats, slotted increases) while
applying pooled HP/skills/spells once. Single-level is the From==To degenerate
case, byte-identical to before. Wizard rewiring follows.
Tests: 1352 passed, 0 failed, incl. multi-level equivalence.
…#2575)

The wizard's separate multi-level apply is gone; both single and multi-level
go through the one span-aware orchestrator. The per-level ability map is now
built by the unit-tested BuildAbilityIncreasesByLevel helper from the
increment source of truth, retiring the three hand-synced projections and
their second writer (#2581 3f). History still records one entry per level.
Tests: 1357 passed, 0 failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Quartermaster] Sprint: Level-Up Wizard Correctness & Debt

1 participant