Repository navigation
test(evals): make evals typecheck green — bundler resolution, evals-only diagnostics, fix real spec/testkit drift (split of #4828, no CI change) - #4899
Conversation
…iagnostics `pnpm --dir evals typecheck` was red on clean dev with 399 errors, 322 of them in apps/, ee/ and packages/ sources that specs and worlds pull in transitively: den-db is written for bundler resolution (extensionless re-exports), email templates need jsx, and apps/server enums/namespaces reject evals' erasable syntax flags. Those projects compile themselves with their own tsconfigs. Adopt module: preserve + moduleResolution: bundler (the resolution vitest actually uses, and what tsconfig.primitives.json already does), lib es2024 for Promise.withResolvers, customConditions development so @openwork/sdk resolves to source instead of an unbuilt dist/, and the @/ alias for apps/app imports. Then report only diagnostics for files under evals/ or explicitly included, the same way check:browser already scopes its claim. Nothing inside evals/ is silenced: the remaining 43 errors are real spec-vs-testkit drift.
The locator already matched [role="combobox"] and [role="listbox"] candidates
and resolved a <select> to combobox, but TargetRole never listed them, so
desktop-policy-restricted-mode's { role: "combobox" } targets failed to type.
connector-catalog asserts notSee({ role: "alert" }) against the catalog's
<p role="alert"> error line; alert was neither in the type nor in the candidate
selector, so that absence claim could never observe an alert. Add all three to
the type and alert to the candidates so the claim is real.
seed.desktop({ den }) always yields an App (signed in against that Den, with a
workspaceId), but the single signature returned App | DesktopHandle, so every
world.member.workspaceId read failed to type. Add the den overload to the Seed
contract and its SeedChannel implementation.
Annotate the combobox target as Target so its role literal is not widened to
string, and test the rejection regex against probe.text() instead of passing a
RegExp to probe.has(): the RegExp was serialized to {} on the way into the
browser, so the fallback branch for a rejected unadvertised call always
returned false.
…l-key-upsert
The default value narrowed auth to { "x-api-key": string }, rejecting the
reader-session and If-Match header sets the spec already passes at runtime.
…nnector-parity createPlugin and desktopReadiness are function declarations, so the if-throw narrowing on marketplace and plugin does not reach them. Read the ids once after the guards and use those.
The eventually probe returned string | undefined, so the settled value could not be recorded as assertion evidence. An absent #product now reads as "", which the until predicate still rejects.
…er-hot-inject server is a let that is cleared in cleanup, so its narrowing does not reach the eventually probe closure. Capture the started server once and drop the optional chaining that made baseline possibly undefined.
…y-thread The background world is built on builtinBrowserWorld, which never exposed readBrowserState; the same read is probe.browserState() and the test already holds probe.
…n connection-action-mcp-app typeof checks narrow unknown to object, not Record<string, unknown>; use the world's type guard the spec already imports from.
…arch-intent typeof checks narrow unknown to object, not Record<string, unknown>; add the usual isRecord guard and derive record() from it.
EventuallyOptions takes within, not timeoutMs; the unknown key left the deadline NaN, so the route wait never timed out.
…per in remote-session-first-use Function declarations do not see the if-throw narrowing, so orgId reached queryDenDatabase as unknown.
enterprise-tls-chain-repair and worlds/infra.ts import apps/desktop/electron modules that ship as .mjs; without allowJs they were implicit any (TS7016). tsconfig.primitives.json already enables allowJs for the same reason.
A getter whose body only throws infers void; annotate the guardedDen fixture getters with the DenRef, DenSession and MockMcpHandle types the Den contract expects.
…n litellm.test Symbol.asyncDispose returns PromiseLike<void>, which assert.rejects does not accept directly; await it inside an async block.
pnpm --dir evals typecheck is green on this branch; run it as its own step so a spec that drifts from the testkit API fails by name instead of only at runtime.
…s list Since #4693 the Connectors page shows configured connections as an icon strip and the connection rows (Connect, more menu, Test tools) live at /dashboard/mcp-connections/configured, so tool-tester-page timed out on its first claim on clean dev. Start the admin browser where the rows are.
Conflicts: - evals/packages/cdp/src/input.ts: TargetRole is the union of both sides (dev added alert; this branch added combobox, listbox, alert). - evals/specs/browser-tabs-owned-by-thread.e2e.test.ts: take dev's suspend control assertions after release_tab; dev already reads browser state through probe.browserState(), which subsumes this branch's fix. Post-merge typecheck (15 new errors from PRs merged since the base), fixed to the current testkit API without any/casts and without dropping a claim: - connector-search-intent: annotate the invoke table (TS7022 cycle through the flow-narrowed token). - den-connector-catalog uses role "heading": the locator now knows heading (h1-h6 implicit role, candidates only when that role is requested). - helpers/member-grant-fixture: typed grants accumulator (also fixes the downstream implicit any in scim-deprovisioned-sso-reprovision). - library-mcp-servers-from-config: browserScript callback instead of a raw code string with a non-existent args option. - new-task-draft-return: keep both draft comparisons as separate booleans. - route-session-list: RouteWorkspace literal gains the required preset. - worlds/saved-apps + labs mock-mcp: MockMcpTool.result declares the structuredContent and _meta the mock already serves verbatim. Signed-off-by: Guillaume Loret <[email protected]>
Signed-off-by: Guillaume Loret <[email protected]>
Split of #4828: this branch keeps the evals-only typecheck fixes (tsconfig, evals-scoped diagnostics, spec/testkit drift) and drops the 3-line `Typecheck evals` step in .github/workflows/ci-tests.yml so Warden can self-clear it. The CI step follows in a stacked PR that needs a human review. Signed-off-by: Guillaume Loret <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… step The typecheck fixes now live in #4899 (self-clearable by Warden). This branch keeps only the `Typecheck evals` step in .github/workflows/ci-tests.yml and the README sentence that says CI runs it; the tree is unchanged. Signed-off-by: Guillaume Loret <[email protected]>
Warden review summary — ClearNative findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (72055 ms), confidentiality-review (136293 ms), spec-provenance-review (189948 ms). Blockers
Advisories
Needs recheck
Observed review-thread metrics
Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority. |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (50e4b8dffc48cbecf922a352796547aadb5a204d). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Test evidence — an admin reaches the Tool Tester from Connectors and can test and govern an MCP tool — ✅ passedSHA 50e4b8d · sandbox ref 50e4b8d · engine v1 ⏳ 0/2 screenshots passed · 2 pending · 0 expectations passed · 0 failed · 8 pending [world] mock(mcp) · den(daytona) · orgConnection("Tool Tester Probe 1789155177504") · [seed] api GET /v1/me/orgs · [seed] api POST /v1/mcp/token · web(signed in) ⏳ PENDING — 1. The dedicated Tool Tester page shows a completed mock_echo run
⏳ PENDING — 2. The Tool Tester shows mock_echo disabled for the organization
Test run created 2026-09-11T19:31:04.218Z · Source: |
|
Daytona re-runs on head
Verdict for what this PR contains: Passed for the typecheck (455 → 0), |
…erge) Signed-off-by: Guillaume Loret <[email protected]>


