fix: preserve original expiration window on stale claim reclaim #13
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_atis preserved. Without these assertions, a regression that recalculatesexpires_atwould 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_atin bothtest_reclaimed_stale_claim_keeps_original_expires_atandtest_cached_task_with_ttl_and_stale_reclaim. - In the async test, add a second
submitcall to confirm the cache hit (counter should not increment).
Loading