Skip to content

fix(capture): derive device-profile documents from their own server pair - #2169

Merged
chubes4 merged 3 commits into
mainfrom
fix/issue-2152-data-liberation-agent
Nov 22, 2026
Merged

chubes4 merged 3 commits into
mainfrom
fix/issue-2152-data-liberation-agent

Conversation

@chubes4

@chubes4 chubes4 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Wix serves a phone or tablet identity its own server document (the mobile site). A member's phone document was derived from the representative's phone capture against the desktop server pair, so anchors inside content-wrapper had no counterpart and every member failed slot_anchor_unmapped. When a profile's user agent receives a server document that compareServerHtml classifies as different, that profile now derives from its own server pair, fetched with the capture's user agent. Runtime media come from a light render as that profile (#2151's hook). The desktop pair still decides cluster identity. Nothing is loosened: a profile document that can't be fetched or derived escalates the member. Rebased onto main (2026-11-21). #2151 has merged. #2138 (runtime islands, canonicalizeHtml) is still open and is carried here as the first commit, because the cluster-key canonicalization calls it. If #2138 merges first, only the last two commits remain.

  • sourceDocument accepts a user agent. Per profile, the representative's server document is fetched with that profile's UA, and kept only when it differs from the desktop server HTML.
  • Members derive each such profile from (rep profile server, member profile server). Member profile documents are fetched once per UA, and an unavailable one records the member as unavailable.
  • TemplateClusterDeferral light renders accept a render profile (identity and viewport), so profile documents get that device's runtime media.
  • Tests: profile server pairs derive, and an unavailable profile escalates (template-cluster-escalation.test.ts, template-clusters.test.ts, Wix derived-media.test.ts).

How I found it

Type of change

  • New Wix API endpoint discovered
  • Better content type handling
  • Bug fix (something broke)
  • Performance improvement
  • New Wix feature support
  • Documentation

Tested against

  • Real Wix site (describe briefly, no personal info needed)
  • Scripts run without errors
  • Output looks correct

@chubes4

chubes4 commented Nov 21, 2026

Copy link
Copy Markdown
Contributor Author

Evidence from a real Wix site (eliteflooringservicestx.com: 125 routes, 37 templates, including a 44-post blog cluster). Command: node dist/cli.js <url> --route-limit all --time-budget 30m, run on the shared Lab machine.

build routes liberated derived blog cluster (t2)
main v0.40.4 37 / 125 0 cluster_verification_mismatch (images)
#2138 + #2151 + #2169 31 / 125 0 runtime_media_unmapped
+ #2151 2b24dcca92 (picture/blur/%XX media) 53 / 125 0 verified after the pass; member renders light render budget exhausted
+ #2183 (ranked verifier) — 0 verified in-pass, 21/44 deferred, but 18 deferred members lost (unavailable: aborted due to timeout) and the rest escalated (no render for the phone profile)
+ #2186 (linear derive) + #2169 32ecc474af (profile-aware deferral) 90 / 125 41 42/44 deferred in-pass (482 s), 41 derived, 3 escalated

What each fix did in the last two rows:

  • perf(template-clusters): observe slot runtime in linear time #2186: deriveMemberDocument dropped from 20–40 s of CPU per profile per member to about 1.5 s, with byte-identical output. Before, every in-pass derive blocked the event loop. That stalled the deferral and starved governed member fetches into timeouts.
  • 32ecc474af on fix(capture): derive device-profile documents from their own server pair #2169: the in-pass deferral only proved a member's desktop document. Post-capture derivation also derives the phone document, from Wix's mobile server pair plus a phone light render, and those renders started after the capture window had closed. A member the browser had already skipped was then lost. The deferral now gets each route's captured profiles and defers a member only after every profile document derives. Its profile renders are memoized for post-capture derivation.

Fidelity spot check. I compared 9 of the 41 derived posts against the live site. All 9 match on h1 (desktop and phone documents) and on exact paragraph text length.

Still open on this site:

  • t38 and t7 (blog tag and category archives, 28 members): slot_anchor_unmapped on a declared runtime island (pgi… ids).
  • t5 (4 posts): cluster_verification_mismatch (text, skeleton, headStyles).

AI disclosure: fixes, runs and analysis by Claude (Anthropic) via Pi/Roadie; Chris Huber directed the work.

…s derive

The in-pass deferral checked a member's desktop derivation only, but
post-capture derivation also derives each profile document, from the
profile's own server pair and a light render as that profile when the
source serves it a different document. Those renders then started after
the capture window and the deferred member, skipped by the browser pass,
was lost. The browser pass now hands the deferral each route's captured
profiles, and a member is deferred only after every profile document
derives, with its profile renders memoized for post-capture derivation.
@chubes4
chubes4 force-pushed the fix/issue-2152-data-liberation-agent branch from e9ecafd to 8bc9d95 Compare November 22, 2026 17:00
@chubes4
chubes4 merged commit 55e03b4 into main Nov 22, 2026
6 checks passed
@chubes4
chubes4 deleted the fix/issue-2152-data-liberation-agent branch November 22, 2026 18:06
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