Skip to content

[claude] Fail pushes of commit Ids that belong to another project - #3013

Open
myieye wants to merge 2 commits into
developfrom
claude/crdt-commit-id-collision
Open

myieye wants to merge 2 commits into
developfrom
claude/crdt-commit-id-collision

Conversation

@myieye

@myieye myieye commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

[Claude, autonomous]

Commits whose Id already exists under a different project were silently skipped by the merge, so the push returned OK and the client re-sent them every sync. They now throw (500, nothing from that push is committed); same-project resends are still skipped. No existing collisions found. The extra check only runs when fewer rows were inserted than pushed.

The new tests need the DB and run only in CI.

🤖 Generated with Claude Code

AddCommits skipped these silently, so the client re-sent them forever.
Same-project resends are still skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the 📦 Lexbox issues related to any server side code, fw-headless included label Nov 19, 2026
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bf68eab5-24c6-4b88-8bac-99df715dc36e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

AddCommits now documents that duplicate commit IDs already stored in the same project are skipped. After the merge, it checks uninserted IDs for matches stored under another project. If it finds a collision, it throws an InvalidOperationException before committing the transaction. Tests cover same-project duplicates and cross-project collisions.

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

Change: Bug fix

Possibly related PRs

Suggested reviewers: hahn-kev

Merge Risk: Minimal · previous review b36d2

Pushes that contain a commit ID already stored under a different project now fail instead of being silently skipped and resent on every sync. Resends within the same project are still skipped. No concrete defect was found in the change, and the author reports no existing collisions, so it appears ready to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main behavior change: pushes that contain commit IDs already stored under a different project now fail instead of being silently skipped. The raw summary confirms the throw of Inva…
Description check Passed The description states the problem: commits whose IDs already exist under another project were skipped silently, so clients re-sent them on every sync. It describes the new behavior (500 error, no com…
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: Title check

Explanation

The title names the main behavior change: pushes that contain commit IDs already stored under a different project now fail instead of being silently skipped. The raw summary confirms the throw of InvalidOperationException for cross-project collisions in CrdtCommitService.AddCommits, with matching tests. The title is specific and on-topic. The '[claude]' prefix is a tag that adds no meaning, but it does not make the title misleading.

Full details: Description check

Explanation

The description states the problem: commits whose IDs already exist under another project were skipped silently, so clients re-sent them on every sync. It describes the new behavior (500 error, no commits from that push, same-project resends still skipped), the conditional collision check, and the test setup. It is directly related to the changeset.

Finishing Touches

Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks each commit ID,
Same-project copies stay in stride.
A cross-project clash stops the run,
The transaction waits until checks are done.
Then carrots celebrate the batch!

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 26334f1b-b30f-4976-a978-c525188db704
Commits

Reviewing files that changed from the base of the PR and between 322d78d and b36d277.

Files selected for processing: 2

  • backend/LexBoxApi/Services/CrdtCommitService.cs
  • backend/Testing/LexCore/Services/CrdtCommitServiceTests.cs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Dropping it after the commit failed with "Transaction is already completed"
once AddCommits ran the collision check. Count pushed rows from the bulk copy
instead of querying the temp table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

📦 Lexbox issues related to any server side code, fw-headless included

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant