From 92395f6773756214fa191282481ca9bc91c81c6b Mon Sep 17 00:00:00 2001 From: MelekTaus Date: Sun, 4 Oct 2026 00:39:59 +0200 Subject: [PATCH] Find the render layer log pair in e2e 63c3 instead of the tail (#305) The suite went red three times in a row (tasks 488, 491, 492) on one check only: 63c3 read `named: ["",""]` while the picture half passed. Alone the module was green. In the full run objects left by earlier modules are still in the scene, and their behaviors log two empty lines after the OnStart of the check. `log.slice(-2)` took those. - The check now searches the log for the pair "UI", "1". Both lines come from one exec chain, so they stand next to each other. - Without the pair it shows the last 6 lines for diagnosis. - Not found out: which earlier module writes the empty lines. Tests: - e2e 63 on melektaus-atx with a temporary behavior that logs two empty lines after the switch: ALL PASSED, 13 checks. - The same with the old `slice(-2)`: 1 FAILED, `named: ["",""]`, the picture from CI. The disturbing behavior is removed again. Co-Authored-By: Claude Opus 5.5 --- tools/e2e/63-render-layers.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/e2e/63-render-layers.mjs b/tools/e2e/63-render-layers.mjs index d249a7bb..24477932 100644 --- a/tools/e2e/63-render-layers.mjs +++ b/tools/e2e/63-render-layers.mjs @@ -222,7 +222,11 @@ export async function renderLayers(t) { await play(); await sleep(400); const switched = await picture(); - const named = (await json('__gm.world()'))?.log.slice(-2) ?? []; + // Searched, not taken from the end: in the full suite behaviors left by earlier modules log + // after this OnStart. Its two lines come from one exec chain, so they stand together. + const log = (await json('__gm.world()'))?.log ?? []; + const at = log.findIndex((line, i) => line === 'UI' && log[i + 1] === '1'); + const named = at < 0 ? log.slice(-6) : log.slice(at, at + 2); await stop(); await mutate(` const p = __gm.state.project;