Skip to content

Commit ca4e739

Browse files
test(producer): add a temporary diagnostic for a CI-only rootBodyMismatch failure
Not a real fix. The rootBodyMismatch test group fails deterministically in CI (confirmed on two runs of the same head) but will not reproduce locally by any method tried, including an isolated file run, the exact combined producer:test:unit command, a worker-count-constrained run, and a fresh clone with a clean install and build matching CI's own steps. This dumps the intermediate regex-match state for the simplest failing fixture to stderr so the next CI run's log says what actually differs. To be removed once that answer lands. Co-Authored-By: Miguel Ángel <[email protected]>
1 parent e339e2d commit ca4e739

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

‎packages/producer/src/services/renderOrchestrator.test.ts‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2325,6 +2325,29 @@ describe("shouldPreferSingleWorkerDrawElement (DE priority inversion)", () => {
23252325
);
23262326
}
23272327

2328+
// TEMPORARY diagnostic for a CI-only failure that will not reproduce locally.
2329+
// Remove once the CI log gives us enough to fix or revert.
2330+
it("TEMP diagnostic: dumps intermediate regex state for the exact-match fixture", async () => {
2331+
const { HTML_BODY_CSS_WIDTH_FIRST_RE, HTML_BODY_CSS_HEIGHT_FIRST_RE } =
2332+
await import("@hyperframes/parsers");
2333+
const rootRe = /<[a-zA-Z][-a-zA-Z0-9]*\b[^>]*\bdata-composition-id=["'][^"']*["'][^>]*>/i;
2334+
const input = html(1080, 1920, "html, body { width: 1080px; height: 1920px; }");
2335+
const rootTag = input.match(rootRe)?.[0];
2336+
console.error(
2337+
JSON.stringify({
2338+
input,
2339+
rootTag,
2340+
dataWidthMatch: rootTag?.match(/\bdata-width=["'](\d+)["']/i)?.[1],
2341+
dataHeightMatch: rootTag?.match(/\bdata-height=["'](\d+)["']/i)?.[1],
2342+
widthFirstMatch: input.match(HTML_BODY_CSS_WIDTH_FIRST_RE),
2343+
heightFirstMatch: input.match(HTML_BODY_CSS_HEIGHT_FIRST_RE),
2344+
widthFirstReSource: HTML_BODY_CSS_WIDTH_FIRST_RE.source,
2345+
widthFirstReFlags: HTML_BODY_CSS_WIDTH_FIRST_RE.flags,
2346+
}),
2347+
);
2348+
expect(true).toBe(true);
2349+
});
2350+
23282351
it("reports no mismatch and bucket 0 when the scaffold's html/body CSS matches the root exactly", () => {
23292352
const scan = scanElementTags(
23302353
html(1080, 1920, "html, body { width: 1080px; height: 1920px; }"),

0 commit comments

Comments
 (0)