Squashed commit of the following:#391
Conversation
- Clamp the stderr batch-count preview in lookup-all/discover-all to 1...maxRecordsPerRequest, fixing a division-by-zero when --batch-size 0 - Use CloudKitService.maxRecordsPerRequest instead of the literal 200 for the batchSize defaults in LookupConfig/DiscoverConfig - Stop wrapping CloudKitError in LookupError in LookupAllRecordsCommand so it propagates structured errors like DiscoverAllUserIdentitiesCommand - Remove the transparent makeLookupRecordsService alias; call makeUserService directly and add a test asserting a failing batch throws and stops the loop - Clarify the singleBatch comment and the CLAUDE.md no-arg discover annotation https://claude.ai/code/session_01CiP2JokL5xB62ctP1iFasJ
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Code Review — PR #391 (issues follow-up for #389 auto-chunking)This review covers the 7-file delta that PR #391 adds on top of PR #389's batch-chunking implementation. The core engine ( OverviewPR #391 fills in the MistDemo surface and expands the test suite that were missing or incomplete in PR #389:
The implementation is clean and follows project conventions. One bug and a few smaller issues below. Bug: Division by Zero in Batch Logging
let batches = (config.emails.count + config.batchSize - 1) / config.batchSizeIf a user passes Fix: clamp before the log line, or derive the count post-call: let clampedSize = max(1, min(config.batchSize, CloudKitService.maxRecordsPerRequest))
let batches = (config.emails.count + clampedSize - 1) / clampedSizeAsymmetric Error Handling Between the Two Commands
If Test:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 307-auto-paginating-extension #391 +/- ##
=================================================================
+ Coverage 69.58% 69.77% +0.18%
=================================================================
Files 165 165
Lines 3758 3758
=================================================================
+ Hits 2615 2622 +7
+ Misses 1143 1136 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The batchSize default arguments on the public LookupConfig/DiscoverConfig initializers reference CloudKitService.maxRecordsPerRequest, which requires the MistKit import to be public rather than internal. https://claude.ai/code/session_01CiP2JokL5xB62ctP1iFasJ
commit de82483
Author: Leo Dion leogdion@brightdigit.com
Date: Sun May 17 21:14:35 2026 +0100
commit 24c8719
Author: Leo Dion leogdion@brightdigit.com
Date: Sun May 17 21:14:31 2026 +0100
commit eee0670
Author: Leo Dion leogdion@brightdigit.com
Date: Sun May 17 21:14:13 2026 +0100
commit 4d60b19
Author: Leo Dion leogdion@brightdigit.com
Date: Sun May 17 20:10:45 2026 +0100
commit 5bc403d
Author: Leo Dion leogdion@brightdigit.com
Date: Sun May 17 20:10:40 2026 +0100
commit bce1f23
Author: leogdion leogdion@brightdigit.com
Date: Sun May 17 20:09:47 2026 +0100
commit 7023a31
Author: leogdion leogdion@brightdigit.com
Date: Fri May 15 12:56:58 2026 -0400
commit f799128
Author: leogdion leogdion@brightdigit.com
Date: Thu May 14 20:27:28 2026 -0400
commit 418e2e4
Author: leogdion leogdion@brightdigit.com
Date: Thu May 14 16:03:04 2026 -0400
commit d65d20b
Author: leogdion leogdion@brightdigit.com
Date: Thu May 14 11:25:10 2026 -0400
commit a28ab3c
Author: leogdion leogdion@brightdigit.com
Date: Mon May 11 16:31:10 2026 -0400
commit 7a5da7a
Author: leogdion leogdion@brightdigit.com
Date: Sat May 9 17:09:53 2026 -0400
commit b3626c0
Author: leogdion leogdion@brightdigit.com
Date: Sat May 9 16:06:20 2026 -0400
commit 6f92a71
Author: leogdion leogdion@brightdigit.com
Date: Fri May 8 13:16:56 2026 -0400
commit a1e2162
Author: leogdion leogdion@brightdigit.com
Date: Fri May 8 07:16:10 2026 -0400
commit c62bf44
Author: leogdion leogdion@brightdigit.com
Date: Thu May 7 15:52:45 2026 -0400
commit 7c4b678
Author: leogdion leogdion@brightdigit.com
Date: Thu May 7 11:27:10 2026 -0400
commit f14e751
Author: leogdion leogdion@brightdigit.com
Date: Thu May 7 11:27:07 2026 -0400
commit a0f0af9
Author: leogdion leogdion@brightdigit.com
Date: Thu May 7 11:26:32 2026 -0400
commit 125dab5
Author: leogdion leogdion@brightdigit.com
Date: Thu May 7 11:01:18 2026 -0400
commit f989fd1
Author: leogdion leogdion@brightdigit.com
Date: Thu May 7 10:23:23 2026 -0400
commit b0f00a7
Author: leogdion leogdion@brightdigit.com
Date: Thu May 7 10:18:52 2026 -0400
commit 63a4e50
Author: leogdion leogdion@brightdigit.com
Date: Thu May 7 10:09:27 2026 -0400
commit ae1af15
Author: leogdion leogdion@brightdigit.com
Date: Wed May 6 20:20:44 2026 -0400
commit 5475bfa
Author: leogdion leogdion@brightdigit.com
Date: Tue May 5 20:21:32 2026 -0400
commit 8b21425
Author: leogdion leogdion@brightdigit.com
Date: Tue May 5 20:21:17 2026 -0400
commit 9709f3d
Author: leogdion leogdion@brightdigit.com
Date: Tue May 5 08:54:16 2026 -0400
commit d53467a
Author: leogdion leogdion@brightdigit.com
Date: Mon May 4 12:49:25 2026 -0400
commit d7b1a21
Author: Leo Dion leogdion@brightdigit.com
Date: Thu Apr 30 09:39:09 2026 -0400
commit 0ab2ab6
Author: leogdion leogdion@brightdigit.com
Date: Wed Apr 29 15:49:34 2026 -0400