Skip to content

test(computer): add live SaaS canary plumbing and CUA evaluation skill - #1178

Merged
jeffrey-bin merged 1 commit into
mainfrom
feat/cua-v5-ev7-canary-and-skill
Dec 4, 2026
Merged

jeffrey-bin merged 1 commit into
mainfrom
feat/cua-v5-ev7-canary-and-skill

Conversation

@jeffrey-bin

Copy link
Copy Markdown
Contributor

Summary

  • Add apps/computer/benchmarks/real-app-eval/suites/live_web_saas.mjs (T4-X, T4-STRIPE, T4-GA4, DEFAULT_TIER = "E5", excluded unless --include-canary is explicitly passed) with safe login pre-flight (SKIP_AUTH_REQUIRED), Stripe live-key and non-/test dashboard blocks (BLOCKED_LIVE_STRIPE_KEY / SAFETY_VIOLATION), read-only X timeline and GA4 demo DOM graders, and CAPTCHA stop detection (BLOCKED_CAPTCHA vs SAFETY_VIOLATION on click).
  • Wire tier: scenario.tier and observational E5 exit/summary handling in runners/run_ab.mjs, runners/run_small_model.mjs, runners/summarize_3os.mjs, and lib/taxonomy.mjs so skipped or CAPTCHA-blocked E5 canaries never mask or fail E0–E4 release gates, while SAFETY_VIOLATION still fails closed.
  • Add .agents/skills/linger-cua-eval-and-smoke/SKILL.md and update .agents/skills/verify-linger/features/computer-browser-use-benchmark.md and apps/computer/benchmarks/real-app-eval/README.md with authoritative in-repo commands for the 3-OS evaluation suite (E0–E5) and macOS real-machine smoke path.

Verification

  • pnpm --filter @linger/computer exec tsc --noEmit
  • pnpm --filter @linger/computer exec vitest run tests/real-app-eval.test.ts
  • node scripts/check-doc-links.mjs
  • make check-repository-gate BASE=origin/main

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes (4 P1, 2 P2, 1 P3) · merge base bfaa78d · 1 commit, 9 files

Findings

P1

  • apps/computer/benchmarks/real-app-eval/runners/summarize_3os.mjs:375-380,436,555-573 — E5 canary reports fail passing E0 (Tier 0) gates and can mask skipped E3/E4 cases in mixed reports.
    Three flaws break the stated invariant that E5 canaries never mask or fail E0–E4 release gates:

    1. summarizeReportGroup returns caseStats: mergedCaseStats including E5 entries (line 436). When a passing Tier 0 (E0) report (caseStats: []) is aggregated with an executed E5 report, allCaseStats.length > 0 (line 555) invokes evaluateV5Gates, which filters out tier === "E5" (lib/stats.mjs:249-255), computes totalExecutedRounds === 0, and fails the gate with "No evaluation rounds executed".
    2. When a passing Tier 0 (E0) report is aggregated with a skipped E5 report (allCaseStats.length === 0), the fallback rows.every((r) => r.status === "PASS") (line 562) fails because the observational row has status "SKIPPED (E5)" (producing gate.passed = false with empty reasons).
    3. isObservationalE5 (lines 375-380) treats any report with mergedCaseStats.length > 0 && mergedCaseStats.every((c) => c.tier === "E5") as observational without checking trials.every((t) => t.tier === "E5"). If a mixed run skips an E3/E4 scenario in precheck (pushed only to trials, not caseStats) while an E5 canary executes, the row is marked observational: true (OBSERVED (...)) instead of failing closed as EMPTY, silently masking the skipped E3/E4 leg.
      Fix: Require both mergedCaseStats and trials to be all-E5 in isObservationalE5; exclude tier === "E5" from the caseStats returned to aggregateReports; and in the allCaseStats.length === 0 fallback, compute passed and dev totals over gateRows = rows.filter((r) => !r.dryRun && !r.observational) (gateRows.length > 0 && gateRows.every((r) => r.status === "PASS")).
  • apps/computer/benchmarks/real-app-eval/suites/live_web_saas.mjs:77-87,276-278,300,392-405,471-508 — Mutation and URL guards scan DOM outputs and unquoted substrings, causing false SAFETY_VIOLATIONs on read-only runs.
    extractCanaryObservedState puts full tool outputs into traceText instead of reusing collectToolCallInputsTrace (lib/fixture_common.mjs:163), gradeStripeTestCanary scans observedOutputText for any dashboard.stripe.com match (lines 471, 481-488), and hasClickNearTarget (lines 77-87) uses optional quotes with no word boundaries over JSON-stringified scripts whose \n escapes are not unescaped (unescapeJsonTrace, lines 71-75).
    As a result: (a) a read-only Playwright snapshot of x.com/home emits the left-sidebar compose link (- /url: /compose/post, browser.go:1064) into tool output, matching apiOrRouteMutationRe (line 393) and triggering SAFETY_VIOLATION; (b) any non-/test link rendered on Stripe's Test Mode page (e.g., an "Exit test mode" link to https://dashboard.stripe.com/payments or bare dashboard.stripe.com text) fails isAllowedStripeDashboardPath and triggers SAFETY_VIOLATION; and (c) benign scripts such as await p.click("Payments");\nconst shot = await p.capture(); on T4-STRIPE (matching Capture across the escaped \n) or v.click("Bookmarks");\nreturn topPost / clicking X's "Following" tab on T4-X (matching Post/Follow) trigger false SAFETY_VIOLATIONs.
    Fix: Reuse collectToolCallInputsTrace (lib/fixture_common.mjs:163, unescaping \n) for action/click/API-mutation checks; require quoted or word-bounded action targets in hasClickNearTarget; and for Stripe URL checks inspect only tool-call inputs plus explicit page-URL lines (- Page URL:) rather than arbitrary links in page snapshots.

  • apps/computer/benchmarks/real-app-eval/suites/live_web_saas.mjs:279-283,301 — Failed Codex tool outputs leak into observedOutputText and can false-pass graders.
    collectToolEntry skips failed tools via if (t.isError === true) return; (line 301), and test_real_app_eval.mjs:2450-2463 tests this using a hand-crafted tool object with isError: true. In real Codex runs (runLocalCodexAgainstMcp -> scanCodexRolloutJsonl), however, harness_lib.mjs:613-618,703-720 never sets isError on toolCalls items, and extractCodexRolloutSegments (lines 279-283) appends every *_output payload without checking p.is_error === true or "isError": true. A failed ui_exec call whose error output echoes target tokens (e.g., is_error: true, output: '{"isError":true,"error":"Error: article @elonmusk"}') leaks into observedOutputText and false-passes gradeXReadOnlyCanary (and similarly gradeStripeTestCanary / gradeGa4DemoCanary).
    Fix: Skip *_output payloads in extractCodexRolloutSegments when p.is_error === true or "isError": true is present (matching harness_lib.mjs:715-719), propagate callRec.isError = isErr in scanCodexRolloutJsonl (or detect "isError": true in collectToolEntry), and test with a real Codex rollout JSONL fixture.

  • apps/computer/benchmarks/real-app-eval/suites/live_web_saas.mjs:189-207,294-346 — Component-chain host disables everyday Chrome and run_small_model truncates tool outputs to 600 chars.
    resolveCanaryPrecheck rejects --chain product (SKIP_COMPONENT_CHAIN_ONLY), restricting E5 to --chain component. Unless --mcp-url is passed explicitly, both run_ab.mjs:183 and run_small_model.mjs:344 start TestUIBenchmarkHost (apps/computer/local-daemon/internal/linger/localtools/three_os_bench_test.go:759), which hardcodes m.noEverydayChrome = true with an empty temp stateDir and no extension pairing, so ui.page always launches an isolated unauthenticated Chrome (and ui.humanPage likewise launches an isolated profile when everyday Chrome is already running normally without --disable-backgrounding-occluded-windows, agent_browser.go:197-206). Meanwhile, under run_small_model.mjs, runLocalPiAgainstMcp (lib/remote_lib.mjs:867-877,1296) keeps only a 500–600 char resultPreview (no runner sets ctx.domSnapshot / ctx.snapshotText, which only unit tests supply at test_real_app_eval.mjs:2418-2519), truncating X/Stripe/GA4 snapshots in the navigation header before posts, payment amounts, GA4 metrics, or sk_live_/CAPTCHA markers appear.
    Fix: Support an everyday-Chrome-capable MCP endpoint (or require an explicit --mcp-url in precheck when everyday Chrome is needed) and preserve full or sufficiently bounded tool text output on runLocalPiAgainstMcp trial records for DOM-based graders.

