Uh oh!
There was an error while loading. Please reload this page.
test(e2e-type-check): bring the four root playwright configs into tsconfig.e2e.json - #5948
Merged
Merged
Conversation
…onfig.e2e.json The four `playwright*.config.ts` files sit beside `tsconfig.e2e.json` rather than under `e2e/`, so its `e2e/**` glob did not reach them and no other tsc program did either — the objectui#4471 gap one directory up. Widen the include to `["e2e/**/*.ts", "playwright*.config.ts"]` (zero errors: they compile clean against this exact option set) and extend the on-disk coverage sweep to discover the root configs rather than list them, plus a probe that asks the real config whether it would resolve a fifth config nobody has written yet. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQ3NihCHE9LUtHoGxo6A9f
This was referenced Aug 24, 2026
os-warren
marked this pull request as ready for review
August 24, 2026 04:18
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#4477
The four root
playwright*.config.tsfiles sit besidetsconfig.e2e.jsonrather than undere2e/, so itse2e/**/*.tsglob did not reach them — and neither did the roottsconfig.json(packages/examples/apps),tsconfig.scripts.json, ortsconfig.vitest-setup.json.turbo run type-checkwalks package.jsonscripts, and the repo root is not a workspace package. So the files that decide which specs run, where they run, and whatwebServercommand builds the app under test were read by no compiler.What changed
tsconfig.e2e.json—"include": ["e2e/**/*.ts", "playwright*.config.ts"]. The program root set goes from 30 files to 34.tsconfig.e2e.jsonheader — the paragraph declaring the four configs "NOT covered here, deliberately … filed as objectui#4477 instead" became false the moment this lands, so it is replaced by what is now true, with the re-measurement recorded.scripts/__tests__/e2e-type-check.test.ts— the on-disk coverage sweep gains its root-config half (+2 tests, 12 → 14).The four configs themselves are untouched: nothing surfaced in them to fix.
Re-measurement: still zero errors, twelve days later
The card measured
exit=0against this exact option set on 2026-08-12. Re-measured on the widened config at014b3e0:That 34 is also the parse-failure canary: a tsconfig that fails to parse does not fail loudly, it falls back to compiling the entire repository. Comments in this file stay
//for the same reason.Zero errors is the point rather than a disappointment. What was missing was never a fix, it was the gate: Playwright transpiles a config rather than checking it, so a
defineConfigoption that stops existing — or is misspelled intoundefined— is read as intent and surfaces only as a confusing runtime failure in thee2ejob.The sweep asserts by glob, never by a list of four names
Two tests, and the second is the load-bearing one:
resolves every root playwright*.config.ts on disk, with none left out— discovers the root configs withreaddirSync+/^playwright.*\.config\.ts$/(a faithful translation of the tsconfig glob:*does not cross a path separator, so the walk must not descend either), then set-differences them against the program TypeScript itself resolves. Non-vacuity floor first, for the same reason thee2e/sweep carries one.would resolve a FIFTH root config that nobody has written yet— copies the realtsconfig.e2e.jsoninto a throwaway tree containingplaywright.not-yet-written.config.tsand asks whether the program resolves it. A throwaway tree rather than the repo root, because a transient.tsat the real root is visible to every other guard that enumerates it.Test 1 alone would be satisfied by an
includethat names today's four files, and then the next config to land would sit outside every program again — the exact defect. Reverse-verified, both directions, at014b3e0:["e2e/**/*.ts"]Each mutation was confirmed on disk by grep before the run, and reverted through a
trap … EXIT INT TERM.Gate results, each by name, at
014b3e0pnpm type-check:e2eexit=0, no diagnostics; program root set 34 filesnpx vitest run scripts/__tests__/e2e-type-check.test.ts(repo root)Test Files 1 passed (1)·Tests 14 passed (14)npx vitest run scripts/__tests__(repo root, full meta-gate suite)Test Files 62 passed (62)·Tests 1664 passed (1664)pnpm type-check:scriptsexit=0— this test file is in that programpnpm lint:rootexit=0—26 problems (0 errors, 26 warnings), all pre-existing, none in the changed filesnode scripts/check-type-check-coverage.mjsexit=0—45/46 via type-check·41/41 packages compile their testsnode scripts/check-changeset-presence.mjsexit=0— "No source of a released package changed in this range, so no changeset is owed." No changeset added, per that verdictgrep -naPover both changed files)Full
pnpm type-checkwas not run locally: it isturbo run type-checkwithdependsOn: ["^build"], i.e. a whole-repo build. CI runs it. What was verified instead is that it really reaches this config — below.The gate actually runs in CI, verified rather than assumed
turbo run type-check --dry=jsonat this commit resolves an 83-task graph containing//#type-check:e2e, commandtsc -p tsconfig.e2e.json,cache.local=false/cache.remote=false, with every package'stype-checkas a dependent.ci.yml's existingRun type-checkstep runspnpm type-check. So the widened include is covered with no workflow change, which is the shape objectui#4456 introduced for//#lint:root.Premises checked, not inherited
@playwright/test, and the existingimports no workspace package, so it needs no buildassertion now covers them automatically (it iterates the program'sfileNames). No@object-ui/*import was dragged in, so//#type-check:e2estill needs no^build.scripts/check-doc-snippet-types.mjs,content/docs/**and the rootvitest.setup*files are untouched.Generated by Claude Code
Generated by Claude Code