Skip to content

Fix server tests on Node 22.14#121

Merged
khaliqgant merged 1 commit intomainfrom
correct-tests
Apr 17, 2026
Merged

Fix server tests on Node 22.14#121
khaliqgant merged 1 commit intomainfrom
correct-tests

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Apr 17, 2026

Summary

  • Centralize the fake D1 test harness for server engine tests
  • Add compatibility for Node 22.14 node:sqlite without setReturnArrays or FTS5
  • Pin shared CI setup to Node 22.14.0 so CI matches publish
  • Include completed trajectory artifacts for this work

Verification

  • mise exec node@22.14.0 -- npm run test --workspace @relaycast/server
  • mise exec node@22.14.0 -- npx turbo test --filter=@relaycast/server --force
  • mise exec node@22.14.0 -- npx turbo lint --filter=@relaycast/server
  • mise exec node@22.14.0 -- npm run local:parity

Why CI Missed It

PR/deploy CI used floating node-version: 22, while publish was pinned to Node 22.14.0. Newer Node 22 patches include the SQLite APIs/features these tests assumed; Node 22.14.0 does not.


Open with Devin

@github-actions
Copy link
Copy Markdown

Preview deployed!

Environment URL
API https://pr121-api.relaycast.dev
Health https://pr121-api.relaycast.dev/health
Observer https://pr121-observer.relaycast.dev/observer

This preview shares the staging database and will be cleaned up when the PR is merged or closed.

Run E2E tests

npm run e2e -- https://pr121-api.relaycast.dev --ci

Open observer dashboard

https://pr121-observer.relaycast.dev/observer

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7aa87fc211

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +100 to +104
.map((term) => term.trim())
.filter(Boolean);

if (terms.length === 0) return 1;
return terms.every((term) => haystack.includes(term)) ? 1 : 0;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Strip phrase quotes before fallback term matching

When FTS5 is unavailable, fts_match currently checks haystack.includes(term) on terms that still contain " characters from buildFtsQuery, so a query like "subscription billing" is split into quoted fragments and never matches normal text. This makes Node 22.14 fallback behavior diverge from real FTS5 (which supports phrase queries), so directory/routing tests can report false negatives only in the fallback path and miss regressions in query handling.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@khaliqgant khaliqgant merged commit 9886a8e into main Apr 17, 2026
4 checks passed
@khaliqgant khaliqgant deleted the correct-tests branch April 17, 2026 09:45
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