test: add regex-fallback-bulk-store.test.mjs to CI (Issue #675)#740
test: add regex-fallback-bulk-store.test.mjs to CI (Issue #675)#740jlin53882 wants to merge 1 commit intoCortexReach:masterfrom
Conversation
There was a problem hiding this comment.
💡 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".
| if (idx === 0) return [1, 0, 0, 0]; | ||
| if (idx === 1) return [0.5, 0.5]; |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
Adds the missing test file from PR #723 to the official CI test script.
Changes
node --test test/regex-fallback-bulk-store.test.mjsto test scriptWhy
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