Skip to content

Conversation

@samuelstroschein
Copy link
Member

@samuelstroschein samuelstroschein commented Nov 18, 2025

Note

Set JSON pointer path as the schema primary key and add e2e tests enforcing PK behavior (reject duplicates, allow per-file), with minor import updates.

  • Schema (packages/lix/plugin-json/src/schemas/json-pointer-value.ts):
    • Declare primary key via "x-lix-primary-key": ["/path"] on JSONPointerValueSchema.
  • Tests:
    • json-pointer-value.test.ts: add assertion that primary key is ["/path"]; use validateLixSchema from SDK dist.
    • e2e.test.ts:
      • Use openLix from SDK.
      • Add DB tests to enforce primary key: reject duplicate pointer paths; allow same pointer path across different file_ids.

Written by Cursor Bugbot for commit 072c6de. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Nov 18, 2025

⚠️ No Changeset found

Latest commit: 072c6de

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@nx-cloud
Copy link

nx-cloud bot commented Nov 18, 2025

View your CI Pipeline Execution ↗ for commit 072c6de

Command Status Duration Result
nx run-many --nx-bail --target=build --parallel ✅ Succeeded 19s View ↗
nx run-many --target=test --parallel ✅ Succeeded 14s View ↗
nx run-many --target=lint --parallel ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-18 20:00:33 UTC

Copy link

@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.

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

Copy link

Choose a reason for hiding this comment

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

Bug: Empty dist entry pollutes lockfile.

Empty package entry packages/lix/sdk/dist/engine/wasm/bundled: {} appears in the lockfile. Build output directories like dist/ shouldn't be treated as workspace packages and this entry is likely accidentally committed.

Fix in Cursor Fix in Web

specifier: ^5.7.2
version: 5.9.2

packages/lix/sdk/src/engine/wasm/bundled: {}
Copy link

Choose a reason for hiding this comment

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

Bug: Empty Source Package Entry Pollutes Lockfile

Empty package entry packages/lix/sdk/src/engine/wasm/bundled: {} appears in the lockfile. Source directories shouldn't be treated as workspace packages and this entry is likely accidentally committed.

Fix in Cursor Fix in Web

} finally {
await lix.close();
}
});
Copy link

Choose a reason for hiding this comment

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

Bug: Unscoped Paths Violate Primary Key Constraint

The test expects the second insert to succeed when inserting the same path value from a different file, but the schema defines /path as the primary key without file-scoping. Both records have identical path values in their snapshot_content, which violates the primary key constraint as declared.

Fix in Cursor Fix in Web

@samuelstroschein samuelstroschein merged commit 8a15e06 into main Nov 18, 2025
3 checks passed
@samuelstroschein samuelstroschein deleted the json-pointer-foreign-key branch November 18, 2025 20:09
@github-actions github-actions bot locked and limited conversation to collaborators Nov 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants