🦞 igor-claw: warn that headless-onto-existing-site rewrites canonical URL - #1004
🦞 igor-claw: warn that headless-onto-existing-site rewrites canonical URL#1004ayal wants to merge 1 commit into
Conversation
…canonical URL Provisioning headless via existingMetasite on a live published site silently flips the site's canonical/serving URL to an internal wix-site-host.com host (reproduced live: confirmed via before/after site-context reads and a live 301 redirect on the original URL), and there is no self-service revert — uninstalling the app instance and republishing do not restore it. The recipe had zero mention of this side effect. 🦞 igor-claw — opened automatically by an AI agent on behalf of Ayal (ayalg@wix.com). Slack thread: https://wix.slack.com/archives/C08P5DKLJR5/p1786661971341869
|
| Scenario | Required | Winner | Cost (PR / prod) | Tokens (PR / prod) | Time (PR / prod) | Runs (PR / prod) |
|---|---|---|---|---|---|---|
| sites/create-headless-site | ❌ | - | $0.149 / $0.148 | 86.1K / 86.0K | 24.0s / 21.5s | PR / prod |
sites/create-headless-site
both sides failed assertions: LLM judge - no clear winner | pairwise judge: tie | efficiency (PR vs prod) - cost: $0.1494 vs $0.1482, tokens: 86,090 vs 85,976, time: 24.0s vs 21.5s
No winner: both runs failed the LLM judge.
Assertions (PR):
- ❌ Tool called with param
- ❌ LLM judge (0/10): The response failed to provide the correct headless provision API endpoint, request body, and OAuth client ID explanation, incorrectly claiming that headless sites cannot be created via REST API.
Assertions (prod):
- ❌ Tool called with param
- ❌ LLM judge (0/10): The agent failed to provide the correct API endpoint, request body, and OAuth client ID details, incorrectly claiming that Wix Headless sites cannot be created via REST API.
Compare result: Both responses are fundamentally flawed with identical LLM judge failures (0/10), making the same core error about Wix Headless site creation. Response A includes an incomplete "API Approach" section that still fails to provide the correct solution, while Response B focuses entirely on the CLI without attempting API documentation. Despite minor efficiency gains for Response B, neither response completed the task correctly, and this material failure dominates any other considerations.
What's missing
The "Create Headless Site" recipe's Existing Sites section says only:
with no mention of side effects — despite this being a destructive action on a live production site.
Confirmed by live reproduction
On an owned test site (published Wix Studio site, no custom domain — just its default
wixstudio.comsubdomain):ayalg5.wixstudio.com/...URL.POST /headless-business-setup/v1/headless-business/provisionwith{"existingMetasite":{},"synchronousSteps":["CONFIGURE_HEADLESS_APP"]}.https://h6s-<hash>-<user>.wix-site-host.comURL as canonical, and the original URL returns a live301redirect to it.apps-installer-service/v1/app-instance/uninstall) and republished the site (site-publisher/v1/site/publish) — the canonical URL stayed onwix-site-host.com. No self-service revert exists.This matches a live incident report where the same call broke custom-domain routing on a Partner's production site, requiring Wix support to restore.
Fix
Add an explicit warning under "Existing Sites" describing the side effect and the lack of a revert path, so an agent warns the user and gets confirmation before running this on a live site — rather than discovering it only after the user's production routing breaks.
Opened automatically by an AI agent on behalf of Ayal (ayalg@wix.com).
Slack thread: https://wix.slack.com/archives/C08P5DKLJR5/p1786661971341869