• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / marketplace-server / 30923252019
61%

Build:
DEFAULT BRANCH: main
Ran 04 Aug 2026 03:18PM UTC
Jobs 1
Files 162
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Aug 2026 03:15PM UTC coverage: 60.972%. Remained the same
30923252019

push

github

web-flow
fix: stop the duplicate-order guard splitting one trade into two statuses (#381)

* fix: stop the duplicate-order guard splitting one trade into two statuses

An item whose order had been executed at least once and then cancelled became PERMANENTLY
unlistable. Creating a new listing was rejected with "There is already an open order for this
Item", while the Shop catalogue and the Builder both correctly showed the item as not for sale —
so nothing in any UI pointed at the listing doing the blocking.

Cause. squid_trades.trade holds one row per ON-CHAIN ACTION, and their callers differ: a
cancellation is called by the signer, an execution by whoever bought (a contract, for a relayed
or credits-funded purchase). getTradesForTypeQuery grouped by trade_status.caller, so one trade
became one group per caller and the status CASE was evaluated inside each: the group holding the
cancellation counted it and returned cancelled, the group holding the execution counted no
cancellation, fell through every branch and returned open. Two contradictory rows for one trade.

getOpenItemOrderQuery and getOpenNFTOrderQuery then do WHERE status = 'open' LIMIT 1, which finds
the phantom row. getTradesForTypeQueryWithFilters — what the catalogue reads — never grouped by
caller, which is why the two disagreed and why the UIs looked right.

caller was in the GROUP BY only because the status CASE referenced it, in an extra
`AND t.signer = trade_status.caller` that the filtered query does not have. Removing that
reference is what allows grouping by the trade, which is the unit a status describes. The two
status computations are now identical.

Note the precedence in the clause that was removed: AND binds tighter than OR, so it read as
`condA OR (condB AND caller = signer)` rather than gating the whole branch — a second reason it
did not mean what it appeared to.

Verified against a real database (dev), not just by reading:

- Before: the guard returned 1 row for the affected item... (continued)

1626 of 3082 branches covered (52.76%)

Branch coverage included in aggregate %.

2953 of 4428 relevant lines covered (66.69%)

22.66 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30923252019.1 04 Aug 2026 03:18PM UTC 324
62.96
GitHub Action Run
Source Files on build 30923252019
  • Tree
  • List 162
  • Changed 127
  • Source Changed 1
  • Coverage Changed 127
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30923252019
  • c20509b0 on github
  • Prev Build on 2.23.0 (#30919305872)
  • Next Build on main (#30944510567)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc