Skip to content

test(validation): add entity tuple validation regression assertions - #3104

Open
gcoinstash-cmd wants to merge 7 commits into
Permify:masterfrom
gcoinstash-cmd:test/entity-validation-regression-1788133683
Open

test(validation): add entity tuple validation regression assertions#3104
gcoinstash-cmd wants to merge 7 commits into
Permify:masterfrom
gcoinstash-cmd:test/entity-validation-regression-1788133683

Conversation

@gcoinstash-cmd

@gcoinstash-cmd gcoinstash-cmd commented Aug 30, 2026

Copy link
Copy Markdown

Summary

  • Validates entity tuple checks.
  • go test: 11/11 specs passed.

Summary by CodeRabbit

  • Performance Improvements
    • Improved bulk data writing by grouping relationship and attribute records into batches.
    • Reduced overhead when processing large data sets.
    • Empty data collections are now handled without unnecessary database operations.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 52531084-3cd0-4f75-9232-c6af84127e58

📥 Commits

Reviewing files that changed from the base of the PR and between e00d052 and cf628ec.

📒 Files selected for processing (1)
  • internal/storage/postgres/data_writer.go

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The Postgres data writer now queues chunked squirrel insert statements for relationships and attributes. Each statement contains up to 500 rows. Empty collections return without queuing statements.

Changes

Postgres batch writes

Layer / File(s) Summary
Chunked insert builders
internal/storage/postgres/data_writer.go
batchInsertRelationships and batchInsertAttributes use squirrel statements with chunks of up to 500 rows. Relationship inserts retain ON CONFLICT ... DO NOTHING. Empty inputs return early. Attribute values are marshaled to JSON before insertion.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to cf628

The PR batches relationship and attribute writes while preserving duplicate-ignore behavior; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title describes entity tuple validation regression tests, but the summarized changes implement batched PostgreSQL inserts in data_writer.go. The title does not describe the main changeset. Rename the title to describe the PostgreSQL batch insert implementation, or update the changeset so it contains the validation regression assertions described by the title.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Warning

⚠️ This pull request shows signs of AI-generated slop (description_diff_mismatch). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant