test: formalize store contract tests (#162 step 4/4)#177
Conversation
Expand storage.shared.ts with comprehensive contract tests covering all 21 Store interface methods: - Queue invariants: idempotent trigger, concurrency key exclusion - Lease atomicity: renewLease/completeRun/failRun generation guards - State transitions: terminal monotonicity, cancelRun, expired lease recovery - Step contract: persist with guard, delete, replay consistency - Batch and cleanup: enqueueMany, deleteRun cascade, purgeRuns cutoff - Progress and logs: updateProgress, createLog/getLogs round-trip - Edge cases: empty queue, pagination, filter combinations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 12 minutes and 52 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughストレージのテストスイートが大幅に拡張され、enqueueMany、renewLease、completeRun/failRun、updateProgress、cancelRun、releaseExpiredLeases、deleteRun/deleteSteps、ログ・進捗リプレイ、クエリヘルパー、purgeRuns 等の動作を検証する多数の新規テストが追加されました。 Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
- Split completeRun/failRun tests into separate it() blocks: one for terminal state persistence, one for stale generation rejection - Replace direct DB queries in deleteRun test with getSteps/getLogs (keep labels DB query since no public API exists for label lookup) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The directConcurrentClaim test runs 25 iterations of parallel claim races with cleanup between each. Under load (CI, PostgreSQL Testcontainers), this can exceed the default 5s timeout. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
storage.shared.tswith comprehensive contract tests for all 21 Store interface methodsTest Categories
Context
Final step (4/4) of #162 (core internal restructuring). Completes the issue.
Test plan
pnpm validatepasses🤖 Generated with Claude Code
Summary by CodeRabbit