Practice workspaceY
Independent change review Try the unfamiliar review
SIMULATED REVIEW WORKBENCH
Transfer: review cache expiry
Review an unfamiliar cache change. Separate a demonstrated boundary regression from a clock hypothesis and assess the claimed test evidence. Everything below is simulated.
First submission records limited independent evidence-link accuracy. Later revisions are practice. Written findings and summaries are not semantically graded or certified. No tests execute here.
Inspect the change
contract: Cache contract
now and expiresAt are integer milliseconds from the same injected clock. An entry is expired when now >= expiresAt. read must return undefined for an expired entry.
diff: Proposed diff
cache.ts:2 const now = clock.now(); // unchanged
cache.ts:6 - if (entry.expiresAt <= now) return undefined;
cache.ts:6 + if (entry.expiresAt < now) return undefined;
return entry.value;
cache.test.ts:18 - expect(read(key)).toBeUndefined();
cache.test.ts:18 + expect(() => read(key)).not.toThrow();
// Fixture: now=1000, expiresAt=1000, entry.value="saved".trace: Captured example
Simulated trace: now=1000, expiresAt=1000, result="saved". At now=1001 result=undefined. At now=999 result="saved". No actual cache service was accessed.
tests: Test evidence
Simulated report: cache.test.ts passes. Returning "saved" instead of undefined does not throw and therefore satisfies the proposed assertion. No other expiry tests are supplied.
note: Reviewer message
A teammate blames slow clock synchronization. The fixture supplies no timing measurements; both values use the same injected clock.
Write your review
Add only findings you can substantiate. For each, name the impact in your own words and cite the evidence that supports it.
Draft recovery is limited to this browser tab. Save a revision for server persistence. Five revisions per case; saved revisions remain available in learning-data export/reset.