Skip to content

Add @pegma/cache-redis (Cache Core Phase 2) - #2

Merged
FlyOverCoderKY merged 4 commits into
mainfrom
cursor/cache-redis-phase-2-7ec0
Aug 15, 2026
Merged

FlyOverCoderKY merged 4 commits into
mainfrom
cursor/cache-redis-phase-2-7ec0

Conversation

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor

Phase 2 only: a generic Redis adapter over the Phase 1 CacheStore port.

What landed

  • New public package @pegma/cache-redis (packages/cache-redis)
  • Injected Redis client stays behind the port; hosts depend on CacheStore
  • TTL / sliding refresh / XFetch read the injected Spine Clock (not Redis EXPIRE)
  • Tag invalidation uses a sidecar Redis set per tag, one key at a time — hash tags remain formatting
  • Conformance runs against a real Redis (pnpm run test:redis)
  • CI keeps the Phase 1 Node 22/24 matrix and adds a Redis service job
  • Plan / README / release inventory updated in-tree; still unpublished (0.1.0)

Named future hosts: RetireGolden.org and Exsimplify. No Azure Redis, ElastiCache, or Upstash packages.

How to verify

pnpm run format:check
pnpm run check
pnpm test
pnpm run test:redis

Do not merge, publish, or tag from this PR.

Open in Web Open in Cursor 

Phase 2 lands a generic Redis CacheStore adapter with clock-driven TTL,
a sidecar tag index, and no implicit multi-key commands. CI keeps the
Phase 1 Node matrix and adds a Redis service job.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

The ioredis client is now pinged in beforeAll, and get treats a
corrupt envelope separately from a backend I/O failure.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5897c5ec7c

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cache-redis/src/index.ts Resolved
Comment thread packages/cache-redis/src/index.ts Resolved
Comment thread packages/cache-redis/src/index.ts Resolved
Comment thread packages/cache-redis/src/index.ts Resolved
Sliding get now compare-and-sets the envelope it read so a concurrent
set is not restored. invalidateTags drops stale tag memberships instead
of deleting an entry that no longer carries that tag.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4e180fd. Configure here.

Comment thread packages/cache-redis/src/index.ts Resolved
A lost compare-and-set no longer mutates the in-memory envelope, so get
does not advertise an extended expiresAt that Redis never stored.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
@FlyOverCoderKY
FlyOverCoderKY merged commit 6049a83 into main Aug 15, 2026
7 checks passed
@FlyOverCoderKY
FlyOverCoderKY deleted the cursor/cache-redis-phase-2-7ec0 branch August 15, 2026 17:30
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