Skip to content

fix(redis): prefix temporal baseline lock - #7595

Merged
koala73 merged 2 commits into
mainfrom
fix/redis-prefixed-mget
Sep 3, 2026
Merged

fix(redis): prefix temporal baseline lock#7595
koala73 merged 2 commits into
mainfrom
fix/redis-prefixed-mget

Conversation

@koala73

@koala73 koala73 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Why

Issue #7575 found that the temporal-anomalies rebuild lock bypassed the Redis deployment key prefix. Preview deployments could therefore contend on the production lock while their cache reads and writes used a preview namespace.

The fix uses the existing setCachedJsonIfAbsent contract. That helper applies the deployment prefix and preserves the existing NX and expiry behavior.

Scope

  • tryAcquireLock in server/worldmonitor/infrastructure/v1/list-temporal-anomalies.ts now uses setCachedJsonIfAbsent.
  • The private raw Redis command builder is removed.
  • tests/temporal-anomalies-cache.test.mts verifies the preview lock key.
  • The original mgetJson helper is already removed from current main by fix(baselines): validate and rate-sample browser-reported baseline writes #7573. This PR fixes the remaining live raw lock path.

Blast Radius

This changes only the temporal-anomalies rebuild lock. Production keeps the unprefixed key. Preview and development deployments now use their own prefixed lock keys. The stale-cache fallback and lock contention behavior remain unchanged.

Verification

  • Red proof before the fix: 44 passed and 1 failed because the preview lock used baseline:lock.
  • Focused regression after the fix: 45 passed and 0 failed.
  • npm run typecheck:api passed.
  • npm run lint:boundaries passed.
  • npm run lint passed. The repository reported 53 existing warnings and 12 infos.
  • npm run test:data passed with 29,746 passed, 0 failed, and 37 skipped.

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
worldmonitor Ready Ready Preview Sep 3, 2026 12:48pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T12:45:25.958778Z e14c549 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@koala73
koala73 enabled auto-merge (squash) September 3, 2026 12:46
@koala73
koala73 merged commit f450884 into main Sep 3, 2026
43 checks passed
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