Skip to content

Fix TestRareLike spec failing after level requirement change - #10417

Open
lucaskarsten wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/rarelike-test-level
Open

lucaskarsten wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/rarelike-test-level

Conversation

@lucaskarsten

@lucaskarsten lucaskarsten commented Nov 8, 2026 •

Copy link
Copy Markdown

Fixes # . No issue for this. dev CI has been failing since #10328.

Description of the problem being solved:

#10328 removed the hardcoded Requires Level 48 from That Which Was Taken, along with the other unique level requirements, because the requirement is now derived from the item's mods. spec/System/TestRareLike_spec.lua:84 still asserted 48, so busted has failed on dev since that merge. The run_tests job fails at TestRareLike_spec.lua @ 80 on dev (3dbca44) and on PRs opened since then, for example the runs on bugfix/polaric-devastation and feature/abyss-node-lines.

This PR removes the fixed assertion and adds a test for the derived requirement instead. The test crafts AnimalCharmMaximumRage2 onto the jewel and checks that the level requirement is max(base level, floor(mod level * 0.8)). For that mod this gives 48 (level 60 mod), the value the old line had.

Only the spec changes. No source or data files are touched.

Steps taken to verify a working solution:

  • Ran busted --lua=luajit with CI=true in the pathofbuilding-tests image on dev (3dbca44): 666 successes / 1 failure before, 668 successes / 0 failures after.
  • Changed the 0.8 factor in Item.lua to 0.7 and confirmed the new test fails (expected 48, got 42).
  • Checked the 0.8 rule against 7 real rare items from my character's API data (belt, gloves, rings, helmet, wand, body armour): the predicted requirement matched in-game in all 7, including one with a bench-crafted mod that sets the requirement.
  • Checked that the levels of the charm mods in ModJewelCharm.lua match the current game data (238/238).

Link to a build that showcases this PR:

N/A (test only)

Before screenshot:

N/A

After screenshot:

N/A

PathOfBuildingCommunity#10328 removed the hardcoded "Requires Level 48" from That Which Was Taken,
since the requirement is now derived from the item's mods. The spec still
asserted 48, so busted has failed on dev since that merge.

Replace the fixed value with a test that crafts a mod onto the jewel and checks
the derived requirement (max of base level and floor(mod level * 0.8)).
@lucaskarsten
lucaskarsten force-pushed the fix/rarelike-test-level branch from 78f16bd to 290967a Compare November 8, 2026 16:44
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.

1 participant