Repository navigation
chore(ui): enforce Solid 2 lint rules - #168376
Conversation
Load the upstream v2 Solid rules through oxlint for UI TSX. Isolate the plugin tooling on TypeScript 5.9.3 without changing the repository compiler. Add positive, negative, and out-of-scope fixture proof.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
|
Codex review: needs changes before merge. What this changesThis PR adds upstream Solid 2 lint rules for UI TSX and makes isolated lint fixtures resolve the plugin. Example: A UI component destructures its name prop with const { name } = props.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it provides useful, maintainer-directed Solid migration tooling, and no introduced defect was established. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherThe repository lint pipeline passes UI TSX through oxlint, which loads the Solid plugin from a private workspace and emits contributor diagnostics. flowchart LR
A[UI TSX source] --> B[Repository lint wrapper]
B --> C[Oxlint configuration]
C --> D[Private Solid lint workspace]
D --> E[Upstream Solid 2 rules]
E --> F[Contributor diagnostics]
Technical reviewBest possible solution: Retain the upstream Solid preset at the existing lint boundary and resolve the remaining CI attribution before landing. Do we have a high-confidence way to reproduce the issue? This is internal lint enforcement; the supplied corpus exercises invalid, valid, and out-of-scope inputs, and no target code was executed during this review. Is this the best way to solve the issue? Using the upstream preset through the existing oxlint owner avoids a competing lint pipeline, while the private workspace preserves the repository compiler version. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e5c74ed21cb5. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +39, Tests +71, Docs +1, Config +12, Other +558. Total +681 across 15 files. Added test files: 1. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 10, 2026, 7:11 AM ET / 11:11 UTC (Revision 5). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…th fixtures check-dependencies has been red on hourly main. Its three Knip scripts failed for separate reasons: - deadcode:full (production pass) reported canUseProfileAsProviderEntryApiKey. #168552 made src/plugin-sdk/plugin-test-runtime.ts, a production root, lazily load isolated-completion.adapter.test-support.ts. That fixture passes the model-auth and prepared-model-runtime namespaces to vi.spyOn. In Knip 6.32.2, any opaque import (here the lazy loaders in the media-understanding runner and config model validation) counts every export of a module as used, unless every namespace importer references only the bare namespace (is-referenced.js hasOnlyNsRefs). The spies flip that, so the facade's dead re-exports surfaced, and deadcode:exports reported nine "exports in used namespace" findings for test seams and the lazy-loaded isProviderAuthError. - deadcode:exports' script scan reported the default export of tools/solid-lint/index.mjs, which Oxlint loads by path through .oxlintrc.json jsPlugins (#168376). - deadcode:unused-files' full-tree scan reported six files that are only loaded by path: scripts/control-ui-parity/{vitest.config,capture-suite, fixtures,scenarios}.ts (`pnpm ui:parity`, #168597), src/proxy-capture/child-transport.process.test-support.ts (resolveRuntimeWorkerUrl in proxy-owner.test.ts, #168459) and test/e2e/qa-lab/runtime/codex-isolated-app-server.fixture.mjs (spawned by the Codex adapter test, #168552). Changes: - Make canUseProfileAsProviderEntryApiKey module-private and drop four other model-auth facade re-exports with no consumers anywhere (EnvApiKeyResult, ProviderEntryApiKeyBindingResolution, ProviderCredentialPrecedence, resolveAwsSdkEnvVarName). Their owners keep their real consumers. - Ignore only nsExports in the production scan for model-auth.ts, model-auth-runtime.ts, model-auth-runtime-shared.ts and prepared-model-runtime.ts. Each has a verified opaque lazy importer; plain unused exports stay reported, and the full-tree scan still audits every export against its test consumers. plugin-test-runtime stays a production root: un-rooting it surfaced 24 false positives, because extension tests import it through the openclaw/plugin-sdk alias. - Register the solid-lint default export as Oxlint-consumed, matching oxlint-boundary-guards.mjs. - Add full-tree entries for the six by-path files. No files are deleted. Proof: deadcode:full, deadcode:unused-files and deadcode:exports all exit 0 on the final tree; the model-auth focused tests pass.
* chore(ui): enable Solid 2 alongside Lit * chore(ui): enforce Solid 2 lint rules Load the upstream v2 Solid rules through oxlint for UI TSX. Isolate the plugin tooling on TypeScript 5.9.3 without changing the repository compiler. Add positive, negative, and out-of-scope fixture proof. * test(lint): include Solid tooling in isolated config fixtures * fix(lint): include tooling workspaces in duplicate scan coverage
…th fixtures check-dependencies has been red on hourly main. Its three Knip scripts failed for separate reasons: - deadcode:full (production pass) reported canUseProfileAsProviderEntryApiKey. openclaw#168552 made src/plugin-sdk/plugin-test-runtime.ts, a production root, lazily load isolated-completion.adapter.test-support.ts. That fixture passes the model-auth and prepared-model-runtime namespaces to vi.spyOn. In Knip 6.32.2, any opaque import (here the lazy loaders in the media-understanding runner and config model validation) counts every export of a module as used, unless every namespace importer references only the bare namespace (is-referenced.js hasOnlyNsRefs). The spies flip that, so the facade's dead re-exports surfaced, and deadcode:exports reported nine "exports in used namespace" findings for test seams and the lazy-loaded isProviderAuthError. - deadcode:exports' script scan reported the default export of tools/solid-lint/index.mjs, which Oxlint loads by path through .oxlintrc.json jsPlugins (openclaw#168376). - deadcode:unused-files' full-tree scan reported six files that are only loaded by path: scripts/control-ui-parity/{vitest.config,capture-suite, fixtures,scenarios}.ts (`pnpm ui:parity`, openclaw#168597), src/proxy-capture/child-transport.process.test-support.ts (resolveRuntimeWorkerUrl in proxy-owner.test.ts, openclaw#168459) and test/e2e/qa-lab/runtime/codex-isolated-app-server.fixture.mjs (spawned by the Codex adapter test, openclaw#168552). Changes: - Make canUseProfileAsProviderEntryApiKey module-private and drop four other model-auth facade re-exports with no consumers anywhere (EnvApiKeyResult, ProviderEntryApiKeyBindingResolution, ProviderCredentialPrecedence, resolveAwsSdkEnvVarName). Their owners keep their real consumers. - Ignore only nsExports in the production scan for model-auth.ts, model-auth-runtime.ts, model-auth-runtime-shared.ts and prepared-model-runtime.ts. Each has a verified opaque lazy importer; plain unused exports stay reported, and the full-tree scan still audits every export against its test consumers. plugin-test-runtime stays a production root: un-rooting it surfaced 24 false positives, because extension tests import it through the openclaw/plugin-sdk alias. - Register the solid-lint default export as Oxlint-consumed, matching oxlint-boundary-guards.mjs. - Add full-tree entries for the six by-path files. No files are deleted. Proof: deadcode:full, deadcode:unused-files and deadcode:exports all exit 0 on the final tree; the model-auth focused tests pass.
What Problem This Solves
UI TSX can compile while losing prop reactivity or retaining removed Solid APIs and JSX syntax. The normal lint pipeline needs Solid 2 checks before more components migrate.
User Impact
No runtime behavior changes. Contributors get Solid-specific diagnostics for
ui/**/*.tsx; other source files retain their existing lint rules.Release-note context: internal migration tooling only.
Why This Change Was Made
Enable the complete
eslint-plugin-solidv2 preset through oxlint JS plugins, including prop destructuring, reactivity, removed APIs, obsolete namespaces, split effects, and the remaining v2 checks. Existing lint tests that relocate the root configuration now share a fixture helper that also links its eagerly loaded JS plugin; their assertions are unchanged.The private
tools/solid-lintworkspace pins the plugin's tooling to TypeScript 5.9.3 because its transitive@typescript-eslintdependencies require TypeScript below 6.1. The root keeps TypeScript 7.1 for the repository's existing checker and source graph. All existing lockfile importers match the merged main baseline.Use exact
[email protected]: 0.18.1 does not satisfy the seven-day cooldown until 2026-10-11 01:10 UTC. No cooldown exemptions or dependency overrides were added. The toolchain prerequisite is already on main via #168305.Evidence
pnpm test test/scripts/oxlint-solid.test.ts --maxWorkers=1: passed on5d80d56e6edb1after merging current main, 2.15 s wall time / 0.73 s test time. The corpus checks expected errors, valid Solid 2 code, and exclusion outside the UI scope through the real oxlint wrapper.git diff --check: passed.afafc0703a5ee; run 38035404978. Its full-lint capsule reported 13 known capsule-related line-cap failures and was stopped. No line budgets, rules, or baselines were weakened. PR CI is the authoritative full-lint proof for this refreshed head.CI follow-up
All six lint jobs passed on
5d80d56e6edb1in CI run 38043404277:check-lint,check-lint-core-1,check-lint-core-2, andcheck-lint-extensions-1/2/3.That run exposed relocated-config failures in existing test workspaces, which did not contain the newly configured plugin. The fixture repair was reproduced against the failing setup and verified locally:
pnpm test test/scripts/oxlint-config.test.ts test/scripts/ci-changed-lint.test.ts test/scripts/lint-status.test.ts test/scripts/oxlint-solid.test.ts --maxWorkers=1: 41 passed, 66.79 s wall time. Individual test times: 23.51 s, 10.71 s, 26.95 s, and 1.05 s respectively.pnpm test test/scripts/changed-lanes.test.ts --maxWorkers=1 -t 'fails real changed-check lint': both affected cases passed, 34.60 s wall time / 27.06 s test time. Other cases were excluded by this focused invocation.The initial duplicate-scan failure was missing target coverage for
tools/solid-lint/index.mjs; the existing scan now includestools, with no weakened thresholds or exclusions.pnpm dup:check:coveragefailed before the fix and passes after it. Reported clone pairs were informational.The release fixture failure is inherited: full main CI 38041823802, at
db6449d3f6091740dbddcf02fdc0e34dc94ca424, fails the same eightrelease-publish-draft.test.tscases because its synthetic.release-harnessomitsscripts/lib/managed-cleanup-handoff.mts, imported bytsx-cli-shim.mjs. These source files are unchanged between that main run, the PR, and current main. Recent successful main push runs select only security checks and do not prove this test passes. The inherited-failure landing path will preserve that qualification while requiring completed exact-head checks and ClawSweeper review.Landing evidence on final head
Run 38046092057 tested
365cd7f61e688edb96d136953a31a549a5b62531. All 71 jobs are terminal; none were cancelled. All six lint jobs, the duplicate guard, and the affected lint-fixture lanes passed. ClawSweeper completed its review of this head with no code findings.Three remaining failures are retained under the native inherited-failure procedure:
release-publish-draft.test.ts: the same eight missing-harness-import failures occur in full main run 38041823802.run-tsgo.test.ts: the same SIGTERM-during-spawn watchdog case times out in that full main run.control-ui-public-session-refresh.test.ts(51,19): TS2345 passes a module-scopestring | undefinedmatch result torunInNewContext. This test, its renderer, and the typecheck configuration are byte-identical between protected-main parentf6765f73c339efb8631d45a11daee48cea3989d1and the actual tested mergef3f2281652bca4364684ea47a7346986318a3d90; root TypeScript and existing lock importers are unchanged by this PR. This resolves ClawSweeper's requested type-failure attribution.The native landing record retains the exact checkout, source hashes, main/PR failure logs, all job outcomes, and CI aggregate attribution. No failed checks are described as passing.