Skip to content

Fix weighted trade result parsing for 3.29#9996

Merged
LocalIdentity merged 3 commits into
PathOfBuildingCommunity:devfrom
czarandy:fix/trade-pseudo-mods-import
Jul 25, 2026
Merged

Fix weighted trade result parsing for 3.29#9996
LocalIdentity merged 3 commits into
PathOfBuildingCommunity:devfrom
czarandy:fix/trade-pseudo-mods-import

Conversation

@czarandy

@czarandy czarandy commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

Path of Exile 3.29 trade fetch responses return weighted pseudoMods entries as objects, for example:

{
  "description": "Sum: 178",
  "domain": "pseudo",
  "hash": "stat.statgroup.0"
}

FetchResultBlock currently calls :match() directly on the first entry, causing weighted trade searches to crash. Extract the object's description before matching while retaining compatibility with legacy string entries and safely handling empty arrays.

Steps taken to verify a working solution:

  • Reproduced the response shape against the live authenticated Path of Exile trade API.
  • Added regression coverage for current object entries, legacy string entries, and empty pseudoMods arrays.
  • Ran trade search in local instance

Link to a build that showcases this PR:

N/A — weighted trade response parsing only.

Before screenshot:

N/A

After screenshot:

N/A

@czarandy
czarandy marked this pull request as draft July 25, 2026 04:24
@czarandy
czarandy marked this pull request as ready for review July 25, 2026 04:30
@czarandy
czarandy force-pushed the fix/trade-pseudo-mods-import branch from 94f8041 to eb0eeea Compare July 25, 2026 04:31
@czarandy

Copy link
Copy Markdown
Contributor Author

Verification update:

  • The reporter restarted the application and manually confirmed weighted trade results now load without the pseudoMods[1]:match() crash.
  • The current run_tests failure is inherited from dev: this PR reports 393 successes / 4 failures / 1 error, while upstream dev reports 392 successes / 4 failures / 1 error with the same failures in TestCompareBuySimilar_spec.lua and TestTradeHelpers_spec.lua. The additional regression test in this PR passes.

Upstream failing run: https://github.com/PathOfBuildingCommunity/PathOfBuilding/actions/runs/30144177951

@czarandy
czarandy force-pushed the fix/trade-pseudo-mods-import branch from eb0eeea to 54d6771 Compare July 25, 2026 04:53
@czarandy

czarandy commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

ok tests are fixed now

@czarandy

Copy link
Copy Markdown
Contributor Author

Restored the matches thread of hope radius as an option regression and retained a dedicated legacy #-valued option test. The production lookup now supplies compatibility definitions for Thread of Hope and Summon Bestial options that are absent from the 3.29 stats response, alongside the new flattened-option handling. All checks pass.

@LocalIdentity LocalIdentity linked an issue Jul 25, 2026 that may be closed by this pull request
2 tasks
@LocalIdentity
LocalIdentity merged commit af04eb3 into PathOfBuildingCommunity:dev Jul 25, 2026
3 checks passed
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.

Item Trade Search

2 participants