Split of #4828 (2026-09-11): this PR carries the typecheck fixes only so Warden can self-clear it; #4828 is reduced to the 3-line
Typecheck evalsCI step (.github/workflows/ci-tests.yml), stacked on this branch, and waits for a human approving review.What this PR contains (all under
evals/, plus one rootpackage.jsonscript line)pnpm --dir evals typecheckwas red on cleandev(455 errors atfde910387today; 399 when #4828 was opened) and nothing ran it. Three independent causes, from #4828's RCA:moduleResolution: nodenext, butworlds/infra.tspulls in@openwork-ee/den-db(written forBundlerresolution) andpackages/email.tsxtemplates withoutjsx.erasableSyntaxOnly/verbatimModuleSyntax/ missingbun+vite/clienttypes applied toapps/serverandapps/appsources specs import transitively; those projects compile themselves.evals/.evals/tsconfig.jsonadoptsmodule: preserve+moduleResolution: bundler(what Vitest uses),lib: es2024,customConditions: ["development"],jsx,resolveJsonModule,allowJs, the@/*alias. Newevals/scripts/typecheck.mjsreports only diagnostics for files underevals/(or explicitly included). Nothing insideevals/is filtered.pnpm evals:typecheckdelegates to it.TargetRolegainscombobox | listbox | alert(theconnector-catalognotSee({ role: "alert" })claim was vacuous before);Seed.desktop({ den })overload returnsApp.any/casts):desktop-policy-restricted-mode,tool-tester-page(timeoutMs→within: the route wait deadline wasNaN),mcp-connection-external-key-upsert,plugin-mcp-connector-parity,remote-session-first-use,landing-pricing,opencode-v2-provider-hot-inject,browser-tabs-owned-by-thread,connection-action-mcp-app,connector-search-intent,testkit.test.ts,litellm.test.ts./dashboard/mcp-connections/configured(since Add working Gmail, Calendar, Drive, Sheets, and Microsoft 365 actions #4693 the rows the spec drives live there).evals/README.mddocuments the check and its evals-only scope.Full per-spec table, Daytona controls, and the "noticed, not touched" list are in #4828's body.
Not in this PR
The
Typecheck evalsstep inci-tests.yml(regression guard). It stays in #4828, now stacked on this branch, because Warden never self-clears a PR touching.github/(warden-clearance.yml:100-107). Until it lands, runpnpm evals:typecheckbefore pushing.Verification (head
50e4b8dff, local lane; this PR has no product surface of its own)pnpm evals:typecheckType-checked 406 evals source files: no errors.exit 0 — control on cleanorigin/dev @ fde910387: 455 errors, exit 2pnpm --dir evals check:browserinference-gateway-transport-security.test.ts:275, capture ofcount, introduced by #4358 ondev, file identical todev) — control on cleandev: 6 findings including that one; the other 5 are fixed herenode --test packages/cdp/test/*.test.ts packages/testkit/test/testkit.test.ts packages/env/test/litellm.test.ts(evals)git diff origin/dev...HEAD -- .githubDaytona E2E re-runs on this head for the two specs whose runtime behaviour changed (
connector-catalogvia thealertlocator candidate,tool-tester-pagevia the bounded route wait and the world route) are published in the sticky comment below when complete.