Skip to content

🦞 igor-claw: settle Stores catalog version before product calls in setup-online-store#690

Open
ayal wants to merge 1 commit into
mainfrom
igor-claw/catalog-version-settle-check
Open

🦞 igor-claw: settle Stores catalog version before product calls in setup-online-store#690
ayal wants to merge 1 commit into
mainfrom
igor-claw/catalog-version-settle-check

Conversation

@ayal

@ayal ayal commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • setup-online-store.md assumed Catalog V3 immediately after installing Stores. Reproduced on a freshly-provisioned managed-headless site: for several seconds post-install GET /stores/v3/provision/version reports V1_CATALOG, then there's a ~1-2s window where product enforcement has already switched to V3 while the version-check endpoint itself still reports the stale V1_CATALOG value, before both agree (fully stable ~8s after install in testing).
  • An agent that discovers the version by calling a product endpoint and branching on 428 (as this recipe implicitly encouraged by assuming V3) gets alternating 428 CATALOG_V1_SITE_CALLING_CATALOG_V3_API / 428 CATALOG_V3_CALLING_CATALOG_V1_API on the same site seconds apart — exactly the friction reported by a user building a Wix Headless pet-supply store.
  • Adds STEP 0: check /stores/v3/provision/version, settle it with a short bounded re-check (since the check endpoint itself can lag), then commit to that version for the whole recipe — no reactive endpoint-family flipping on 428. Also cross-references this from SETUP.md's stores install step.
  • wix-manage's sibling recipe (setup-online-store-catalog-v3.md) already checks the version once via this same endpoint; this brings wix-headless to parity and hardens the check against the observed settle window.

This PR was opened automatically by an AI agent on behalf of Ayal (ayalg@wix.com), researching headless-platform feedback.
Slack thread: https://wix.slack.com/archives/C0BDXM5LLE7/p1784735372076189

Test plan

  • Reproduced the version-settle race against two freshly-provisioned throwaway sites (Stores install → poll provision/version + V1/V3 product query every ~1.3s) — confirmed the V1→transitional→V3 sequence described above.
  • Confirmed GET /stores/v3/provision/version is a valid, working endpoint on a live site.
  • Not run against a live agent session (docs-only change, no code to execute).

setup-online-store.md assumed Catalog V3 immediately after installing
Stores. Reproduced on a fresh site: for several seconds post-install the
catalog reports V1, then hits a window where V3 enforcement is already
live while /stores/v3/provision/version still reports stale V1, before
settling. Agents that probe with a product call and branch on 428 get
alternating CATALOG_V1_SITE_CALLING_CATALOG_V3_API /
CATALOG_V3_CALLING_CATALOG_V1_API errors on the same site seconds apart.

Adds STEP 0: check /stores/v3/provision/version, settle it with a short
bounded re-check, then commit to that version for the whole recipe
instead of reactively flipping endpoint families on 428.

Opened automatically by an AI agent on behalf of Ayal (ayalg@wix.com).
Slack thread: https://wix.slack.com/archives/C0BDXM5LLE7/p1784735372076189
@ayal
ayal requested a review from ozsay July 22, 2026 15:59
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