[Quartermaster] Sprint: Level-Up Wizard Correctness & Debt - #2706
Draft
LordOfMyatar wants to merge 12 commits into
Draft
[Quartermaster] Sprint: Level-Up Wizard Correctness & Debt#2706LordOfMyatar wants to merge 12 commits into
LordOfMyatar wants to merge 12 commits into
Conversation
#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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
?? fallbackconstants — so it is rescopedto 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
TwoDAFilecolumn-index cache. LUW feat re-sort and the class-feat HashSet are deferred, tracked in [Quartermaster] perf: Wizard feat list does ~300-row 2DA scan per feat, rebuilt on every click #2580Related Issues
Checklist
🤖 Generated with Claude Code