Open
Conversation
| const metaString = Object.entries(meta) | ||
| .map(([key, value]) => (key === '$tempId' ? `'$tempId': '_:${value}'` : `'${key}': '${value}'`)) | ||
| .join(','); | ||
| const OUTPUT = `(CREATE ONLY Delta SET input = ${restString}, meta = {${metaString}, "$sid": $parent.id, "$id": record::id($parent.id)}, after = $after, before = $before RETURN VALUE $parent.id )`; |
There was a problem hiding this comment.
Contributor
There was a problem hiding this comment.
Caution
Changes requested ❌
Reviewed everything up to fd0e38b in 3 minutes and 34 seconds. Click for details.
- Reviewed
208lines of code in3files - Skipped
0files when reviewing. - Skipped posting
7draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. tests/test.sh:18
- Draft comment:
Typo in comment: 'argumentsppa' should be 'arguments'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. tests/unit/mutations/basic.ts:1008
- Draft comment:
Error message mismatch: this check verifies 'secondUser.id', so the thrown error message should reference 'secondUser.id' not 'firstUser.id'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. tests/unit/mutations/basic.ts:2507
- Draft comment:
Entity type mismatch in cleanup for enum1 test: A Company is created but deletion is performed with $entity: 'Hook'. Update to use 'Company'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. tests/unit/mutations/basic.ts:2580
- Draft comment:
Remove debug logging: Consider removing the console.log ('RES!', mutationResult) unless needed for diagnosing failures. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While removing debug logging is generally good practice, this is in a test file and the test is marked as skipped (it.skip). The console.log may be intentionally left in to help debug the test when it's unskipped. Test files often keep debug logging commented out or wrapped in conditionals for future debugging. The comment is technically correct that debug logging should be removed, but it may be too aggressive in a test context where debug logging can be valuable. The test being skipped suggests it's still under development. Given that this is a skipped test that appears to be under development, the console.log may be intentionally left in for debugging purposes when the test is ready to be enabled. The comment should be deleted since this is a skipped test under development where debug logging may be intentionally left in for future use.
5. tests/unit/mutations/basic.ts:2433
- Draft comment:
Remove debug logging from error catch: The console.log('log', err) inside the pf4 test may be removed or replaced with proper test error assertions. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. src/stateMachine/mutation/surql/build.ts:10
- Draft comment:
Consider refactoring inner functions: Functions like buildThings, buildEdges, buildArcs, and buildReferences are defined inside buildSURQLMutation. Moving them outside (and passing necessary parameters) may improve clarity and testability. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
7. tests/unit/mutations/basic.ts:1160
- Draft comment:
Consider refactoring repetitive cleanup logic: Several tests perform similar cleanup mutations. Extracting common cleanup routines could reduce code duplication. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_LwC4tTgXaRNJYpnD
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
| ], | ||
| }); | ||
|
|
||
| console.log('BFI2 MUTATION RESULT:', deepSort(mutationResult, 'id')); |
Contributor
There was a problem hiding this comment.
Remove debug logging: Remove the console.log in the pf2 test (BFI2 MUTATION RESULT) if not needed.
Suggested change
| console.log('BFI2 MUTATION RESULT:', deepSort(mutationResult, 'id')); |
| { | ||
| $relation: 'UserTag', | ||
| $op: 'delete', | ||
| $id: ['bfi2-test-tag', 'bfi2-test-tag-1', 'bfi2-test-tag-2'], |
Contributor
There was a problem hiding this comment.
It appears that the deletion array includes the id 'bfi2-test-tag', but only 'bfi2-test-tag-1' and 'bfi2-test-tag-2' are created. Is 'bfi2-test-tag' a typo, and should it be removed or corrected?
Suggested change
| $id: ['bfi2-test-tag', 'bfi2-test-tag-1', 'bfi2-test-tag-2'], | |
| $id: ['bfi2-test-tag-1', 'bfi2-test-tag-2'], |
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.
Important
Enhance
buildSURQLMutationto handle$tempIdin metadata, update Docker command to--strictmode, and add test cases for mutation outputs with$fields.build.ts,buildSURQLMutationnow processes$tempIdin metadata, converting it to'_:'format.OUTPUTstring to includemetaStringwith$tempIdhandling.test.sh, Docker command updated to use--strictmode for SurrealDB.basic.tsto test mutation outputs with$fields.basic.tsfor debugging purposes.This description was created by
for fd0e38b. You can customize this summary. It will automatically update as commits are pushed.