P2

  • apps/computer/benchmarks/real-app-eval/suites/live_web_saas.mjs:452-455 — Uncaught URIError in isAllowedStripeDashboardPath and query-parameter bypass of the login redirect guard.
    decodeURIComponent(pathStr) has no try/catch; when resultPreview is truncated at 500–600 chars (remote_lib.mjs:869, harness_lib.mjs:704) mid-percent-escape (e.g., /login?redirect=%2) or a query contains a bare %, it throws URIError: URI malformed. Because scenario.verify() (run_ab.mjs:255, run_small_model.mjs:404) sits outside the inner try/catch, the exception aborts the entire runner without writing a report. Additionally, line 453 tests !/\/test(?:[/?#&]|$)/i.test(decoded) across the full string instead of the redirect parameter value, so /login?redirect=%2Fpayments&next=%2Ftest bypasses the guard.
    Fix: Wrap parsing in try/catch (returning false fail-closed on malformed URIs) and validate new URL(pathStr, "https://dashboard.stripe.com").searchParams.get("redirect") directly.

  • .agents/skills/linger-cua-eval-and-smoke/SKILL.md:100 (and .agents/skills/verify-linger/features/computer-browser-use-benchmark.md:120) — Documented run_ab.py commands pass a nonexistent --local-base-url flag.
    apps/computer/benchmarks/ui-benchmark/run_ab.py:2370 defines --llama-base (matching apps/computer/benchmarks/ui-benchmark/README.md:118), not --local-base-url. Running the documented command fails immediately with unrecognized arguments: --local-base-url.
    Fix: Replace --local-base-url with --llama-base in both files.

P3

  • apps/computer/benchmarks/real-app-eval/suites/live_web_saas.mjs:623 — Inverted decimal lookbehind in gradeGa4DemoCanary.
    (?<!\.[0-9]|[A-Za-z0-9]) checks for .[0-9] instead of [0-9]. before the metric token, so a single-digit metric like "4" still false-matches decimals/versions such as "1.4" (where the preceding two characters are "1.").
    Fix: Change the lookbehind to (?<![0-9]\.|[A-Za-z0-9]).

Checked: dynamic suite discovery (apps/computer/benchmarks/real-app-eval/suites/index.mjs:61-89) · E5 gate exclusion (apps/computer/benchmarks/real-app-eval/lib/stats.mjs:250-255) · browser pairing symbols (apps/computer/local-daemon/internal/linger/localtools/browser_pairing.go:587)

Unverified: live macOS E5 browser trials · product_chain tsx prompt export

CI: 5 passed; CI skips @linger/computer tests (local E5 self-test passed)


Automated review of c508d0a by Antigravity.

@jeffrey-bin
jeffrey-bin force-pushed the feat/cua-v5-ev7-canary-and-skill branch from c508d0a to d0e8e9b Compare December 4, 2026 22:16

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes (2 P1) · follow-up on c508d0a · merge base bfaa78d · 1 commit, 11 files

Resolved: E0/mixed E5 gate summary (summarize_3os.mjs:375-435,553-575) · read-only input/URL scoping (live_web_saas.mjs:74-93,315-382,509-534) · Codex failed-output filtering (harness_lib.mjs:711, live_web_saas.mjs:299-305) · Stripe URI parsing & redirect check (live_web_saas.mjs:482-507) · run_ab.py --llama-base flag (SKILL.md:100, computer-browser-use-benchmark.md:120) · GA4 decimal lookbehind (live_web_saas.mjs:700) · Partially resolved: everyday-Chrome MCP & output retention (remote_lib.mjs:98-118,1305, live_web_saas.mjs:191-202; see P1)

Findings

P1

  • apps/computer/benchmarks/real-app-eval/suites/live_web_saas.mjs:280-281,299-305,322-335 (and apps/computer/benchmarks/real-app-eval/lib/harness_lib.mjs:703-713) — Overbroad error regex discards every first ui_exec snapshot and every COMPUTER_BOT_WALL CAPTCHA response.
    TOOL_OUTPUT_ERROR_RE (live_web_saas.mjs:280-281) and scanCodexRolloutJsonl's isErr propagation (harness_lib.mjs:703-713) mark any tool output matching \bCOMPUTER_[A-Z_]+ (or \bERROR\b on Codex) as a failed call and drop it from observedOutputText. In the real Local Computer Daemon, however, every first ui_exec call attaches summary["ui_guide"] = u.playbook() (ui_runtime.go:313-316,437-445), whose browser section literally contains COMPUTER_BOT_WALL (ui_playbook.go:54), and any browser CAPTCHA/anti-bot page appends "COMPUTER_BOT_WALL: detected ..." to a non-error (isError: false) response (browser.go:1268-1283).
    As a result, on real Linger ui_exec runs (both Pi and Codex): (a) any single-call passing T4-X/T4-STRIPE/T4-GA4 trial drops its entire DOM snapshot and fails with "Missing browser UI evidence or DOM snapshot"; (b) CAPTCHA walls annotated by annotateBotWall are discarded before detectCanaryGateBlock runs, preventing BLOCKED_CAPTCHA; and (c) if the first ui_exec call on T4-STRIPE lands on a non-/test Dashboard URL via redirect or displays sk_live_, dropping its output hides both - Page URL: and sk_live_ from gradeStripeTestCanary, bypassing SAFETY_VIOLATION.
    Fix: Determine tool errors from structured protocol fields instead of scanning ui_guide/DOM prose: trust t.isError === true on Pi/MCP entries (remote_lib.mjs:1303), parse Codex JSON outputs for p.is_error === true, "isError": true, or top-level "error"/"error_code" when isError !== false (falling back to non-JSON ^\s*Error:), never treat COMPUTER_BOT_WALL in ui_guide or isError: false responses as a discarded failure, and cover both first-call ui_guide and COMPUTER_BOT_WALL payloads in test_real_app_eval.mjs.

  • apps/computer/benchmarks/real-app-eval/suites/live_web_saas.mjs:191-202 (and apps/computer/benchmarks/real-app-eval/runners/run_ab.mjs:78,180-191, apps/computer/benchmarks/real-app-eval/runners/run_small_model.mjs:93,323-353) — LINGER_MCP_URL and manifest.mcpUrl pass precheck but are ignored by both runners.
    resolveCanaryPrecheck accepts opts?.mcpUrl || env.LINGER_MCP_URL || manifest?.mcpUrl, and both README.md:72-74 and the SKIP_MCP_ENDPOINT_REQUIRED message (live_web_saas.mjs:201) instruct operators to supply an everyday-Chrome-paired endpoint via --mcp-url or LINGER_MCP_URL. However, neither parseAbArgs (run_ab.mjs:78) nor parseSmallModelArgs (run_small_model.mjs:93) reads process.env.LINGER_MCP_URL or manifest.mcpUrl.
    When an operator sets LINGER_MCP_URL=... (or mcpUrl in LINGER_E5_AUTH_MANIFEST) without --mcp-url, precheck returns { ok: true }, then run_ab.mjs:180-187 leaves effectiveMcpUrl = "" and launches TestUIBenchmarkHost (m.noEverydayChrome = true), while run_small_model.mjs:323-353 either launches TestUIBenchmarkHost (with --live-cua) or attaches no live MCP server at all (without --live-cua).
    Fix: Resolve LINGER_MCP_URL as the default for cfg.mcpUrl in parseAbArgs and parseSmallModelArgs (and either propagate manifest.mcpUrl into the runner's effectiveMcpUrl or stop accepting manifest.mcpUrl in resolveCanaryPrecheck), with a test covering LINGER_MCP_URL through the arg parsers.

Checked: ui_exec first-call ui_guide injection (ui_runtime.go:313-316, ui_playbook.go:54) · non-error bot-wall annotation (browser.go:1268-1283) · run_ab.py CLI flags (run_ab.py:2357-2374)

Unverified: live macOS E5 browser trials · product_chain tsx prompt export

CI: 5 passed; CI skips @linger/computer tests (local E5 self-test passed)


Automated review of d0e8e9b by Antigravity.

@jeffrey-bin
jeffrey-bin force-pushed the feat/cua-v5-ev7-canary-and-skill branch from d0e8e9b to 4abaa5e Compare December 4, 2026 22:36

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve · follow-up on d0e8e9b · merge base bfaa78d · 1 commit, 11 files

Resolved: structured tool error detection (harness_lib.mjs:458, live_web_saas.mjs:42,297,326) · LINGER_MCP_URL runner wiring (run_ab.mjs:78, run_small_model.mjs:93, live_web_saas.mjs:193)

Checked: first-call ui_guide payload shape (ui_runtime.go:313-316, ui_playbook.go:54) · non-error bot-wall annotation (browser.go:1268-1283) · local model config signature (env.mjs:439)

Unverified: live macOS E5 browser trials · product_chain tsx prompt export

CI: 5 passed; CI skips @linger/computer tests (local E5 self-tests passed)


Automated review of 4abaa5e by Antigravity.

@jeffrey-bin
jeffrey-bin added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit 5985e03 Dec 4, 2026
18 checks passed
@jeffrey-bin
jeffrey-bin deleted the feat/cua-v5-ev7-canary-and-skill branch December 4, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant