Skip to content

test(signal): avoid spreading a possibly-string setupFiles in the Signal vitest config - #202673

Merged
steipete merged 1 commit into
mainfrom
codex/signal-config-setupfiles-lint
Nov 20, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/signal-config-setupfiles-lint

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

check-lint fails for any PR whose changed-lint scope includes test/vitest/vitest.extension-signal.config.ts. The error is test/vitest/vitest.extension-signal.config.ts:10:18: Using the spread operator on a string can mishandle special characters. setupFiles is typed string | 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 file ok, typecheck test root ok.
  • The run's only failure is the dead-export scan. It reports unrelated new unused exports in ui/src/pages/skill-workshop/* and templates-catalog-gateway.test-support.ts from current main, not from this change.

…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.
@clawsweeper

clawsweeper Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T19:14:37.744479Z b701ea4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete

Copy link
Copy Markdown
Contributor Author

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

@clawsweeper

clawsweeper Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 20, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 20, 2026
@clawsweeper

clawsweeper Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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".

  • Before: Spreading the value splits the path into individual characters.
  • After: The path remains one entry, followed by "test/setup.signal.ts".

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct repair supported by exact-head lint, typechecks, and the passing CI gate.
Proof confidence 🐚 platinum hermit (4/6) This test-configuration lint repair has no shipped user-visible behavior; exact-head changed lint and typechecks support the change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Contributors encounter a string-spread lint error when changed lint includes the Signal Vitest config.
Reason: The maintainer-authored change removes the unsafe operation while preserving the existing test configuration.

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
Reviewed head: b701ea4e78b5a5c05ac4d9fbd18d12ecea416748

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

PR surface

Tests 0. Total 0 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 1 1 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1 1 0

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This repairs a test-configuration lint failure without changing shipped user behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This repairs a test-configuration lint failure without changing shipped user behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 20, 2026, 2:27 PM ET / 19:27 UTC.

@steipete
steipete merged commit 1168758 into main Nov 20, 2026
166 of 167 checks passed
@steipete
steipete deleted the codex/signal-config-setupfiles-lint branch November 20, 2026 19:34
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 21, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant