Skip to content

test: add regex-fallback-bulk-store.test.mjs to CI (Issue #675)#740

Closed
jlin53882 wants to merge 1 commit intoCortexReach:masterfrom
jlin53882:add-regex-fallback-test
Closed

test: add regex-fallback-bulk-store.test.mjs to CI (Issue #675)#740
jlin53882 wants to merge 1 commit intoCortexReach:masterfrom
jlin53882:add-regex-fallback-test

Conversation

@jlin53882
Copy link
Copy Markdown
Contributor

Summary

Adds the missing test file from PR #723 to the official CI test script.

Changes

  • test/regex-fallback-bulk-store.test.mjs (619 lines) — bulkStore fallback + DB dedup interaction test
  • package.json — append node --test test/regex-fallback-bulk-store.test.mjs to test script

Why

The test file was added in PR #723 but the package.json test script was never updated, so CI never ran it. This PR fixes that gap.

Testing

  • File added to test/
  • npm test script updated

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: 47689a905f

ℹ️ 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 +470 to +471
if (idx === 0) return [1, 0, 0, 0];
if (idx === 1) return [0.5, 0.5];
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 Increment embedder index in metadata-failure state test

This embedder never advances idx, so every call returns the first vector and the BAD-meta branch is skipped by batch dedup before metadata construction runs. As written, the test passes without exercising the intended "metadata failure does not corrupt state" path, which can let regressions in that catch/continue flow slip through undetected.

Useful? React with 👍 / 👎.

// A (→ vecA, batch OK, fallback DB dedup: vecA not in DB → write)
// B (→ vecA, batch dedup SKIPS → not in capturedEntries)
// C (→ vecC, batch OK, fallback DB dedup: vecC IS in DB → SKIP)
await regexFallbackNewPattern(store, embedder, ["Text A", "Text B", "Text C"], scope, "bf1");
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 Ensure batch+fallback test actually reaches fallback DB dedup

This case passes three texts, but regexFallbackNewPattern only processes toCapture.slice(0, 2), so "Text C" is never evaluated. That means the test does not cover the claimed interaction where fallback DB dedup skips the pre-stored vecC, and can pass even if that behavior is broken.

Useful? React with 👍 / 👎.

@jlin53882 jlin53882 closed this May 3, 2026
@jlin53882 jlin53882 deleted the add-regex-fallback-test branch May 3, 2026 14:43
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