Skip to content

Fix delete commits count#2218

Merged
myieye merged 1 commit intodevelopfrom
claude/fix-delete-commits-count-OSKxU
Mar 27, 2026
Merged

Fix delete commits count#2218
myieye merged 1 commit intodevelopfrom
claude/fix-delete-commits-count-OSKxU

Conversation

@myieye
Copy link
Copy Markdown
Collaborator

@myieye myieye commented Mar 24, 2026

A random bug that AI happened to notice:
We were/are counting commits in the DB after we delete them from the DB 😆.

@github-actions github-actions bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Mar 24, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 24, 2026

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

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2916bbee-4c90-430a-b810-9e8e0664c4f0

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
📝 Walkthrough

Walkthrough

The DeleteCommitsAfter method in SnapshotAtCommitService.cs has been refactored to materialize the commit count asynchronously using CountAsync() before deletion, replacing the synchronous count operation on the query with a precomputed async result.

Changes

Cohort / File(s) Summary
Async Count Materialization
backend/FwLite/LcmCrdt/SnapshotAtCommitService.cs
Modified DeleteCommitsAfter to await CountAsync() and store result in a variable, replacing synchronous Count() call on the query with the precomputed asynchronous count value.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A hop and await, the counts now flow,
Async and swift, no sync to slow,
Commits counted with grace and care,
Deletion done with awaited flair! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly addresses the main change: fixing a bug where delete commits count was being performed after deletion instead of before.
Description check ✅ Passed The description clearly explains the bug being fixed: counting commits after deletion instead of before, resulting in 0 count instead of the actual number deleted.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fix-delete-commits-count-OSKxU

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 and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 24, 2026

UI unit Tests

  1 files  ±0   54 suites  ±0   25s ⏱️ ±0s
140 tests ±0  140 ✅ ±0  0 💤 ±0  0 ❌ ±0 
207 runs  ±0  207 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 52fa165. ± Comparison against base commit 6537f4c.

♻️ This comment has been updated with latest results.

@argos-ci
Copy link
Copy Markdown

argos-ci bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Mar 25, 2026, 3:37 PM

@myieye myieye force-pushed the claude/fix-delete-commits-count-OSKxU branch from 75b0d87 to 774e059 Compare March 24, 2026 12:25
@myieye myieye force-pushed the claude/fix-delete-commits-count-OSKxU branch from 774e059 to 52fa165 Compare March 25, 2026 15:34
@myieye myieye merged commit bffca11 into develop Mar 27, 2026
20 checks passed
@myieye myieye deleted the claude/fix-delete-commits-count-OSKxU branch March 27, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants