Repository navigation
test(signal): avoid spreading a possibly-string setupFiles in the Signal vitest config - #202673
Conversation
…string createSingleChannelExtensionVitestConfig types setupFiles as string | string[], so spreading it trips oxlint's string-spread rule whenever this config is in the changed-lint scope. Flatten the parts instead.
|
🦞👀 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 Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Exact-head CI passed on b701ea4: https://github.com/openclaw/openclaw/actions/runs/44800058712. Focused Signal lint and all four test-root typecheck shards pass locally; independent Codex autoreview found no P0–P2 issues. The main dead-export regressions named in the PR body are being repaired separately. No prior ClawSweeper findings are posted on this PR. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR flattens the Signal test setup-file list instead of spreading a value typed as either a string or an array. Example: The inherited setupFiles value is "test/setup.extensions.ts".
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR is a useful, minimal lint repair with no actionable findings; current main still contains the offending expression and exact-head CI passed. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Signal Vitest config extends the shared extension test config and appends the Signal metadata setup file before Vitest loads the shard. flowchart LR
A[Shared Vitest config] --> B[Extension config factory]
B --> C[Signal config]
D[Signal metadata setup] --> C
C --> E[Vitest Signal shard]
Technical reviewBest possible solution: Retain the one-line flattening repair in the existing Signal config owner. Do we have a high-confidence way to reproduce the issue? The reported diagnostic matches the union-typed spread in current main; no target code was run during this read-only review. Is this the best way to solve the issue? Flattening preserves array behavior and string entries without casts, suppressions, new helpers, or changes to the shared factory. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a3bd84cc5063. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
PR surfaceTests 0. Total 0 across 1 file. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 Reviewed November 20, 2026, 2:27 PM ET / 19:27 UTC. |
|
Merged via squash.
|
…string (openclaw#202673) createSingleChannelExtensionVitestConfig types setupFiles as string | string[], so spreading it trips oxlint's string-spread rule whenever this config is in the changed-lint scope. Flatten the parts instead.
What Problem This Solves
check-lintfails for any PR whose changed-lint scope includestest/vitest/vitest.extension-signal.config.ts. The error istest/vitest/vitest.extension-signal.config.ts:10:18: Using the spread operator on a string can mishandle special characters.setupFilesis typedstring | string[], so[...(config.test?.setupFiles ?? []), …]may spread a string. It surfaced on #202663 and was attributed to #145981.Why This Change Was Made
Build the list with
[config.test?.setupFiles ?? [], "test/setup.signal.ts"].flat(). It behaves the same for arrays, and it's correct for a single-string value.User Impact
None. Test configuration only.
Evidence
node scripts/check-changed.mjs -- test/vitest/vitest.extension-signal.config.ts:lint test root changed fileok,typecheck test rootok.ui/src/pages/skill-workshop/*andtemplates-catalog-gateway.test-support.tsfrom current main, not from this change.