Skip to content

Conversation

@tudddorrr
Copy link
Collaborator

No description provided.

@tudddorrr tudddorrr added the enhancement New feature or request label Dec 2, 2025
@claude
Copy link

claude bot commented Dec 2, 2025

🔵 Test Coverage

This PR introduces important behavioral changes (job deduplication via jobId) but lacks test coverage. Consider adding tests to verify:

// Test that duplicate cache clear requests are deduplicated
test('should deduplicate multiple cache clear requests for the same key', async () => {
  const key = 'channels-search-123-*'
  
  // Queue multiple clears for the same key
  await Promise.all([
    deferClearResponseCache(key),
    deferClearResponseCache(key),
    deferClearResponseCache(key)
  ])
  
  const queue = getGlobalQueue('clear-response-cache')
  const jobs = await queue.getJobs(['waiting', 'active'])
  
  // Should only have 1 job due to deduplication
  expect(jobs.filter(j => j.id === `clear-cache-${key}`)).toHaveLength(1)
})

Summary

The implementation looks solid - using jobId for deduplication is the correct approach, and the cleanup options prevent job accumulation. The main gap is test coverage for this behavioral change.

@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.21%. Comparing base (3168693) to head (7b6ceed).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #713   +/-   ##
========================================
  Coverage    99.21%   99.21%           
========================================
  Files          226      226           
  Lines        16637    16641    +4     
  Branches      1542     1541    -1     
========================================
+ Hits         16506    16510    +4     
  Misses         128      128           
  Partials         3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tudddorrr tudddorrr merged commit b854960 into develop Dec 2, 2025
6 checks passed
@tudddorrr tudddorrr deleted the unique-response-cache-clearing branch December 2, 2025 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants