Skip to content

feat(runtime): add tenant-scoped Redis provider - #110

Merged
XnLemon merged 4 commits into
mainfrom
codex/108-redis-runtime-provider
Sep 2, 2026
Merged

feat(runtime): add tenant-scoped Redis provider#110
XnLemon merged 4 commits into
mainfrom
codex/108-redis-runtime-provider

Conversation

@XnLemon

@XnLemon XnLemon commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the tenant-scoped Redis runtime provider requested by #108.

  • Adds Redis RuntimeStore and MemoryStore with atomic WATCH/MULTI updates.
  • Covers Session/Event, inbound idempotency, event history, Reply Outbox, leases/fencing, retry/dead-letter, memory persistence, and index handoff.
  • Wires explicit Redis bootstrap configuration, readiness PING, bounded timeouts, pool sizing, secret scoping, and fail-closed startup.
  • Keeps the Redis ingress/outbox primary while Backend Profiles may independently select Redis or the existing in-memory provider for each tenant.
  • Adds local Compose Redis service and updates runtime, deployment, README, and operations status documentation.
  • Adds regression coverage for Redis cancellation priority, non-Redis source errors, and primary/fallback shutdown after bootstrap failure.

Issue ledger

  • Redis RuntimeStore contract and MemoryStore capability.
  • Tenant-scoped keys and atomic event/CAS/lease/fencing transitions.
  • A Redis Profile for one tenant and an in-memory Profile for another materialize separate Session/Memory providers without shared state.
  • Bootstrap/readiness/shutdown lifecycle and fail-closed unavailable backend.
  • Deployment/configuration and operations status documentation.
  • Formatting, tests, race, vet, build, lint, MkDocs strict, Compose config validation, and coverage.

Non-goals

S3/OSS, Qdrant/Milvus/pgvector, Redis-to-PostgreSQL migration/cutover tooling, OIDC/JWT admin auth, expanded tool policy, and rich IM work remain out of scope.

Validation

  • go test ./...
  • go test -race ./trpcservice/bootstrap ./trpcservice/runtime/storage/redis
  • go vet ./...
  • go build ./...
  • golangci-lint run
  • bash scripts/coverage.sh
  • python -m mkdocs build --strict (from docs/)
  • docker compose --env-file deploy/example.env -f deploy/docker-compose.yml config

Live Redis reconnect tests are opt-in via REDIS_RUNTIME_TEST_ADDR and skip explicitly when unset.

Closes #108

@XnLemon
XnLemon deployed to telegram-e2e September 1, 2026 11:03 — with GitHub Actions Active
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.65170% with 131 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
trpcservice/runtime/storage/redis/redis.go 88.25% 44 Missing and 40 partials ⚠️
trpcservice/bootstrap/environment.go 76.26% 25 Missing and 22 partials ⚠️

📢 Thoughts on this report? Let us know!

Comment thread trpcservice/bootstrap/environment.go
@XnLemon
XnLemon deployed to telegram-e2e September 1, 2026 11:44 — with GitHub Actions Active
@XnLemon
XnLemon deployed to telegram-e2e September 1, 2026 12:33 — with GitHub Actions Active

@XnLemon XnLemon left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM

@XnLemon
XnLemon deployed to telegram-e2e September 1, 2026 14:00 — with GitHub Actions Active

@XnLemon XnLemon left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM

@XnLemon XnLemon self-assigned this Sep 2, 2026
@XnLemon
XnLemon merged commit 87e027f into main Sep 2, 2026
16 of 17 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.

runtime/storage: add tenant-scoped Redis runtime provider

1 participant