Skip to content

feat(runtime)!: replace Redis with Valkey 9.1.2 - #149

Merged
RentnerKev merged 1 commit into
mainfrom
codex/valkey-migration
Oct 1, 2026
Merged

RentnerKev merged 1 commit into
mainfrom
codex/valkey-migration

Conversation

@RentnerKev

@RentnerKev RentnerKev commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Replace bundled Redis with Valkey 9.1.2 for the Beta 1 appliance, development configuration and CI. Pin both official Valkey images by digest, retain the native Bun RESP client, and preserve the single-container layout, non-root cache process, loopback binding and transient cache policy.

Rename application cache services, Foundation health and all eight UI translations. Preserve immutable Redis-based Alpha fixtures and the historical v4 backup field. Add real Valkey coverage for server-side disconnect/reconnect, Pub/Sub, concurrent Lua/TTL operations and single-consumption authentication challenges, plus appliance checks for binaries, licenses and cache reset. Document installation, upgrades and rollback.

Related issue

Closes #148. Milestone: v1.0.0-beta.1.

Type of change

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • CI / tooling
  • Dependency update
  • Other: breaking deployment/configuration change

Testing

Passed locally:

  • bun --no-env-file run typecheck and bun --no-env-file run lint.
  • Web unit suite: 918 passed, 0 failed; database/cache integration tests disabled for this unit run.
  • Eight integration tests against isolated real Valkey 9.1.2: 8 passed, 0 failed (36 assertions).
  • bun --no-env-file run test:fuzz: 24 passed, 0 failed.
  • bun --no-env-file run build:web and formatting of all changed supported files.
  • Pinned Valkey binaries in the PostgreSQL runtime base: dynamic linking, non-root startup and ephemeral loopback configuration passed after build-dependency removal.
  • Actual Valkey process failure on the exact built image, isolated with --network none: appliance exits with code 1, restarts healthy, discards transient cache and preserves its application identity.

Exact head 409c7666dbbd368ea12b2acf1b86d26a5b300ee0: core CI passed, including all 1,072 web tests against PostgreSQL 18.6/Valkey 9.1.2, 208 Rust tests, formatting, lint, types, fuzz and build. The local full appliance smoke passed all 53 checks, including cache reset, restart, backup/restore and Alpha 1/3 upgrades. The short current reliability run also passed with no known limitations. All 24 regular PR checks passed, including Production Smokes, CodeQL, Gitleaks and Dependency Review. The full published-Alpha matrix passed fresh installation and all six published Alpha upgrades.

The manually started 30-minute current/Alpha-6 run was cancelled at the owner's request: long profiles are release preparation, not a per-PR gate. No completed long-run evidence is claimed here; rerun it on the exact release candidate under #75.

Container comparison: Trivy 0.75.0 (official image digest sha256:af6acf9a6b85dfe389a1941505c0ce9efef52a4719635e1a962f022a3d855daa) scanned the built PR image and unchanged 492aca6 baseline with the identical vulnerability database (updated 2026-10-01 19:00 UTC; SHA-256 04da019ee567fb7389ec7d4ca9c534ea25feae3b377c4579870b30fd98357120). It detected 0 added findings. The PR image has 3 critical / 135 high findings versus 3 critical / 141 high in the baseline. Existing critical findings remain in libxml2 (CVE-2026-6653) and the embedded Go standard libraries in esbuild and gosu (CVE-2025-68121). Their runtime reachability has not been established; #72 must triage/remediate these before release. The new explicit libsystemd0 dependency is already present at the same version in the pinned PostgreSQL base.

Trivy does not recognize the copied Valkey C binaries as a package, so absence of Valkey findings is not a security clearance. Valkey 9.1.2 is the upstream patched version for the latest Lua debugger and RDMA advisories. No RDMA listener or systemd supervision is enabled.

Checklist

  • I tested the relevant functionality.
  • Existing tests pass, including the full Docker/CI checks.
  • I added or updated tests where appropriate.
  • This PR does not include secrets, credentials, production data, or private certificates/keys.
  • I updated documentation where necessary.
  • I linked the relevant issue for a feature or fix, or explained why no issue is needed.

Breaking changes

  • Root Compose now requires RENTNERPROXY_IMAGE. Replace the old Alpha 6 literal image with the repository's selector and set it to a Valkey-based image; keep the same Compose project, existing volume, ports, public origin and SMTP configuration. Until a release exists, build rentnerproxy:local from this checkout. No unpublished Beta image is assumed.
  • Development uses VALKEY_URL instead of REDIS_URL; the old variable is not read. The bundled production runtime supplies its URL internally. redis://, rediss://, Bun's RedisClient, Lua redis.call and native protocol error codes remain protocol/client identifiers.
  • Foundation health exposes valkey in place of redis; update consumers of that field.
  • Cache counters, pending authentication challenges and Pub/Sub delivery reset during the switch. Durable users, sessions, configuration and certificate state stay in PostgreSQL/controller storage. Backup v4's historical redis: "excluded" field remains readable and unchanged.
  • Retain a source-release backup, exact source image and deployment configuration before upgrading. Rollback restores that source backup into a fresh volume and uses the recorded source image; never start an old image on a database migrated by a newer image.

Final release publication remains separately gated by #75, including the planned scale/security reviews (#70, #72).

Screenshots

None. The existing status card now identifies Valkey in all supported languages.

Summary by CodeRabbit

  • New Features
    • Production deployments now use Valkey for caching and realtime messaging. Compose requires an explicit RENTNERPROXY_IMAGE value, with instructions for building and selecting a local image.
    • Foundation health checks now report Valkey status.
  • Upgrade Notes
    • Set VALKEY_URL in place of REDIS_URL; the legacy variable is no longer read. Use a Valkey-based image when upgrading.
    • Switching cache engines resets transient counters, authentication challenges, and Pub/Sub delivery. Durable data remains stored; cache state is not included in backups.

Bundle pinned Valkey 9.1.2 in the appliance and CI while retaining the
native Bun RESP client. Rename cache services, configuration, health
responses and translations; verify Lua, TTL, Pub/Sub and reconnects.
Preserve historical backup metadata and immutable Redis Alpha fixtures.

Document explicit image selection, upgrades, rollback and transient
cache state. Verify the production binaries, licenses and cache reset.

BREAKING CHANGE: Compose requires RENTNERPROXY_IMAGE. Development uses
VALKEY_URL instead of REDIS_URL. Foundation health exposes valkey instead
of redis. Existing deployments must follow the documented migration.

Refs #148
@RentnerKev RentnerKev added this to the v1.0.0-beta.1 milestone Oct 1, 2026
@RentnerKev RentnerKev added enhancement New feature or request dependencies Automated dependency update area: runtime Caddy and privileged controller runtime behavior. area: docker Docker images, Compose configuration, and deployment. labels Oct 1, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation area: auth Authentication, accounts, sessions, passkeys, and access control. area: database Database schema, migrations, and persistence. area: ui Web interface components, routes, styling, and localization. area: ci Continuous integration and GitHub automation. labels Oct 1, 2026
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: RentnerKev/RentnerProxy/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 47c3ba6c-5ad6-4c3e-96ac-d88ce31988fa

📥 Commits

Reviewing files that changed from the base of the PR and between 492aca6 and 409c766.

📒 Files selected for processing (61)
  • .env.example
  • .env.production.example
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/ISSUE_TEMPLATE/feature_request.yml
  • .github/labeler.yml
  • .github/workflows/ci.yml
  • ARCHITECTURE.md
  • ASSURANCE_CASE.md
  • CONTRIBUTING.md
  • README.md
  • RELEASING.md
  • docker-compose.yml
  • docker/licenses/Valkey-LICENSE
  • docker/licenses/Valkey-NOTICE
  • docker/production/Dockerfile
  • docker/production/entrypoint.sh
  • scripts/runtime-reliability/fixture.ts
  • scripts/runtime-reliability/harness.ts
  • tests/production/appliance-compose-smoke.ts
  • web/src/features/Auth/Login/server.ts
  • web/src/features/Auth/serverHelpers.ts
  • web/src/features/FoundationStatus/Helpers/createFoundationStatusViewModel.ts
  • web/src/language/Locales/de.json
  • web/src/language/Locales/en.json
  • web/src/language/Locales/es.json
  • web/src/language/Locales/fr.json
  • web/src/language/Locales/it.json
  • web/src/language/Locales/nl.json
  • web/src/language/Locales/pl.json
  • web/src/language/Locales/pt.json
  • web/src/server/Auth/Account/account.service.ts
  • web/src/server/Auth/Passkey/passkey.service.ts
  • web/src/server/Auth/Setup/invites.service.ts
  • web/src/server/Auth/TwoFactor/two-factor.service.ts
  • web/src/server/Foundation/Types/health.types.ts
  • web/src/server/Foundation/health.service.ts
  • web/src/server/env.server.ts
  • web/src/server/valkey/Types/valkey.types.ts
  • web/src/server/valkey/auth-challenges.service.ts
  • web/src/server/valkey/client.server.ts
  • web/src/server/valkey/health.server.ts
  • web/src/server/valkey/rate-limiter.service.ts
  • web/src/shared/Types/health.types.ts
  • web/src/start.ts
  • web/src/tests/Fuzz/environment.fuzz.test.ts
  • web/src/tests/auth-challenges.test.ts
  • web/src/tests/auth-postgresql.integration.test.ts
  • web/src/tests/duplicate-triage.test.ts
  • web/src/tests/env.server.test.ts
  • web/src/tests/foundation-live-cache.test.tsx
  • web/src/tests/health-functions.test.ts
  • web/src/tests/live-snapshot.test.ts
  • web/src/tests/redis-client.test.ts
  • web/src/tests/redis.integration.test.ts
  • web/src/tests/runtime-peer-ip.test.ts
  • web/src/tests/sensitive-action-rate-limits.test.ts
  • web/src/tests/valkey-client.test.ts
  • web/src/tests/valkey-health.test.ts
  • web/src/tests/valkey-rate-limiter.test.ts
  • web/src/tests/valkey.integration.test.ts
  • web/src/websockets/Server/realtimeValkey.service.ts
 ____________________________________________________________________________________________
< It is easier to change the specification to fit the program than vice versa. - Alan Perlis >
 --------------------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@RentnerKev
RentnerKev marked this pull request as ready for review October 1, 2026 23:22
@RentnerKev
RentnerKev merged commit c1e3841 into main Oct 1, 2026
42 of 48 checks passed
@RentnerKev
RentnerKev deleted the codex/valkey-migration branch October 1, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: auth Authentication, accounts, sessions, passkeys, and access control. area: ci Continuous integration and GitHub automation. area: database Database schema, migrations, and persistence. area: docker Docker images, Compose configuration, and deployment. area: runtime Caddy and privileged controller runtime behavior. area: ui Web interface components, routes, styling, and localization. dependencies Automated dependency update documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat!: replace Redis with Valkey and migrate Docker Compose (breaking change)

1 participant