Skip to content

fix(models): reject future-dated cache entries#229

Open
andrei-hasna wants to merge 1 commit into
mainfrom
hotfix/future-model-cache
Open

fix(models): reject future-dated cache entries#229
andrei-hasna wants to merge 1 commit into
mainfrom
hotfix/future-model-cache

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Why

A cache entry timestamped in the future can appear fresh indefinitely until wall-clock time catches up. With clock skew or a malformed timestamp, that can keep a stale model catalog active instead of fetching current data.

What

  • Require cached entries to have a nonnegative age as well as remain within the configured TTL.
  • Add a regression proving that a future-dated entry triggers a refetch.

Tests

Local verification:

  • just test -p codex-models-manager (80 tests passed)

@andrei-hasna
andrei-hasna force-pushed the hotfix/future-model-cache branch from bf78934 to 16257fc Compare July 15, 2026 00:50
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.

1 participant