Skip to content

test: type runtime test filters - #3746

Merged
kojiwakayama merged 1 commit into
mainfrom
fix/runtime-test-filter-types
Aug 15, 2026
Merged

test: type runtime test filters#3746
kojiwakayama merged 1 commit into
mainfrom
fix/runtime-test-filter-types

Conversation

@kojiwakayama

@kojiwakayama kojiwakayama commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a JSDoc contract to filterTestFiles so TypeScript callers see include and exclude as string[] filters.
  • Fixes the standalone deno check tests/runtime-test-filters.test.ts diagnostic that PR fix(server): restrict project chooser to trusted loopback requests #3743 missed because it merged before the type-only helper commit landed.
  • Preserves runtime behavior; this is a JSDoc-only follow-up.

Verification

  • Red before fix: Deno 2.7.7 deno check tests/runtime-test-filters.test.ts failed at tests/runtime-test-filters.test.ts:39:53 and :45:52 with string[] not assignable to never[].
  • Green after fix: Deno 2.7.7 deno check tests/runtime-test-filters.test.ts.
  • Green after fix: pinned Deno focused runtime filter test, 1 passed (4 steps), 0 failed.
  • Green after fix: pinned Deno deno task fmt:check, deno task lint:ci, deno task typecheck.
  • Full pre-push: first run exposed unrelated timing failures in src/agent/runtime/project-files-client.test.ts and src/react/compat/ssr-adapter/stream-renderer.test.ts; both exact files passed on direct rerun. Second full .husky/pre-push run passed with All pre-push checks passed!.

Final readiness

  • Exact head: d23d0694eaf58693bc5a502dde3ac087c2e8e4c8.
  • Exact-head GitHub CI is green with no pending or failed checks.
  • Review threads: 0 unresolved.
  • Fresh independent Standards and Spec reviews both approved at 98% confidence.
  • Aggregate merge confidence: 98%.

Summary by CodeRabbit

  • Documentation
    • Added documentation describing the test file filtering utility, including its inputs, working directory, and return value.

PR #3743 merged before this type-only helper annotation reached the PR head. Deno infers the JavaScript helper's default include and exclude arrays as never[] without an exported contract, so TypeScript callers fail when passing the shared Deno-only string pattern list.

Adding JSDoc on filterTestFiles records the runtime shape that the helper already accepts without changing behavior.

Constraint: Follow-up is limited to tests/test-file-utils.mjs JSDoc typing for the runtime-test-filters diagnostic missed by merged #3743.

Rejected: Changing tests/runtime-test-filters.test.ts call sites | would hide the helper's exported type gap instead of fixing it.

Rejected: Rewriting the helper in TypeScript | unnecessary and broader than a type-only repair.

Confidence: high

Scope-risk: narrow

Directive: Keep filterTestFiles include and exclude filters typed as string-array glob patterns for all runtime test runners.

Tested: deno 2.7.7 check tests/runtime-test-filters.test.ts

Tested: deno 2.7.7 test tests/runtime-test-filters.test.ts with repo preload and runtime env

Tested: deno 2.7.7 task fmt:check; deno 2.7.7 task lint:ci; deno 2.7.7 task typecheck

Not-tested: External CI before draft PR creation
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8050114f-be22-4a02-8a55-e90c29cd4f9e

📥 Commits

Reviewing files that changed from the base of the PR and between 8985869 and d23d069.

📒 Files selected for processing (1)
  • tests/test-file-utils.mjs

📝 Walkthrough

Walkthrough

The change adds JSDoc documentation for the exported filterTestFiles function in the test file utilities.

Changes

Test file utility documentation

Layer / File(s) Summary
Document filterTestFiles
tests/test-file-utils.mjs
Added JSDoc descriptions for the function parameters and return type.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to d23d0

This localized JSDoc change clarifies test filter types without changing runtime behavior; the reported checks pass, so no actionable merge-blocking risk remains.

Suggested reviewers: kwakayama

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies the type-related change for runtime test filters and is concise and relevant to the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/runtime-test-filter-types

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

📦 Client bundle boundary

Entrypoint Modules Source size Server leaks
src/index.client.ts 454 3065 KiB ⚠️ 39 known

A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in scripts/lint/client-bundle-baseline.json to burn down.

@kojiwakayama
kojiwakayama marked this pull request as ready for review August 15, 2026 21:48
@kojiwakayama
kojiwakayama added this pull request to the merge queue Aug 15, 2026
Merged via the queue into main with commit ee4731b Aug 15, 2026
34 checks passed
@kojiwakayama
kojiwakayama deleted the fix/runtime-test-filter-types branch August 15, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant