You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/09/02 06:22:22 UTC
Re: [PR] ci: cut single-job validation time by 40% [maka]
Astro-Han commented on code in PR #4523:
URL: https://github.com/apache/maka/pull/4523#discussion_r3911303763
##########
apps/desktop/e2e/fixtures.ts:
##########
@@ -487,7 +487,49 @@ async function withE2eWindow(
}
}
-export const test = base.extend<{
+interface PromptRailWorker {
+ app: ElectronApplication;
+ page: Page;
+ pristine: boolean;
+ viewport: { width: number; height: number };
+}
+
+async function setPromptRailWindowVisible(
+ worker: PromptRailWorker,
+ visible: boolean,
+): Promise<void> {
+ await worker.app.evaluate(({ BrowserWindow }, shouldShow) => {
+ const window = BrowserWindow.getAllWindows()[0];
+ if (!window) throw new Error('the prompt-rail BrowserWindow is missing');
+ if (shouldShow) window.show();
+ else window.hide();
+ }, visible);
+}
+
+async function resetPromptRailWindow(worker: PromptRailWorker): Promise<void> {
+ if (worker.pristine) {
Review Comment:
This short-circuit means the first prompt-rail test on each worker starts from a never-reloaded window at the original viewport, while every later one starts from release + storage clear + `setViewportSize` + reload. With `fullyParallel` and four workers, which test is "first" changes from run to run, and `prompt-rail.spec.ts` is all geometry with `retries: 0`. Dropping the `pristine` branch so the first test takes the full reset costs one reload per worker and removes the whole class.
##########
scripts/audit-alignment.mjs:
##########
@@ -68,6 +68,9 @@ const FIXTURES = [
// fixture) still proceeds on the old CI-gate budget.
const SETTLE_MS = Number(process.env.AUDIT_SETTLE_MS ?? 2_500);
const QUIET_MS = Number(process.env.AUDIT_QUIET_MS ?? 500);
+// Fixtures own separate Electron user-data roots and never synthesize focus or
+// pointer input, so they can fill the four hosted-runner cores safely.
+const CONCURRENCY = 4;
Review Comment:
With four Electron apps on four vCPUs, "no DOM mutation for 500 ms" also matches a renderer that was simply preempted for 500 ms, and then `EXPR` measures a half-mounted layout and the script fails with real-looking offsets. Serial runs never hit this. Scale `QUIET_MS` by the concurrency, or pass a non-zero `settleMs` as a floor.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org