Repository navigation
Unskip the glossary advanced operation test - #32010
Conversation
✅ Playwright Results — workflow succeededValidated commit ✅ 72 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 41m 48s ⏱️ Max setup 3m 7s · max shard execution 8m 57s · max shard-job elapsed before upload 12m 59s · reporting 3s 🌐 158.91 requests/attempt · 1.55 app boots/UI scenario · 0.00% common-shard skew Optimization targets still in progress:
🟡 1 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Code Review ✅ ApprovedUnskips the glossary advanced operation test to re-enable test coverage. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
main unskipped the glossary advanced-operations test (#32010), which left its no-skipped-test suppression unused. The full lint failed with exit 2 on the stale entry, exactly as the ratchet intends; pruned and recorded the lower count. Total 1520 -> 1519. This is the exact-count check earning its keep: the baseline moved and the test refused to pass until the movement was written down.
… via ESLint + suppressions ratchet (open-metadata#31994) * chore(playwright): promote six zero-violation lint rules to error * chore(playwright): promote remaining lint rules to error behind suppressions ratchet * chore(playwright): stop Prettier from fighting the ESLint suppressions file * chore(playwright): scaffold local eslint plugin for custom rules Adds the CommonJS eslint-rules plugin skeleton (rules: {}) that later tasks register rules into, wires it into eslint.config.mjs under the om-playwright namespace, and adds a node --test based unit test target. Also adds an eslint.config.mjs block scoping the plugin's own .js files to CommonJS globals/no-require-imports:off, and switches the test:eslint-rules script to a glob instead of a bare directory path -- both needed because `node --test <dir>` does not recurse into an explicit directory argument on this repo's pinned Node (22.17.0), confirmed against the .nvmrc version, not just the locally active one. * feat(playwright): add clickAndWaitFor helper for race-free response waits * feat(playwright): add require-response-listener-before-action rule and fix 16 races Registers a listener promise before the triggering action instead of awaiting waitForResponse() after it, which races an already-fired response and hangs until timeout. Zero suppressions — all 16 pre-existing violations fixed by hand. * fix(playwright): register dataAsset listener before Explore navigation, not as a weaker loader wait Review found the explore.ts fix from the prior commit substituted a strictly weaker wait (toHaveCount(0) is a no-op if the loader hasn't mounted yet) with an inaccurate comment. selectDataAssetFilter has exactly one call site, so the listener moves to EntitySummaryPanel.spec.ts's single beforeEach, before the sidebarClick that actually triggers the query. * feat(playwright): add no-blanket-test-slow rule * fix(playwright): catch blanket test.slow() in beforeEach and aliased test objects - beforeEach runs on the triggering test's own timeout slot (verified against playwright@1.57.0 worker/workerMain.js), so test.slow() there has the same blast radius as a describe-scope call; the previous heuristic treated it as legal. beforeAll/afterAll/afterEach each get their own slot and correctly remain legal. - Widen detection to aliased test objects (e.g. base.slow() inside base.describe(), where base = test.extend(...)) via a dynamic test-object-identifier signal, while excluding variables bound directly to the describe function itself (const d = test.describe;) from being misclassified as per-test callbacks. - Add RuleTester cases pinning beforeEach, beforeAll, afterEach, test.step, aliased test objects, and the describe-alias edge case. - Re-snapshot: 89 violations (79 + 9 beforeEach + 1 aliased describe), suppressions total 94 (unchanged, 4 promoted rules) + 89 = 183. * feat(playwright): add require-assertion-per-test rule Flags e2e tests whose body only performs page/locator interactions (clicks, fills, navigation) with no expect() reference anywhere and no call to anything beyond the test's own Playwright fixtures - i.e. tests that are provably assertion-free. The rule intentionally does not flag delegation to a helper or page-object method (entity.descriptionUpdate(page), addUser(...), verifyAuthenticated(...)), since those may assert internally and proving otherwise needs interprocedural analysis this rule doesn't do. An earlier text-scan-only design flagged 474 tests, but hand-verifying samples showed most delegate to helpers that do assert - a large, confirmed false-positive rate. Scoping the rule to only what it can prove (no expect text + every call rooted at a page fixture) drops that to a single, high-confidence violation: playwright/e2e/nightly/ServiceIngestion.spec.ts's "Default Pagination size should be 15" test, which waits on two network patterns and clicks once but never asserts a status, body, or visible count. Registered as om-playwright/require-assertion-per-test, scoped to playwright/e2e/**/*.spec.{js,jsx,ts,tsx} only (utils/support files contain no tests). Snapshot suppresses the one existing violation via --suppress-rule; the four already-promoted playwright/* suppressions (94) and om-playwright/no-blanket-test-slow (89) are untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(playwright): make test.slow/setTimeout/step transparent in require-assertion-per-test test.slow(true), test.setTimeout(...), and test.step(...) were being treated as ordinary non-page calls, so any test opening with one of them (89 suppressed sites use test.slow()) was silently exempted no matter how purely it clicked afterward - none of them can assert. A call rooted at the `test` identifier is now filtered out before the "every remaining call is page/locator-only" check, instead of counting either way. test.step's own nested calls are unaffected: they're separate CallExpression nodes checked on their own merits, since the callback is inline and fully visible, not a delegated helper. Corpus impact: still exactly 1 violation, same site (ServiceIngestion.spec.ts:189) - no re-snapshot needed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(playwright): add scoped locator helpers and no-positional-locator rule * fix(playwright): close positional-locator receiver-type evasion, fix row helper defaults Widen no-positional-locator to flag Identifier/MemberExpression receivers (hoisted-variable and property-stored locators), not just inline call-chain tails - 185 previously-missed sites, closing the cheapest evasion path (hoist into a variable). Discriminate genuine Playwright .first()/.last()/ .nth() calls from same-named non-Locator calls (e.g. lodash) by argument arity instead. Fix scopedLocators helpers: getRowByName defaulted to a CSS attribute selector that never matches implicit ARIA roles (Ant Design <tr> rows), and expectRowFor never forwarded rowSelector. Default to page.getByRole('row') and thread rowSelector through both helpers; document the hasText substring-collision failure mode. Re-snapshot: no-positional-locator suppressions 1068 -> 1253 via --suppress-rule (never --suppress-all/--prune-suppressions); the three pre-existing suppression groups are byte-identical. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(playwright): add heuristic guardrail rules with justified-disable escape hatch Add no-unscoped-count-assertion and require-unique-entity-name (heuristic, expect false positives) plus justified-rule-disable, the escape hatch that lets a developer document why a heuristic misfire is being suppressed. require-unique-entity-name is implemented, tested, and registered in the plugin but deliberately not enabled: a raw pass found 1625 violations, and a 25-sample hand review found 0/25 true positives (matches were almost entirely Playwright's own getByRole(..., { name }) option and static config keys, not entity creation). Snapshotting that baseline would ratchet near-total noise; left for a follow-up to narrow the heuristic. The other two rules were sanity-checked, found to carry real signal, and are snapshotted normally (+73, +9 violations; suppressions total 1437 -> 1519). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(playwright): remove no-unscoped-count-assertion and require-unique-entity-name Both were reviewed against their full/near-full population, not just the sanity-check samples from the initial implementation: - require-unique-entity-name: confirmed ~3/1625 (0.18%) true-positive rate. The heuristic can't distinguish assigning a name to a new entity from using one to look an existing element up — 59% of hits are Playwright's own getByRole/getByLabel(role, { name }) accessible-name option, where adding uuid() would break the locator. 43/51 files under playwright/support/entity/ already call uuid() internally, so uniqueness is solved one layer down from where this rule looked. Never enabled, so no suppressions to remove. - no-unscoped-count-assertion: full classification of all 73 sites found ~77% false positives (17 true / 56 false), dominated by the rule flagging locators already scoped through a variable per its own recommended fix (const c = loc.filter({ hasText }); expect(c)...) — failing code for following its own advice. Suppressions pruned via a full-corpus --prune-suppressions run; total 1519 -> 1446. justified-rule-disable is untouched (its count of 9 was independently re-verified) and now registers as the fifth rule in the plugin. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(playwright): generate rule table from eslint config and consolidate guidance Docs previously listed a hand-written, stale error/warn split for the Playwright ESLint rules that no longer matched eslint.config.mjs (every rule now runs at error). Generate the rule table from the config instead, so the docs can't drift from what CI actually enforces, and consolidate the overlapping rules file and skills onto the generated table and the real lint:playwright:suppressions gate. * ci(playwright): enforce guardrail rules and suppressions ratchet Adds a corpus meta-test that fails if eslint-suppressions.json's total grows (ceiling 1446, the current baseline), and wires a full-corpus CI step running the rule unit tests, the suppressions-aware lint with pruning, and the generated rule-table freshness check. The step is unconditional rather than changed-files-scoped because --prune-suppressions against a partial file set would delete valid suppressions for files the PR didn't touch. Until this lands, all 18 Playwright guardrail rules only ran locally. Also updates skills/playwright-validation/SKILL.md's stale three-rule/warn-tier description to reflect that every rule is now error-level with no warn tier. * fix(ci): restore pruned suppressions file and harden pipefail in playwright guardrail step --prune-suppressions writes eslint-suppressions.json in place when it drops a stale entry, and the step never restored it — a later step in the same job (lint_core_components) runs a repo-wide git status check that could then misattribute this failure to itself. Restore the file unconditionally on both the pass and fail paths. Also guard the failure-detail grep with `|| true`: under GitHub's default `bash -eo pipefail` shell, a grep with no matches exits non-zero and would abort the script before the GITHUB_OUTPUT writes, leaving the PR summary comment blank. * ci(playwright): aggregate flake data from existing reporter output Playwright already runs with retries: 1 and the JSON reporter is already enabled, so flaky/failed data is produced and discarded on every CI run. Add a small aggregator that turns results.json into a flake-report.json summary per shard, uploaded as an artifact. Purely additive: no new test runtime, no changes to any existing step or job outcome. * fix(playwright): close ratchet/bypass gaps and harden flake-report upload Four fixes from final branch review: - ui-checkstyle: run the non-pruning yarn lint:playwright:full so a fixed violation fails CI until its stale suppression is pruned and committed, instead of silently discarding the rewrite; drop the now-dead git checkout restore; update the failure-reason text accordingly. - justified-rule-disable rule + CI grep guard: a bare eslint-disable (no rule list) or a disable of the rule itself previously bypassed all 18 guardrail rules undetected; the rule now reports blanket disables and a CI-level grep guard catches the self-referential case the rule cannot see. - playwright-postgresql-e2e: add continue-on-error/overwrite/if-no-files-found to the flake-report upload so artifact-name collisions on job re-run don't fail an otherwise-passing 40-minute shard. - docs: point developer-facing lint instructions at yarn lint:playwright:suppressions to match the new CI command split. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * style(playwright): apply prettier formatting to guardrail source files CI's changed-files checkstyle runs prettier, which the guardrail work did not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * ci(playwright): fold guardrail checks into the existing playwright step CodeQL flagged the separate guardrail step as a high-severity cache-poisoning risk: it executes PR-authored code (the eslint config and the local rule plugin) in a pull_request_target job with a privileged checkout. The file already documents the convention - every `run:` executing PR code in this job is a poisonable step, so a separate step adds one more for no gain in isolation. Folding the guardrail commands into the existing playwright step removes the new alert without weakening the gate. The checks now run before --fix/--write so they judge what the contributor actually wrote, and the changed-files matcher is widened to eslint.config.mjs and eslint-suppressions.json so a config-only change still triggers the gate. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * chore(playwright): baseline the suppressions ratchet at 1520 `--suppress-all` over the current corpus (366 spec files, 618 linted) captures every existing violation per file/rule, so all 18 rules can run at `error` without fixing anything first. The notch is what an unlinted corpus accumulated, not a budget: no rule here has ever been enforced, so nothing has held the count down. corpus.test.js pins it and fails if the total rises. From here it only moves downward. * fix(ci): close the bypass-guard hole in the playwright guardrail grep The guard's second alternative used [^\\n]* to span the gap between 'eslint-disable' and the rule name. Inside a POSIX bracket expression a backslash is literal, so [^\\n] means 'not a backslash and not the letter n' — it cannot cross the 'n' in '-next-line'. The most common bypass form, // eslint-disable-next-line om-playwright/justified-rule-disable therefore slipped straight through the check meant to catch it, while the block form was caught. Use .* instead: grep is line-oriented, so the newline exclusion was redundant as well as wrong. * docs(playwright): document clickAndWaitFor's first-match semantics The helper resolves on the first response matching urlPattern and judges that one's status. When a single click produces several matching responses, a later healthy response cannot rescue an earlier failure — callers need to narrow the pattern rather than assume the helper picks the relevant one. * fix(playwright): scope the guardrail rules to TypeScript and enforce it The playwright rule globs were inherited as {js,jsx,ts,tsx}. Nothing in the corpus is JavaScript — all 245 baselined files are .ts — but the glob pulled in the new CommonJS plugin under eslint-rules/, applying test rules like no-positional-locator to the linter's own source. That is also why the CI bypass-guard grep had to be restricted to .ts/.tsx: the plugin's RuleTester fixtures contain literal eslint-disable strings it would match. Narrow the four rule globs to {ts,tsx}. The plugin keeps its own CommonJS block, so its source is still linted, just not as a Playwright test. The suppressions baseline is byte-identical. Scoping alone would trade one gap for another: Playwright's default testMatch collects *.spec.js, so a JavaScript spec would run with no rules applied at all. Verified directly — a planted .spec.js is collected as '[chromium] > Features/__ExtCheck.spec.js'. So the TypeScript-only property the scoping relies on is now asserted in corpus.test.js rather than assumed, and fails with the offending paths if a .js/.jsx ever lands in the corpus. * refactor(playwright): convert the guardrail plugin and scripts to TypeScript The 16 files this PR added were plain CommonJS JavaScript in a TypeScript repo. Node 22 runs TypeScript directly via type stripping (CI is on v22.22.2), so they are now .ts ESM with real types and no build step. - 6 rule sources typed against eslint/estree — 0 type errors; tsc:playwright stays at main's 164-error baseline. - 7 rule tests and 3 scripts converted to ESM: require -> import, module.exports -> export, __dirname -> import.meta.dirname, and the CommonJS require.main guard -> an import.meta.url comparison. - eslint.config.mjs imports the plugin entry as .ts, and the Playwright rule globs narrow to {ts,tsx} with eslint-rules/ ignored: the plugin is a linter, not a test, and its RuleTester fixtures deliberately contain the exact anti-patterns those rules look for. - playwright/tsconfig.json gains allowImportingTsExtensions, and excludes eslint-rules/tests — their node:test imports have no types to check against under this repo's @types/node 15.x. Also fixes a duplicate package.json key this PR had introduced: test:eslint-rules was defined twice, so the second silently shadowed main's own rule tests and CI ran only half of them. One key now runs both suites — 93 tests, all passing. * ci(playwright): follow the TypeScript conversion in the guardrail step The rule-table generator moved to .ts, so the --check invocation and the failure message that quotes it both had to follow, or the step would fail on a missing file. The bypass grep also needed rescoping. Its .ts/.tsx filter previously skipped the plugin's RuleTester fixtures for free, because those lived in .test.js — after the conversion they are .test.ts and the guard matched the very strings they exist to assert on, firing on 5 lines of the plugin's own source. Exclude eslint-rules/ by path instead: it is a linter, not a test, and eslint.config.mjs already declines to apply the guardrail rules to it. Verified the guard is still clean on the real corpus and still fires on a planted blanket disable. * fix(playwright): sort plugin imports and raise the eslint floor to 9.39 organize-imports reorders the converted TypeScript modules, so the four affected files are committed in their sorted form — CI's checkstyle applies the same pass and failed on the diff. package.json declared eslint ^9.18.0, but the ratchet depends on bulk suppressions (--suppressions-location / --prune-suppressions), which only exist from 9.24. It worked solely because yarn.lock happens to resolve 9.39.4; a fresh resolution landing on 9.18-9.23 would have failed CI with an unknown-flag error. Raise the declared floor to ^9.39.0 to match the feature the guardrails actually require, and retarget the lockfile entry — the resolved 9.39.4 satisfies both ranges, so --frozen-lockfile still passes. * chore(playwright): drop the redundant lint:playwright:full script lint:playwright:full differed from lint:playwright only by --suppressions-location eslint-suppressions.json, which is already ESLint's default — both produced byte-identical output. The name also misled: :full implied full-corpus versus something narrower, but lint:playwright globs the same corpus; the genuinely narrow variant is ui-checkstyle:playwright:changed. CI and lint:playwright:suppressions now chain off lint:playwright, so the remaining pair reads as what it is: check, versus check-and-prune. Also narrows the lint and prettier globs from {ts,tsx,js,jsx} to {ts,tsx} — the corpus is TypeScript-only and corpus.test.ts enforces it — and documents both lint commands plus yarn flake:report in the handbook. The flake aggregator has no CI caller after open-metadata#31628 moved the upload's anchor, so it is labelled a local utility rather than left looking like dead code. * chore(playwright): drop the unused flake aggregator and expectRowFor Neither had a caller. The flake aggregator lost its only one when open-metadata#31628 unified the postgres/mysql e2e workflows and moved the upload step's anchor, so the script, its test and the flake:report entry were reachable only by typing the command by hand. expectRowFor was exported and never referenced anywhere, not even by a rule message. getRowByName and clickAndWaitFor stay: no-positional-locator and require-response-listener-before-action name them in their error messages, so the rules would otherwise point contributors at helpers that do not exist. Removing expectRowFor also orphaned the expect import — ESLint could not see it, since no-unused-vars is off for playwright files, but tsc's noUnusedLocals did. * fix(playwright): close four guardrail bypasses found in review CRIT-1/2/3 — the CI bypass grep let three forms through. Its pattern required eslint-disable to be followed by `*/` or end-of-line, so the justified forms `/* eslint-disable -- why */` and `// eslint-disable-line -- why` never matched, while still silencing all 18 rules. Match an empty rule list instead: `*/`, `--`, or end-of-line. A directive that names a rule is untouched. The exclusion was --exclude-dir='eslint-rules', which grep matches against a basename at any depth, while eslint.config.mjs only ignores the adjacent playwright/eslint-rules/. A spec at playwright/e2e/**/eslint-rules/ was therefore linted but exempt from the guard, needing no justification at all. Replaced with a path-anchored filter. CRIT-4 — corpus.test.ts asserted total <= a hard-coded 1520 that nothing recomputes, so a burn-down dropping the total to 200 would open 1,320 units of free headroom. Now asserts exact per-rule counts, making every movement an explicit edit; the undocumented PW_SUPPRESSION_CEILING override is gone. Verified: a lowered total and a cross-rule swap both fail now. Same-rule, same-file swaps remain invisible and are documented as such in the test. HIGH-2/HIGH-3 — the five RuleTester suites ran under espree, not the @typescript-eslint/parser the rules ship with, so the 107 green tests measured a different AST. no-positional-locator allowlisted receiver node types and failed open on rows!.first(), (rows as Locator).nth(2), await (…).first() and page.locator('td')['first'](). Transparent TypeScript/await wrappers are now unwrapped and computed string members resolved; the four escapes have regression cases that could not previously have been parsed. HIGH-5 — importing the plugin as .ts requires Node's unflagged type stripping (22.18+), which broke `yarn lint` for the whole app on 22.0-22.17. engines.node raised to >=22.18.0. * fix(playwright): address the should-fix findings from review HIGH-1 — require-response-listener-before-action performed no ordering analysis: it reported every inline `await …waitForResponse(…)` and could not see which statement triggered the response, while its name, description, handbook row and .claude/rules entry all promised ordering enforcement. Banning the inline shape is a sound proxy — hoisting is the only way to register first — so the rule is renamed no-awaited-wait-for-response to say what it does, and its scope note records that an aliased call slips past it. HIGH-4 — require-assertion-per-test detected assertions with a \bexpect\b scan over raw source text, so `// we expect the click to work` or a URL containing "expect" exempted an assertion-free test. Now collects real `expect` identifiers from the AST, which still credits an assertion delegated by reference (`verifyRow(page, expect)`). Verified: comment and string cases are flagged, delegation is not, and the corpus baseline does not move. MED-1 — the guardrail step also runs the rule tests and the rule-table drift check, but its changed-files trigger listed only playwright sources, the eslint config and the suppressions file. The handbook holding the generated table, eslint-rules/, the generator and package.json could all change without the step running — the drift guard never firing for the files that cause drift. Note kept outside the `files:` block scalar, where every line is a glob rather than a comment. MED-2/3 — the skills and .claude/rules asserted "no warn tier" and "no advisory rules", contradicted by the config, and pointed contributors at lint:playwright:suppressions as the gate. That variant is not stronger: it passes on the stale-entry case CI fails on and rewrites a tracked file. Docs now name lint:playwright as the CI-equivalent check, with the pruning variant scoped to post-cleanup. Also corrects "every test needs an expect()", which the rule cannot and does not enforce. * style(playwright): re-sort plugin imports after the rule rename * chore(playwright): declare @types/estree and fix a misleading skill description The TypeScript conversion imports types from 'estree' but never declared the package. It resolved only because a transitive dependency happens to hoist it to the top of node_modules — the same works-by-accident-of-resolution class as the eslint version floor, which did bite. The lockfile already keys on ^1.0.0, so declaring it changes no resolution and --frozen-lockfile still passes. This PR also reduced skills/writing-playwright-tests to a redirect stub while leaving its frontmatter advertising 'testing philosophy, patterns, and best practices'. Skills are selected by that description, so an agent choosing it got a redirect instead of guidance. The description now says what the file is. * chore(playwright): ratchet no-skipped-test 5 -> 4 after merging main main unskipped the glossary advanced-operations test (open-metadata#32010), which left its no-skipped-test suppression unused. The full lint failed with exit 2 on the stale entry, exactly as the ratchet intends; pruned and recorded the lower count. Total 1520 -> 1519. This is the exact-count check earning its keep: the baseline moved and the test refused to pass until the movement was written down. * fix(ci): stop the playwright checkstyle step crashing on non-TypeScript files organize-imports resolves each argument against the TypeScript project and aborts with "Could not find source file" on anything that is not in it. The playwright step passed $CHANGED_FILES straight through, while the src step has always filtered to code files first. The trigger for this step deliberately includes eslint-suppressions.json, package.json and the handbook .md — a change to any of them must run the guardrails — so those land in the changed-file list and kill the step before any check runs. That is why it passed on PRs and failed in the merge queue every time: a PR push lists only what that push touched, and most pushes do not include the suppressions file, whereas the merge queue lists everything the PR changes against main, which always does. Filter to .ts/.tsx for organize-imports only; eslint and prettier handle JSON and Markdown correctly and keep the full list. Verified under bash against the exact file list from the failing run: unfiltered exits 1, filtered exits 0, with lint and prettier still clean on the full set. * chore(playwright): re-baseline against main (1519 -> 1520) main moved 25 commits under the branch, three of them touching playwright. open-metadata#30909 (Conversation V2) reworked 21 spec and util files (+600/-270), which pushed several files past their recorded counts while others dropped below — so the merge-queue run failed both ways at once: 17 no-positional-locator errors plus stale entries. Net movement is small: no-positional-locator 1341 -> 1343 (main added two new call sites), no-wait-for-selector 36 -> 35. Total 1519 -> 1520. These landed before the gate is live, so absorbing them is initialization rather than the ratchet slipping — the same argument as the original 1265 -> 1341. The never-rises rule binds every PR after this one merges. * chore(playwright): re-baseline after open-metadata#29849 landed (1520 -> 1516) open-metadata#29849 (QueryBuilderWidgetV1 migration) merged along with open-metadata#32097 and open-metadata#32112, touching the playwright corpus. The full lint failed both ways as expected: 10 unsuppressed errors plus stale entries. Net movement is downward — no-positional-locator 1343 -> 1339, total 1520 -> 1516. open-metadata#29849's diff added 18 positional call sites, but other changes in the same range removed more than that, so the ratchet tightens rather than loosens here. tsc:playwright moves 165 -> 166; the new error is in playwright/e2e/Features/AdvancedSearch.spec.ts, a file main changed and this branch does not touch. Zero tsc errors come from any file this PR adds. * fix(ui): keep engines.node at >=22.0.0 so collate-ui can still install Raising the floor to >=22.18.0 broke Collate's build. collate-ui's prepare_collate-ui target runs `yarn install` against this package on Node 22.17, and yarn enforces engines at install time — so the build failed before anything ran: error open-metadata@0.1.0: The engine "node" is incompatible with this module. Expected version ">=22.18.0". Got "22.17.0" That step only installs; it never loads eslint.config.mjs, so the floor was blocking a consumer that does not need the capability it describes. The underlying requirement is real — importing the plugin as .ts needs Node's type stripping, unflagged from 22.18 and behind --experimental-strip-types from 22.6 — so it is now documented at the import site rather than dropped silently. This repo's own .nvmrc is v22.22.2, and CI runs it, so the supported path is unaffected. * refactor(playwright): write the guardrail plugin as .mjs, not TypeScript Reverts the TypeScript conversion for the plugin, its tests and the rule-table generator, and with it the Node floor that broke Collate's build. Importing the plugin as .ts made eslint.config.mjs depend on Node's type stripping — unflagged only from 22.18. That is a real requirement, so engines was raised to match; but collate-ui runs `yarn install` against this package on Node 22.17 and yarn enforces engines at install time, so a capability the Collate build never uses blocked it from installing at all. Writing the plugin as plain ESM removes the requirement rather than declaring or working around it. It also matches what this repo already does: every other rule plugin in eslint-rules/ is .mjs, including main's own openmetadata-playwright.mjs, and scripts/ is .js/.mjs throughout — the .ts files were the only ones of their kind. Verified the constraint is genuinely gone: eslint now runs clean with --no-experimental-strip-types, the exact condition that previously failed with ERR_UNKNOWN_FILE_EXTENSION. Also drops @types/estree, added only for the annotations, and removes allowImportingTsExtensions plus the eslint-rules/tests exclude from playwright/tsconfig.json, which existed only because the tests were .ts. * chore(playwright): re-baseline suppressions after merging main main moved the Playwright corpus since the last push: SettingsNavigationPage gained one positional locator (8 -> 9) and Users.spec.ts had five fixed (21 -> 16). Absorb both so the ratchet reflects the merged tree. no-positional-locator 1339 -> 1335; baseline total 1516 -> 1512. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(playwright): trim over-long guardrail comments Cut comments that restated the code and compressed the rationale blocks that had grown into essays. Kept the notes that record something unrecoverable from reading the source: the workerMain.js timeout-slot evidence, the grep basename-matching gotcha, --prune-suppressions exiting 0, the organize-imports crash on .json, and the $$ replacement corruption. Comments only; no functional lines touched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(lint): give scripts/*.mjs the Node globals it runs with scripts/ had no ESLint config block, so `process` and `console` were undefined there. The rule table generator was shielded by its .ts extension -- typescript-eslint disables no-undef for TypeScript -- until it moved to .mjs to drop the Node type-stripping dependency. That re-armed no-undef against a directory the config never covered. Only reachable when a scripts/ file lands in a changed-file lint: a PR event resolves a narrower diff, while the merge queue lists the whole PR against main and always includes it. Scoped to .mjs; the .js tooling alongside is CommonJS and needs a separate fix. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(playwright): close the .spec.mjs hole in the TypeScript-only guard The guard rejected only .js/.jsx, but Playwright's default testMatch also collects .mjs/.cjs/.mts/.cts, and the guardrails are scoped to .ts/.tsx -- so a .spec.mjs would run entirely unlinted. Now that .mjs is a normal extension in this tree, that is a realistic bypass. Stated as an allowlist rather than a list of banned extensions, so any future module extension is closed by default. Non-module files (.png, .md, .json) are untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(playwright): keep js/jsx in the guardrail globs Narrowing these to {ts,tsx} left the guardrails depending entirely on the corpus TypeScript-only test: a .js spec would run with no rules applied if that one test were ever skipped or bypassed. The narrowing bought nothing -- no .js/.jsx exists under playwright/ -- so restoring them is free and puts the lint back as a second line of defence behind the guard. Verified unchanged: 0 errors, 218 warnings before and after. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(ci): cut the playwright step comments to one or two lines each Comments only; no functional lines touched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(ci): close four queue-only holes in the playwright guardrail step Found by review of the merge-queue failure. Each was reproduced. Trigger globs missed playwright/eslint-rules/**, playwright.config.ts and the module extensions, and the whole step is gated on any_changed -- so a PR touching only the guardrail plugin, the Playwright config, or a .spec.mts ran no guardrails at all. The plugin's own tests never gated changes to the plugin. The bypass grep only recognised directives starting with eslint-disable. An inline `/* eslint <rule>: 0 */` silenced every rule undetected: a probe with .first(), force:true and waitForTimeout linted clean. Return codes are now captured so the git-status gate always runs. organize-imports and prettier disagree permanently, so files are dirty between those lines; under bash -e a lint failure aborted before cleanup and left the dirt for the next step, which is how a playwright lint error turned the unrelated i18n job red. The suppressions gate now splits real violations from stale entries. Both exit non-zero, and the code is 2 even when a real violation is present, so keying off it would swallow violations. Violations are counted from errorCount in the JSON report and fail; a stale entry is main drifting under the branch, not a defect here, and only warns. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(playwright): match eslint-disable directives that wrap across lines `[^\n]*` cannot span a newline, so a directive whose rule list wrapped was not recognised as a directive at all -- the rule reported nothing and no justification was demanded. The CI grep missed it too, since that only fires when eslint-disable sits alone on its line. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(playwright): correct the corpus guard's comment and failure message Restoring js/jsx to the guardrail globs made this file's wording wrong: it still claimed the guardrails cover .ts/.tsx only, that every flagged extension would run unlinted, and it called .mts/.cts "non-TypeScript". What is actually true: .js/.jsx are linted but do not belong in the corpus; .mjs/.cjs/.mts/.cts fall outside the globs and really would run unlinted. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Describe your changes:
Fixes #
I worked on ... because ...
Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Greptile Summary
The PR enables the existing Playwright test for removing a domain from a glossary.
test.skipwithtestfor glossary scenario G-U12.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (2): Last reviewed commit: "Merge branch 'main' into unskip-glossary..." | Re-trigger Greptile