Repository navigation
Reject blank external id values so unrelated entities never merge - #526
saurav-shakya wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
This PR has no linked approved issue. Open an issue, get it discussed and Maintainers: reopen this PR to override the gate (it gets the |
|
This is PR 1 of 10 you may keep open at a time. |
|
This PR has no linked approved issue. Open an issue, get it discussed and Maintainers: reopen this PR to override the gate (it gets the |
1 similar comment
|
This PR has no linked approved issue. Open an issue, get it discussed and Maintainers: reopen this PR to override the gate (it gets the |
|
@arrry-hydraDB review pls |
Summary
An external id value that is empty or whitespace now raises
invalid_argument(fieldexternal_ids) on create, update, andinsert.factsin both SDKs, like a blank key. A blank value can no longer be stored, so two unrelated entities can no longer merge through it.Implementation details
Decisions
_require_str_mapping/requireStrMapping), which every external id write path already calls, right after the blank-key check from fix(write): reject empty external_id keys like properties keys #406. Error text:external_ids values cannot be empty or whitespace.Validation
tests/test_entities.pyandtypescript/test/integration.test.ts:""and" "through create, update, andinsert.facts, checking code, field, and text, and that the stored graph still holds only Ann Lee, with no alias, external id, or merge record. The Python test fails onmain.external_id_errorscompares the code, field, and message from create andinsert.factsacross both SDKs. It fails against the old Python code.scripts/precheck.py --base origin/mainpasses; full Python and TypeScript suites pass on Kuzu.Limits
None.
Linked issue
Closes #524
AI Assistance
Checklist
/approved.AGENTS.md).Breaking changes
A blank or whitespace external id value now raises
ValidationErrorinstead of being stored.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.