Skip to content

fix: preserve original expiration window on stale claim reclaim

34fd8d3
Select commit
Loading
Failed to load commit list.
Closed

fix: preserve original expiration window on stale claim reclaim #13

fix: preserve original expiration window on stale claim reclaim
34fd8d3
Select commit
Loading
Failed to load commit list.
DS-Review / DS-Review succeeded May 6, 2026 in 0s

DS-Review completed

PR Review

PR: fix: preserve original expiration window on stale claim reclaim

Important

Verdict: Request changes — tests must assert that expires_at is preserved after reclaim to prevent regression.

Findings

Pri Location Finding Action
P2 tests/test_store.py:325 Missing assertion that expires_at is preserved after reclaim Add assertion comparing commit's expires_at to original value
P2 tests/test_async_client.py:312 Missing assertion that expires_at is unchanged and cache hit works Add expires_at assertion and second submission to confirm cache hit
P3 tests/test_async_client.py:282 Test name includes "with_ttl" but no TTL is set Rename test to reflect actual scenario

Notes

  • Both new tests validate that stale claims are reclaimed and function re-executes, but neither checks that the original expires_at is preserved. Without these assertions, a regression that recalculates expires_at would not be caught.
  • The async test also does not verify that a subsequent submission returns from cache without re-execution.

What To Do Next

  • Add assertions for expires_at in both test_reclaimed_stale_claim_keeps_original_expires_at and test_cached_task_with_ttl_and_stale_reclaim.
  • In the async test, add a second submit call to confirm the cache hit (counter should not increment).