Keep a pack preview or receipt that overlaps a packs reload #2029

Merged
jason.woltje merged 1 commits from packs-flake into refactor 2026-11-21 03:36:03 +00:00
Owner

Each packs reload replaced the organization's state object, so a Preview, Apply or Hire click that overlapped a reload wrote its result to an object the page no longer draws. Each organization now keeps one state object that a load updates in place, and a load that began before the newest finished one is dropped.

Three forced-order tests fail on the old code. Lead check: 485 files, 4975 pass, 0 fail, 10 skip.

Each packs reload replaced the organization's state object, so a Preview, Apply or Hire click that overlapped a reload wrote its result to an object the page no longer draws. Each organization now keeps one state object that a load updates in place, and a load that began before the newest finished one is dropped. Three forced-order tests fail on the old code. Lead check: 485 files, 4975 pass, 0 fail, 10 skip.
jason.woltje added 1 commit 2026-11-21 03:35:35 +00:00
The pack picker built a new state object on every load and copied the
preview and receipt from the state it found when the load began. A click
kept the old object across its own request. So a preview or a hire receipt
that answered while a poll or an apply's page reload was reading the packs
was written to an object the page no longer drew, or was copied away
before it existed. Under host load this dropped the project preview in the
SP6 pack picker test and the hire status in the pack hire test.

Each organization now keeps one state object. A load writes its read
fields into it when it ends, and a load that began before the last one
applied is dropped, so an older list never replaces a newer one.

One browser test holds the fixture's reads to force each order of the
overlap, a second forces an older packs read to answer last, and a third
holds a reload's packs read while an apply's receipt lands.
jason.woltje merged commit 5a7e6765f8 into refactor 2026-11-21 03:36:03 +00:00
Sign in to join this conversation.