Skip to content

fix(skills): expire cache entries at deadline - #3896

Merged
Sayt-0 merged 1 commit into
mainfrom
fix/skills-cache-expiry-boundary
Aug 3, 2026
Merged

fix(skills): expire cache entries at deadline#3896
Sayt-0 merged 1 commit into
mainfrom
fix/skills-cache-expiry-boundary

Conversation

@Sayt-0

@Sayt-0 Sayt-0 commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

  • treat cache entries as stale when the current time equals their expiry deadline
  • prevent zero-freshness entries from being reused on coarse-resolution clocks such as Windows
  • preserve existing behavior for entries whose expiry remains in the future

Context

The Windows test in Actions run 30802380958, job 91649724192 failed because TestDiskCache_Get_Expired received a cache hit for max-age=0.

Cache metadata is serialized to JSON, which removes Go's monotonic clock reading. On Windows, a subsequent wall-clock read can equal ExpiresAt. The previous strict After comparison treated that boundary instant as fresh. Using an inclusive expiry check implements now >= ExpiresAt semantics.

Validation

  • go test -count=100 -run '^(TestDiskCache_Get_Expired|TestDiskCache_No(Store|Cache)StoresButExpiresImmediately)$' ./pkg/skills
  • go test ./pkg/skills
  • task test
  • task lint
  • task build
  • task check-plan-cross
  • Windows cross-compilation of the pkg/skills test binary

@Sayt-0
Sayt-0 requested a review from a team as a code owner August 3, 2026 12:45
@Sayt-0
Sayt-0 merged commit 29683a8 into main Aug 3, 2026
15 checks passed
@Sayt-0
Sayt-0 deleted the fix/skills-cache-expiry-boundary branch August 3, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants