Repository navigation
Add @pegma/cache-upstash-redis (Cache Core Phase 5) - #5
Merged
Merged
Conversation
Phase 5 lands a CacheStore adapter for Upstash Redis by wrapping the serverless HTTP client and reusing createRedisCacheStore after adapting that client's command surface. The REST client cannot speak the Redis protocol, so CI injects an Upstash-shaped client against the same Redis the other adapters use. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
|
You have reached your Codex usage limits for security reviews. Please try again later. |
The REST client surface takes a readonly args array; the observer must copy it before assigning to a mutable test fixture. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 5 lands
@pegma/cache-upstash-redis0.1.0, aCacheStoreadapter for the Upstash serverless Redis client.Decision
Azure Cache for Redis and ElastiCache speak the Redis protocol, so those packages compose
@pegma/cache-redisand inject ioredis. Upstash's distinctive client is HTTP REST (@upstash/redis), not that TCP surface: nogetBuffer, andevalis(script, keys, args)rather than ioredis(script, numKeys, ...).This package wraps that REST command surface and reuses
createRedisCacheStoreafter adapting it. Envelopes travel as base64 strings so Lua compare-and-set still sees the same bytes the HTTP client stored. The adapter does not pretend@upstash/redisis ioredis, and it does not invent implicit cross-partition multi-key ops.CI
@upstash/rediscannot talk to the Redis protocol service the other adapters use. There is no live Upstash account in CI.pnpm run test:upstash-redisinjects a client with the Upstash command surface that talks to the same Redis on port 16379, and still runs@pegma/cache-conformance. PointUPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKENat a real Upstash database to run the same cases through the official SDK.Also
@pegma/*deps pinned exactly.prepackbuilds, tsconfig excludes tests.AGENTS.mdnow treat Phase 5 as the current stage. No further adapter packages.Does not publish, release, or tag.
Verification
pnpm run format:check,pnpm run check,pnpm test, andpnpm run test:upstash-redisall pass.