Skip to content

The agent that grows with you

fix(evals): desktop eval probes find pm's Chromium through PLAYWRIGHT_BROWSERS_PATH, not the retired AGENT_BROWSER_EXECUTABLE_PATH

Tekniume82c354b280e
diff --git a/evals/desktop_bug_campaign/async-report-live.mjs b/evals/desktop_bug_campaign/async-report-live.mjs
index 25e6bd6fdb4..2d3bf896afc 100644
--- a/evals/desktop_bug_campaign/async-report-live.mjs
+++ b/evals/desktop_bug_campaign/async-report-live.mjs
@@ -4,7 +4,8 @@ import { execFileSync } from 'node:child_process'
const a=process.env.ASYNC_REPORT_ARTIFACT_DIR
if (!a) throw new Error('Set ASYNC_REPORT_ARTIFACT_DIR to an offline artifact directory')
const tag=process.argv[2]??'after'
-const browser=await chromium.launch({channel:'chromium',executablePath:process.env.AGENT_BROWSER_EXECUTABLE_PATH,headless:true,args:['--no-sandbox']})
+// pm's Chromium: PLAYWRIGHT_BROWSERS_PATH (from `hermes pm env`) is where channel 'chromium' finds it.
+const browser=await chromium.launch({channel:'chromium',headless:true,args:['--no-sandbox']})
const page=await browser.newPage({viewport:{width:1400,height:1000}})
const errors=[];page.on('pageerror',e=>errors.push(String(e)))
const producer=JSON.parse(fs.readFileSync(`${a}/producer.json`,'utf8'))
diff --git a/evals/desktop_bug_campaign/navigation-markdown-live.mjs b/evals/desktop_bug_campaign/navigation-markdown-live.mjs
index f3761257b0e..d038952540f 100644
--- a/evals/desktop_bug_campaign/navigation-markdown-live.mjs
+++ b/evals/desktop_bug_campaign/navigation-markdown-live.mjs
@@ -3,7 +3,8 @@ import fs from 'node:fs'
import { execFileSync } from 'node:child_process'
const artifact = process.env.NAVIGATION_ARTIFACT_DIR ?? '/home/teknium/.hermes/cache/desktop-bugs-74848ed3/navigation-markdown'
const tag = process.argv[2] ?? 'after'
-const browser = await chromium.launch({channel: 'chromium', executablePath: process.env.AGENT_BROWSER_EXECUTABLE_PATH, headless: true, args: ['--no-sandbox']})
+// pm's Chromium: PLAYWRIGHT_BROWSERS_PATH (from `hermes pm env`) is where channel 'chromium' finds it.
+const browser = await chromium.launch({channel: 'chromium', headless: true, args: ['--no-sandbox']})
const context = await browser.newContext({permissions: ['clipboard-read', 'clipboard-write']})
const page = await context.newPage()
const errors = []
diff --git a/evals/desktop_bug_campaign/thread-scroll/ownership-probe.mjs b/evals/desktop_bug_campaign/thread-scroll/ownership-probe.mjs
index 4618e8b651b..84a00c13287 100644
--- a/evals/desktop_bug_campaign/thread-scroll/ownership-probe.mjs
+++ b/evals/desktop_bug_campaign/thread-scroll/ownership-probe.mjs
@@ -3,7 +3,8 @@ import fs from 'node:fs';
import assert from 'node:assert/strict';
const out=process.env.THREAD_SCROLL_OUTPUT;
assert.ok(out);
-const browser=await chromium.launch({channel:'chromium',executablePath:process.env.AGENT_BROWSER_EXECUTABLE_PATH,headless:true,args:['--no-sandbox']});
+// pm's Chromium: PLAYWRIGHT_BROWSERS_PATH (from `hermes pm env`) is where channel 'chromium' finds it.
+const browser=await chromium.launch({channel:'chromium',headless:true,args:['--no-sandbox']});
const result={};
try {
const page=await browser.newPage({viewport:{width:1200,height:800}});
diff --git a/evals/desktop_bug_campaign/thread-scroll/probe.mjs b/evals/desktop_bug_campaign/thread-scroll/probe.mjs
index 87f2846b4f6..e4a8ceab687 100644
--- a/evals/desktop_bug_campaign/thread-scroll/probe.mjs
+++ b/evals/desktop_bug_campaign/thread-scroll/probe.mjs
@@ -5,7 +5,8 @@ const out=process.env.THREAD_SCROLL_OUTPUT;
assert.ok(out, 'Set THREAD_SCROLL_OUTPUT to the isolated artifact directory');
fs.mkdirSync(out,{recursive:true});
const url=process.env.THREAD_SCROLL_URL ?? 'http://127.0.0.1:18480/scroll-campaign-probe.html?thread';
-const browser=await chromium.launch({channel:'chromium',executablePath:process.env.AGENT_BROWSER_EXECUTABLE_PATH,headless:true,args:['--no-sandbox']});
+// pm's Chromium: PLAYWRIGHT_BROWSERS_PATH (from `hermes pm env`) is where channel 'chromium' finds it.
+const browser=await chromium.launch({channel:'chromium',headless:true,args:['--no-sandbox']});
try {
const page=await browser.newPage({viewport:{width:1200,height:800}});
const errors=[];page.on('pageerror',e=>errors.push(e.message));
diff --git a/evals/desktop_mcp_oauth/renderer_lifecycle.mjs b/evals/desktop_mcp_oauth/renderer_lifecycle.mjs
index 23baf63914a..178c7cec032 100644
--- a/evals/desktop_mcp_oauth/renderer_lifecycle.mjs
+++ b/evals/desktop_mcp_oauth/renderer_lifecycle.mjs
@@ -89,9 +89,9 @@ const server = http.createServer(async (req, res) => {
)
})
await new Promise(r => server.listen(0, '127.0.0.1', r))
+// pm's Chromium: PLAYWRIGHT_BROWSERS_PATH (from `hermes pm env`) is where channel 'chromium' finds it.
const browser = await chromium.launch({
channel: 'chromium',
- executablePath: process.env.AGENT_BROWSER_EXECUTABLE_PATH,
headless: true,
args: ['--no-sandbox'],
...(process.env.CHROMIUM_EXECUTABLE ? { executablePath: process.env.CHROMIUM_EXECUTABLE } : {})