Found this by reproducing locally (installed a Go toolchain + helm earlier in this session; this time added Chromium anti-throttling flags and instrumented walkTo/pendingAction/keys onto window.__aeternalis to watch it live) rather than guessing from CI logs again: the "Target Harbinger" button sets pendingAction/walkTo directly, bypassing action() entirely -- so the give-up budget from the last commit, which only got initialized inside action(), read Date.now() against its initial value of 0 on the very first tick after clicking. That's always "expired" by billions of milliseconds, so it gave up on "boss" immediately, blacklisted it, and reselected the nearest sentinel mob instead -- explaining every "boss out of reach" / zero-progress boss failure we've chased across the last several rounds. Confirmed via a throwaway diagnostic test logging position/target every second: the character walked calmly away from the boss it started standing on top of, chasing first one sentinel then another. Fixed the immediate bug (also set the budget's clock in the button's handler), then found a second one the same repro immediately exposed: attack against a live target is *mostly* cooldown rejections between the hits that land, so "no progress since the initial click" was still wrong -- it gave up mid-fight after ~10 successful hits during a lull. Replaced the give-up condition with an actual progress signal (target HP for attack, held-item count for gather/loot); it now only gives up once that has genuinely stopped moving, confirmed via the same diagnostic: 10 clean hits (1200 -> 1020 HP) holding position, matching the server's own attack cooldown. Also added the standard Chromium flags (--disable-background-timer-throttling etc.) to the test browser launch: the CI logs' 2-11s gaps between retries (instead of the intended ~0.3s) are the classic signature of requestAnimationFrame throttling down to ~1Hz for a backgrounded/occluded headless tab, which independently made every frame-driven client action crawl. Left walkTo/pendingAction/keys exposed on window.__aeternalis since they were useful for this and will be again. Verified: tsc/build clean, and three full local e2e runs (7/7 each) all show the boss test landing clean periodic hits via "attack cooldown" rejections between them, never wandering to a mob. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
21 lines
1.3 KiB
TypeScript
21 lines
1.3 KiB
TypeScript
import { defineConfig } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './tests', timeout: 45000, workers: 1, fullyParallel: false,
|
|
use: { baseURL: 'http://127.0.0.1:18089', browserName: 'chromium', channel: process.env.PLAYWRIGHT_CHANNEL || undefined, headless: true, screenshot: 'only-on-failure', trace: 'retain-on-failure', launchOptions: { args: [
|
|
'--use-angle=swiftshader', '--enable-unsafe-swiftshader',
|
|
// The CI runner's headless page was getting treated as backgrounded/occluded,
|
|
// which throttles requestAnimationFrame to ~1Hz or worse -- turning every
|
|
// frame-driven client action (movement steering, gather/attack retries) into a
|
|
// multi-second-per-tick crawl and blowing well past assertion timeouts even
|
|
// though the server side was fine. These are the standard flags to keep a
|
|
// headless/automated tab running at full rAF rate regardless of visibility.
|
|
'--disable-background-timer-throttling', '--disable-backgrounding-occluded-windows', '--disable-renderer-backgrounding',
|
|
] } },
|
|
webServer: {
|
|
command: 'node tools/dev-server.mjs', url: 'http://127.0.0.1:18089/readyz',
|
|
timeout: 180000, reuseExistingServer: false,
|
|
env: { PORT: '18089', E2E: 'true', WORLD_ID: 'e2e', DEV_SEASON_SECONDS: '3600', DEV_ADMIN: 'true' },
|
|
},
|
|
});
|