Skip to content

Copy cached Time-Lost radius mods per node#1920

Closed
unrealdreamz wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
unrealdreamz:fix/time-lost-radius-cache-copy
Closed

Copy cached Time-Lost radius mods per node#1920
unrealdreamz wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
unrealdreamz:fix/time-lost-radius-cache-copy

Conversation

@unrealdreamz
Copy link
Copy Markdown
Contributor

Fixes #717

Summary

  • Copy cached Time-Lost / Timeless radius jewel mods before adding them to each passive node.
  • Refresh the local cache reference immediately after rebuilding stale radius-jewel cache data.
  • Add a focused regression spec for weapon-set condition leakage between cached radius-jewel mods.

Root Cause

The Time-Lost / Timeless radius-jewel fast path caches the generated small/notable mod lists once, then reuses those same mod table references for every matching passive node.

buildModListForNode later mutates each node-local mod to add or remove Condition:WeaponSet1/2. Because ModList:AddList inserts references, not copies, a weapon-set passive and a normal passive could mutate the same cached mod object. That let weapon-set conditions leak between passives, matching the Against the Darkness mana overcount reported in #717.

Fix

  • Added a small helper that deep-copies cached radius-jewel mods into the node-local mod list.
  • Replaced the cached Time-Lost / Timeless AddList calls with copied insertion for both small and notable passive cached mods.
  • Rebound the local cache variable after refreshing stale radius-jewel cache data so the current node uses the rebuilt cache immediately.
  • Added TestRadiusJewels_spec.lua to prove a weapon-set passive keeps its WeaponSet2 condition after a normal passive using the same cached Time-Lost mod is processed.

Validation

  • gh auth status -> authenticated as unrealdreamz.
  • Open PR search for #717 Against the Darkness Time-Lost Diamond -> no duplicate open PR found.
  • git diff --check -> passed; Git only reported existing Windows LF-to-CRLF checkout warnings.
  • git diff --cached --check -> passed; Git only reported existing Windows LF-to-CRLF checkout warnings.
  • git show --check --stat --oneline --no-renames HEAD -> passed.
  • Targeted Busted spec was added but could not be executed locally because this Windows environment has no lua, luajit, busted, docker, or docker-compose on PATH.

Risk / Rollback

Risk is limited to Time-Lost / Timeless cached radius-jewel mods. The change preserves the existing cache and parser behavior, but prevents later node-specific mutation from writing back into cached mod objects. Rollback is the single commit if CI exposes an unexpected fixture dependency on shared references.

@LocalIdentity
Copy link
Copy Markdown
Contributor

No longer an issue, not sure when we fixed it in PoB

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.

Against the Darkness, Time lost Diamond not calculating Mana correctly.

2 participants