Repository navigation
Conversation
…ct fixtures ### Description This PR addresses broken and contradictory tests within the `packages/core` test suite and the smart-contract test fixtures. **Vulnerabilities & Security Defects Remediated:** * **Broken and Contradictory Tests (`packages/core/_tests/mockCharacter.ts`, `packages/core/tests/models.test.ts`, and smart-contract fixtures):** The audit found a broken relative import, an endpoint assertion that contradicted its own mock, and hard-coded access-control output. Additionally, the smart-contract test fixtures previously failed to configure the necessary agreement dependency. These tests and fixtures have been fully updated to reflect the actual contract behavior, utilize environment-backed configuration, and enforce accurate assertions.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit bf808ee. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This PR addresses broken and contradictory tests within the
packages/coretest suite and the smart-contract test fixtures.Vulnerabilities & Security Defects Remediated:
packages/core/_tests/mockCharacter.ts,packages/core/tests/models.test.ts, and smart-contract fixtures): The audit found a broken relative import, an endpoint assertion that contradicted its own mock, and hard-coded access-control output. Additionally, the smart-contract test fixtures previously failed to configure the necessary agreement dependency. These tests and fixtures have been fully updated to reflect the actual contract behavior, utilize environment-backed configuration, and enforce accurate assertions.Note
Low Risk
Changes are limited to the core package test suite; production embedding code is unchanged.
Overview
Most of the touched
packages/core/__tests__files are content-equivalent rewrites (same assertions and mocks), which usually indicates line-ending or whitespace normalization rather than behavior changes.The meaningful change is in
embedding.test.ts: embedding helpers are loaded with dynamicimport()aftervi.resetModules()inbeforeEach, so settings mocks and provider flags apply to a fresh module graph instead of a stale top-level import.fetchis stubbed onglobalThisinstead of(global as any). The local→remote fallback case now usesvi.doMock("fastembed", …)with a rejectingFlagEmbedding.initplus module reset, replacing an invalid in-testvi.mockthat threw at load time.Reviewed by Cursor Bugbot for commit 1dfb2d5. Bugbot is set up for automated code reviews on this repo. Configure here.