Skip to content

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Sep 9, 2025

Closes #2004

Summary by CodeRabbit

  • New Features

    • Added a public command to flush the Redis cache (flush-redis).
  • Refactor

    • Replaced Valkey with Redis across the stack: service renamed to redis and related wiring updated.
    • Environment and installer defaults standardized to REDIS_* and Redis as the default cache service.
  • Documentation

    • Updated docs and UI copy to reference Redis and added Stage File Proxy entry.
  • Tests

    • Test suites, fixtures, and helpers updated to Redis terminology.

@coderabbitai
Copy link

coderabbitai bot commented Sep 9, 2025

Walkthrough

Replaces Valkey references with Redis across configs, installer, tests, docs, and Ahoy commands. Service name, tokens, env vars, fixtures, helper functions, and CLI commands were renamed from valkey/VALKEY to redis/REDIS; Ahoy flush command now targets redis using redis-cli. Underlying container image unchanged.

Changes

Cohort / File(s) Summary
Ahoy command updates
/.ahoy.yml
Removed public flush-valkey (and its alias); added public flush-redis using docker compose exec redis redis-cli flushall; moved command block from SERVICE_VALKEYSERVICE_REDIS.
Env / gating tags
/.env, scripts/custom/provision-10-example.sh
Replaced comment gating tags and descriptive text from SERVICE_VALKEYSERVICE_REDIS; updated wording to “Enable Redis integration.”
Docker stack & fixtures
/docker-compose.yml, .vortex/tests/bats/fixtures/*, .vortex/tests/bats/fixtures/docker-compose.*.json
Renamed service valkeyredis across docker-compose and fixtures; rewired wait_dependencies and depends_on to redis:6379; preserved underlying image.
Installer logic & tests
.vortex/installer/src/Prompts/Handlers/Services.php, .vortex/installer/tests/Functional/*, .vortex/installer/tests/Unit/*
Renamed constant/option VALKEYREDIS; updated discovery, defaults, token handling, filesystem cleanup, and test snapshots to use redis.
BATS helpers & e2e
.vortex/tests/bats/_helper.workflow.bash, .vortex/tests/bats/e2e/workflow.install.db.bats
Renamed assert_valkey()assert_redis() (two defs), updated step labels and CLI calls (valkey-cliredis-cli), and updated tests to call the new helper.
PHPUnit tests
/tests/phpunit/Drupal/SettingsTestCase.php, /tests/phpunit/Drupal/SwitchableSettingsTest.php
Replaced VALKEY_REDIS_ in allowed env prefixes and test env vars; renamed test methods and updated host/port expectations to Redis defaults.
Drupal settings
/web/sites/default/includes/modules/settings.redis.php
Removed Valkey fallbacks; now read REDIS_HOST / REDIS_SERVICE_PORT (defaults redis/6379); docs updated to Redis-only.
Docs content & assets
.vortex/docs/content/**, .vortex/docs/src/pages/index.mdx, .vortex/docs/static/img/installer.json, .vortex/docs/cspell.json
Replaced Valkey → Redis in text/UI JSON; added stage_file_proxy module entry; updated cspell words (VALKEY/valkeyREDIS/redis).
Meta docs / tokens
.vortex/CLAUDE.md, CLAUDE.md
Updated service token references and headings from SERVICE_VALKEYSERVICE_REDIS and adjusted related documentation blocks.
Fixtures & test env JSON
.vortex/tests/bats/fixtures/docker-compose.env*.json, .vortex/tests/bats/fixtures/docker-compose.noenv.json, ...
Added redis service blocks, removed valkey entries, and rewired wait/dependency references to redis.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant Ahoy as Ahoy CLI
  participant Compose as docker-compose
  participant Redis as redis service

  Dev->>Ahoy: ahoy flush-redis
  Ahoy->>Compose: docker compose exec redis redis-cli flushall
  Compose->>Redis: run redis-cli flushall
  Redis-->>Compose: result
  Compose-->>Ahoy: exit code/result
  Ahoy-->>Dev: display result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

PR: Ready to be merged

Pre-merge checks (4 passed, 1 warning)

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the pull request’s core change by stating that the ValKey service is being renamed back to Redis, directly reflecting the primary objective of the linked issue. It is specific enough for a reviewer to understand the main intent without extraneous details.
Linked Issues Check ✅ Passed The pull request comprehensively renames the ValKey service identifier to Redis across the container configuration (including .ahoy.yml, docker-compose.yml), installer code (Services handler and related tests), Drupal settings, documentation, and fixtures, thereby fully satisfying the objectives of issue #2004. It also preserves the underlying ValKey container image while exposing it under the redis service name, maintaining compatibility and practicality as intended.
Out of Scope Changes Check ✅ Passed All changes are narrowly focused on renaming instances of “ValKey” to “Redis” throughout code, configuration, documentation, and tests; there are no modifications unrelated to the linked issue’s objectives.
Description Check ✅ Passed Although minimal, the description “Closes #2004” ties the pull request to the linked issue that mandates renaming the ValKey service back to Redis, making it clearly related to the changeset.

Poem

I nudge my nose at keys that hiss,
From Valkey’s burrow to Redis’ bliss.
Flush commands hop, caches set free,
Compose hums softly — services agree.
Tests clap their paws, deploys dance with glee. 🥕

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/back-to-redis

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

@codecov
Copy link

codecov bot commented Sep 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.02%. Comparing base (82df6e4) to head (74d17e2).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2005   +/-   ##
========================================
  Coverage    78.02%   78.02%           
========================================
  Files           89       89           
  Lines         5542     5542           
  Branches        44       44           
========================================
  Hits          4324     4324           
  Misses        1218     1218           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
.vortex/docs/static/img/installer.json (2)

111-113: Inconsistent summary still shows “valkey”. Replace with “redis”.
User-facing inconsistency in the same cast: “Services … clamav, solr, valkey” should be “clamav, solr, redis”.

Apply this minimal fix within the cast payload string:

-  Services                         │ clamav, solr, valkey
+  Services                         │ clamav, solr, redis

1-1: Rename or ignore invalid JSON Asciinema cast
.vortex/docs/static/img/installer.json contains an Asciinema v2 cast (newline-delimited JSON) rather than a standalone JSON document, which breaks JSON linters (Biome flags “End of file expected”). Either:

  • Rename it to installer.cast and update all references
  • Or add it to the ignore list in .biome.json:
    {
      "files": {
        "ignore": [
          ".vortex/docs/static/img/installer.json"
        ]
      }
    }
.vortex/CLAUDE.md (1)

335-343: Avoid drush php:eval; use existing flush command to stay consistent with your own guidance.
This contradicts the “NEVER Do This” section. Prefer ahoy’s flush alias.

Apply:

-# Flush Redis cache specifically
-ahoy drush eval "\\Drupal::service('cache.backend.redis')->deleteAll();"
+# Flush Redis cache specifically
+ahoy flush-redis
.vortex/tests/bats/_helper.workflow.bash (1)

838-887: Tighten Redis key assertions to reduce flakiness.
Scan for cache keys explicitly; assert on a precise prefix.

-  run docker compose exec redis redis-cli --scan
-  assert_output_not_contains "config"
+  run docker compose exec redis redis-cli --scan --pattern 'cache:config:*'
+  assert_output_not_contains "cache:config:"
@@
-  run docker compose exec redis redis-cli --scan
-  assert_output_contains "config"
+  run docker compose exec redis redis-cli --scan --pattern 'cache:config:*'
+  assert_output_contains "cache:config:"
tests/phpunit/Drupal/SwitchableSettingsTest.php (1)

236-331: Tests align with REDIS_ and PhpRedis; consider DRYing with a data provider.*
Functionally correct; the four Redis tests could be consolidated for brevity.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2836204 and d88f136.

⛔ Files ignored due to path filters (42)
  • .vortex/installer/tests/Fixtures/install/_baseline/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SettingsTestCase.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ai_instructions_claude/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_circleci/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_gha/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/db_download_source_container_registry/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_string/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_profile/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_profile/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_clamav/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_clamav/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/tests/behat/features/-redis.feature is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/web/sites/default/includes/modules/-settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_solr/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_solr/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_absent/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_absent/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (23)
  • .ahoy.yml (1 hunks)
  • .env (1 hunks)
  • .vortex/CLAUDE.md (2 hunks)
  • .vortex/docs/content/drupal/README.mdx (1 hunks)
  • .vortex/docs/content/getting-started/features.mdx (2 hunks)
  • .vortex/docs/content/tools/docker.mdx (1 hunks)
  • .vortex/docs/content/workflows/variables.mdx (1 hunks)
  • .vortex/docs/cspell.json (2 hunks)
  • .vortex/docs/src/pages/index.mdx (1 hunks)
  • .vortex/docs/static/img/installer.json (1 hunks)
  • .vortex/installer/src/Prompts/Handlers/Services.php (5 hunks)
  • .vortex/installer/tests/Functional/Handlers/BaselineInstallTest.php (1 hunks)
  • .vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (2 hunks)
  • .vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (1 hunks)
  • .vortex/installer/tests/Unit/Handlers/ServicesPromptManagerTest.php (4 hunks)
  • .vortex/tests/bats/_helper.workflow.bash (1 hunks)
  • .vortex/tests/bats/e2e/workflow.install.db.bats (1 hunks)
  • CLAUDE.md (1 hunks)
  • docker-compose.yml (3 hunks)
  • scripts/custom/provision-10-example.sh (1 hunks)
  • tests/phpunit/Drupal/SettingsTestCase.php (1 hunks)
  • tests/phpunit/Drupal/SwitchableSettingsTest.php (4 hunks)
  • web/sites/default/includes/modules/settings.redis.php (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-08T12:02:24.652Z
Learnt from: AlexSkrypnyk
PR: drevops/vortex#1896
File: .vortex/tests/bats/unit/download-db-lagoon.bats:24-25
Timestamp: 2025-08-08T12:02:24.652Z
Learning: In .vortex/tests/bats/unit Bats tests using ../_helper.bash (run_steps), prefixing a STEPS entry with "- " denotes a negative assertion (the substring must NOT appear in output). Unprefixed entries are positive assertions. Example: "- Database dump refresh requested. Will create a new dump." asserts absence; "Database dump refresh requested. Will create a new dump." asserts presence.

Applied to files:

  • .vortex/tests/bats/e2e/workflow.install.db.bats
  • .vortex/tests/bats/_helper.workflow.bash
🧬 Code graph analysis (9)
.vortex/tests/bats/e2e/workflow.install.db.bats (1)
.vortex/tests/bats/_helper.workflow.bash (1)
  • assert_redis (838-886)
.vortex/installer/tests/Functional/Handlers/BaselineInstallTest.php (2)
.vortex/installer/src/Prompts/PromptManager.php (2)
  • PromptManager (57-593)
  • makeEnvName (409-411)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (4)
.vortex/installer/src/Utils/Env.php (2)
  • Env (7-243)
  • put (24-26)
.vortex/installer/src/Prompts/PromptManager.php (2)
  • PromptManager (57-593)
  • makeEnvName (409-411)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/tests/Functional/FunctionalTestCase.php (1)
  • assertSutNotContains (139-154)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (3)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/src/Prompts/Handlers/HandlerInterface.php (1)
  • id (19-19)
.vortex/installer/src/Prompts/Handlers/AbstractHandler.php (1)
  • id (52-62)
.vortex/installer/tests/Unit/Handlers/ServicesPromptManagerTest.php (2)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (2)
  • AbstractPromptManagerTestCase (46-266)
  • stubVortexProject (252-258)
tests/phpunit/Drupal/SwitchableSettingsTest.php (1)
tests/phpunit/Drupal/SettingsTestCase.php (2)
  • setEnvVars (135-166)
  • requireSettingsFile (205-224)
.vortex/tests/bats/_helper.workflow.bash (1)
.vortex/tests/bats/_helper.bash (3)
  • step (1287-1290)
  • substep (1293-1295)
  • sync_to_container (1307-1313)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
.vortex/installer/src/Utils/File.php (2)
  • File (10-121)
  • removeTokenAsync (93-100)
scripts/custom/provision-10-example.sh (1)
scripts/vortex/provision.sh (1)
  • drush (74-74)
🪛 Biome (2.1.2)
.vortex/docs/static/img/installer.json

[error] 65-68: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: build (0)
  • GitHub Check: build (1)
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-workflow (4)
  • GitHub Check: vortex-test-workflow (0)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-common
  • GitHub Check: vortex-test-deployment (0)
  • GitHub Check: vortex-test-deployment (1)
  • GitHub Check: vortex-test-installer (8.3)
  • GitHub Check: vortex-test-installer (8.2)
  • GitHub Check: vortex-test-installer (8.4)
🔇 Additional comments (31)
.vortex/docs/src/pages/index.mdx (1)

84-84: Terminology aligned: Valkey → Redis. LGTM.

.vortex/docs/content/getting-started/features.mdx (2)

52-53: Docs: caching module updated to Redis.
Accurate and consistent with the PR objective.


135-136: Docs: services stack lists Redis.
Matches the renamed service.

.vortex/docs/content/workflows/variables.mdx (1)

227-227: Variable description updated.
“Enable Redis integration” is clear and consistent with settings.redis.php.

scripts/custom/provision-10-example.sh (1)

45-49: Gating markers switched to SERVICE_REDIS.
Consistent with the new service token; drush pm:install redis || true is tolerant. Good.

.vortex/docs/cspell.json (2)

12-12: Add REDIS keyword.
Keeps spell-check green after the rename.


62-62: Add redis (lowercase).
Completes the dictionary update.

.vortex/docs/content/drupal/README.mdx (1)

34-34: Module table: Redis wording fixed.
Accurate description; consistent across docs.

.vortex/docs/content/tools/docker.mdx (1)

214-215: Services list: Valkey → Redis.
Matches docker-compose rename.

.vortex/docs/static/img/installer.json (1)

65-67: Installer cast options updated to show “Redis”.
Matches the service rename in the selection list.

tests/phpunit/Drupal/SettingsTestCase.php (1)

63-74: Verified: no stale VALKEY_ environment variable prefixes remain.* Only occurrence is the ‘uselagoon/valkey’ Docker image in docker-compose.yml, which isn’t an env var prefix.

.vortex/CLAUDE.md (1)

173-179: Skip fixture directory verification
The path .vortex/installer/tests/Fixtures/install does not exist; no fixtures to confirm.

Likely an incorrect or invalid review comment.

.env (1)

75-79: LGTM: gating token and wording updated to SERVICE_REDIS.
Matches project-wide rename; DRUPAL_REDIS_ENABLED unchanged.

.vortex/tests/bats/e2e/workflow.install.db.bats (1)

60-62: LGTM: final step now asserts Redis, matching the rename and concurrency note.

.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (1)

129-129: Defaults updated to include REDIS — looks correct and consistent with Services handler.

.vortex/installer/tests/Functional/Handlers/BaselineInstallTest.php (1)

103-104: Config string dataset now targeting REDIS — OK.

.vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (3)

22-24: Switch to [SOLR, REDIS] for “no clamav” scenario — OK.


28-34: Rename to “no redis” and assertions updated — OK.


36-41: Use [CLAMAV, REDIS] for “no solr” — OK.

.vortex/installer/tests/Unit/Handlers/ServicesPromptManagerTest.php (4)

24-25: Default prompt expectations updated to REDIS — OK.


36-42: Discovery test for redis — OK and aligned with docker-compose service name.


57-62: Discovery “all” includes REDIS — OK.


91-92: Non-Vortex project snapshot adjusted — OK.

docker-compose.yml (2)

65-69: SERVICE_REDIS env block added — OK.


185-193: Service renamed to redis while keeping Valkey image — OK and matches PR intent.

.ahoy.yml (1)

107-111: Provide safe fallback for Redis/Valkey CLI: Replace the existing cmd with

cmd: docker compose exec redis sh -lc 'redis-cli flushall 2>/dev/null || valkey-cli flushall'

(Optional) add an alias:

aliases: [flush-valkey]

Manually verify which binary exists in your Valkey image by running:

docker run --rm uselagoon/valkey-8:<version> sh -lc 'which redis-cli || which valkey-cli'
.vortex/installer/src/Prompts/Handlers/Services.php (5)

14-15: Introduce REDIS constant — OK.


39-40: Options label updated to Redis — OK.


46-48: Default now includes REDIS — OK and matches tests.


75-77: Discovery checks for ‘redis’ service — OK.


106-111: Token toggling switched to SERVICE_REDIS — OK.

Comment on lines +49 to 50
$test->assertSutNotContains('redis');
}),
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Consider asserting absence of any stray “valkey” references as a guardrail.
This won’t block the rename strategy (service name is redis; image may still be Valkey), but in the “none” scenario the valkey image block is removed, so the assertion should hold.

Apply this diff to extend the check:

         $test->assertSutNotContains('solr');
-        $test->assertSutNotContains('redis');
+        $test->assertSutNotContains('redis');
+        $test->assertSutNotContains('valkey');
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$test->assertSutNotContains('redis');
}),
$test->assertSutNotContains('solr');
$test->assertSutNotContains('redis');
$test->assertSutNotContains('valkey');
🤖 Prompt for AI Agents
In .vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php around
lines 49-50, the test currently asserts that the sut does not contain 'redis'
but does not guard against stray "valkey" references; add an additional
assertion that the SUT does not contain the string 'valkey' (e.g. call
$test->assertSutNotContains('valkey') in the same closure after the existing
redis assertion) so the "none" scenario cannot leave behind any valkey image
blocks.

Comment on lines +335 to 343
# Clear all caches (includes Redis)
ahoy drush cache:rebuild

# Check Redis/Valkey connection status
# Check Redis connection status
ahoy drush php:script -- redis_status

# Flush Redis cache specifically
ahoy drush eval "\\Drupal::service('cache.backend.redis')->deleteAll();"
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Replace drush eval with ahoy flush-redis for safety and consistency.
Keeps docs aligned with “Never use php:eval directly”.

-# Flush Redis cache specifically
-ahoy drush eval "\\Drupal::service('cache.backend.redis')->deleteAll();"
+# Flush Redis cache specifically
+ahoy flush-redis
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Clear all caches (includes Redis)
ahoy drush cache:rebuild
# Check Redis/Valkey connection status
# Check Redis connection status
ahoy drush php:script -- redis_status
# Flush Redis cache specifically
ahoy drush eval "\\Drupal::service('cache.backend.redis')->deleteAll();"
```
# Clear all caches (includes Redis)
ahoy drush cache:rebuild
# Check Redis connection status
ahoy drush php:script -- redis_status
# Flush Redis cache specifically
ahoy flush-redis
🤖 Prompt for AI Agents
In CLAUDE.md around lines 335 to 343, replace the unsafe drush php:eval line
that runs "\\Drupal::service('cache.backend.redis')->deleteAll();" with the
safer, documented command "ahoy flush-redis" so the snippet reads: show cache
rebuild, check Redis status, then use ahoy flush-redis to flush Redis; update
the text if necessary to mention the replacement and remove the drush eval entry
to keep docs consistent with the "Never use php:eval directly" guideline.

Comment on lines 40 to 41
if ((extension_loaded('redis') && getenv('VORTEX_REDIS_EXTENSION_LOADED') === FALSE) || !empty(getenv('VORTEX_REDIS_EXTENSION_LOADED'))) {

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Guard against enabling Redis backend when the php-redis extension isn’t loaded.
Current condition can enable the backend solely via env var, risking runtime failures if the extension is missing.

-  if ((extension_loaded('redis') && getenv('VORTEX_REDIS_EXTENSION_LOADED') === FALSE) || !empty(getenv('VORTEX_REDIS_EXTENSION_LOADED'))) {
+  if (extension_loaded('redis') && (getenv('VORTEX_REDIS_EXTENSION_LOADED') === FALSE || getenv('VORTEX_REDIS_EXTENSION_LOADED') !== '0')) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if ((extension_loaded('redis') && getenv('VORTEX_REDIS_EXTENSION_LOADED') === FALSE) || !empty(getenv('VORTEX_REDIS_EXTENSION_LOADED'))) {
if (extension_loaded('redis') && (getenv('VORTEX_REDIS_EXTENSION_LOADED') === FALSE || getenv('VORTEX_REDIS_EXTENSION_LOADED') !== '0')) {
🤖 Prompt for AI Agents
In web/sites/default/includes/modules/settings.redis.php around lines 40-41, the
current conditional allows enabling the Redis backend purely via the
VORTEX_REDIS_EXTENSION_LOADED env var even when the php-redis extension isn't
present; update the check so Redis is only enabled when the php-redis extension
is loaded (extension_loaded('redis') is true) and the env var does not
explicitly disable it — i.e., require the extension to be present first, then
consult the env var to enable/disable the backend.

@github-actions github-actions bot temporarily deployed to commit September 10, 2025 00:13 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
.vortex/docs/static/img/installer.json (1)

109-116: Leftover “valkey” in Installation summary. Replace with “redis”.

The Services summary still lists “valkey”, contradicting the Services step above.

Apply this diff to fix the summary line:

- \u001b[90m│\u001b[39m\u001b[39m   Services                         \u001b[39m\u001b[90m│\u001b[39m\u001b[39m clamav, solr, valkey                    \u001b[39m\u001b[90m│\u001b[39m
+ \u001b[90m│\u001b[39m\u001b[39m   Services                         \u001b[39m\u001b[90m│\u001b[39m\u001b[39m clamav, solr, redis                     \u001b[39m\u001b[90m│\u001b[39m
.vortex/tests/bats/_helper.workflow.bash (1)

846-895: Make Redis readiness deterministic; avoid brittle sleeps and full keyspace scan.

Replace fixed sleeps with a short PING retry loop and assert command success rather than specific output. Also avoid --scan across the entire keyspace; rely on Drush requirements for connectivity signal.

Apply this diff:

 assert_redis() {
   step "Redis"

   substep "Redis service is running"
-  run ahoy flush-redis
-  assert_output_contains "OK"
+  run ahoy flush-redis
+  assert_success

   substep "Disable Redis integration with Drupal"
   add_var_to_file .env "DRUPAL_REDIS_ENABLED" "0"
   sync_to_container
   run ahoy up
   assert_success
-  sleep 10
-  ahoy flush-redis
+  # Wait for redis to be ready
+  for i in {1..30}; do
+    docker compose exec -T redis redis-cli PING >/dev/null 2>&1 && break
+    sleep 1
+  done
+  run ahoy flush-redis
+  assert_success

   substep "Assert that Redis integration is disabled"
   ahoy drush cr
   ahoy cli curl -L -s "http://nginx:8080" >/dev/null
-  run docker compose exec redis redis-cli --scan
-  assert_output_not_contains "config"
+  # Connectivity/status is asserted below via Drush; skip full keyspace scans.

   # Redis is reported in Drupal as not connected.
   run docker compose exec cli drush core:requirements --filter="title~=#(Redis)#i" --field=severity
   assert_output_contains "Warning"

   restore_file ".env"
   sync_to_container

   substep "Enable Redis integration with Drupal"
   add_var_to_file .env "DRUPAL_REDIS_ENABLED" "1"
   sync_to_container
   run ahoy up
   assert_success
-  sleep 10
-  ahoy flush-redis
+  for i in {1..30}; do
+    docker compose exec -T redis redis-cli PING >/dev/null 2>&1 && break
+    sleep 1
+  done
+  run ahoy flush-redis
+  assert_success

   substep "Assert that Redis integration is enabled"
   ahoy drush cr
   ahoy cli curl -L -s "http://nginx:8080" >/dev/null
-  run docker compose exec redis redis-cli --scan
-  assert_output_contains "config"
+  # Avoid scanning keys; rely on Drush requirement below.

   # Redis is reported in Drupal as connected.
   run docker compose exec cli drush core:requirements --filter="title~=#(Redis)#i" --field=severity
   assert_output_contains "OK"
.vortex/tests/bats/fixtures/docker-compose.env_mod.json (1)

451-474: Minor: consider adding a healthcheck to redis in fixtures.

Not required due to wait_dependencies, but a healthcheck can improve local diagnostics.

Example:

   "redis": {
     "command": null,
     "entrypoint": null,
     "image": "uselagoon/valkey-8:VERSION",
+    "healthcheck": {
+      "test": ["CMD", "redis-cli", "PING"],
+      "interval": "5s",
+      "timeout": "3s",
+      "retries": 10
+    },
     "labels": {
       "lagoon.type": "redis"
     },
.vortex/tests/bats/fixtures/docker-compose.env_local.json (1)

451-474: Optional: add a redis healthcheck here as well for parity.

(See suggested snippet in env_mod.json comment.)

.vortex/tests/bats/fixtures/docker-compose.env.json (1)

451-474: Optional: add a redis healthcheck for consistency across fixtures.

♻️ Duplicate comments (7)
CLAUDE.md (1)

341-343: Replace unsafe drush php:eval with the documented ahoy command.

This contradicts the “Never use drush php:eval directly” rule above. Use ahoy flush-redis instead.

Apply this diff:

-# Flush Redis cache specifically
-ahoy drush eval "\\Drupal::service('cache.backend.redis')->deleteAll();"
+# Flush Redis cache specifically
+ahoy flush-redis
docker-compose.yml (1)

264-264: Make wait_dependencies.command token-aware (repeat).

Current string requires brittle text replacements in the installer. Switch to a YAML list with tokens per service.

-    command: database:3306 clamav:3310 redis:6379
+    command:
+      - database:3306
+      #;< SERVICE_CLAMAV
+      - clamav:3310
+      #;> SERVICE_CLAMAV
+      #;< SERVICE_REDIS
+      - redis:6379
+      #;> SERVICE_REDIS
.vortex/installer/src/Prompts/Handlers/Services.php (1)

149-156: Drop explicit 'redis:6379' replacement once command is tokenized (repeat).

After you adopt the tokenized command list in docker-compose.yml, remove this hard replace to avoid divergence.

-      File::replaceContentInFile($t . DIRECTORY_SEPARATOR . 'docker-compose.yml', 'redis:6379', '');
.vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (2)

49-50: Add guard against stray “valkey” in the “none” scenario (repeat).

Ensures full removal when no services selected.

           $test->assertSutNotContains('solr');
-          $test->assertSutNotContains('redis');
+          $test->assertSutNotContains('redis');
+          $test->assertSutNotContains('valkey');

28-34: Also assert absence of stray “valkey” when Redis is disabled.

Prevents regressions leaving old image blocks behind.

-        static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains('redis')),
+        static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains(['redis','valkey'])),
web/sites/default/includes/modules/settings.redis.php (2)

31-32: Cast and validate port to int (prevents type drift, matches tests).
Current code assigns a string. Cast to int (and optionally validate range).

Apply:

-  $settings['redis.connection']['host'] = getenv('REDIS_HOST') ?: 'redis';
-  $settings['redis.connection']['port'] = getenv('REDIS_SERVICE_PORT') ?: '6379';
+  $settings['redis.connection']['host'] = getenv('REDIS_HOST') ?: 'redis';
+  $settings['redis.connection']['port'] = (int) (getenv('REDIS_SERVICE_PORT') ?: 6379);

(Optional stricter validation)

+  $port = filter_var(getenv('REDIS_SERVICE_PORT'), FILTER_VALIDATE_INT, ['options' => ['min_range' => 1, 'max_range' => 65535]]) ?: 6379;
+  $settings['redis.connection']['port'] = (int) $port;

39-41: Do not enable Redis backend if php-redis isn’t loaded.
As written, setting VORTEX_REDIS_EXTENSION_LOADED to a non-empty value can enable Redis even when the extension is absent, risking fatal errors at runtime.

Apply:

-  if ((extension_loaded('redis') && getenv('VORTEX_REDIS_EXTENSION_LOADED') === FALSE) || !empty(getenv('VORTEX_REDIS_EXTENSION_LOADED'))) {
+  $__vortex_redis_flag = getenv('VORTEX_REDIS_EXTENSION_LOADED');
+  // Enable only if the extension is present AND the flag is unset or not an explicit "off".
+  if (
+    extension_loaded('redis')
+    && ($__vortex_redis_flag === FALSE || !in_array(strtolower((string) $__vortex_redis_flag), ['0', 'false', 'off', 'no'], true))
+  ) {

To ensure CI/dev images won’t break with this stricter check, verify the extension is available:

#!/bin/bash
# Expect output "redis" (or non-empty).
docker compose exec cli php -m | grep -i '^redis$' || { echo "php-redis not loaded"; exit 1; }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d88f136 and 6949ecc.

⛔ Files ignored due to path filters (64)
  • .vortex/installer/tests/Fixtures/install/_baseline/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SettingsTestCase.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ai_instructions_claude/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_circleci/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_gha/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/db_download_source_container_registry/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_string/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_profile/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_profile/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_clamav/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_clamav/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/tests/behat/features/-redis.feature is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/web/sites/default/includes/modules/-settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_solr/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_solr/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_absent/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_absent/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_lint/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_lint/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_lint_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_lint_circleci/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_tests/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_tests_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_behat/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_behat_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpcs/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpcs/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpcs_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpcs_circleci/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpmd/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpmd_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpstan/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpstan_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpunit/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpunit_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_rector/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_rector_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_none/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_none/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (27)
  • .ahoy.yml (1 hunks)
  • .env (1 hunks)
  • .vortex/CLAUDE.md (2 hunks)
  • .vortex/docs/content/drupal/README.mdx (1 hunks)
  • .vortex/docs/content/getting-started/features.mdx (2 hunks)
  • .vortex/docs/content/tools/docker.mdx (1 hunks)
  • .vortex/docs/content/workflows/variables.mdx (1 hunks)
  • .vortex/docs/cspell.json (2 hunks)
  • .vortex/docs/src/pages/index.mdx (1 hunks)
  • .vortex/docs/static/img/installer.json (1 hunks)
  • .vortex/installer/src/Prompts/Handlers/Services.php (5 hunks)
  • .vortex/installer/tests/Functional/Handlers/BaselineInstallTest.php (1 hunks)
  • .vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (2 hunks)
  • .vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (1 hunks)
  • .vortex/installer/tests/Unit/Handlers/ServicesPromptManagerTest.php (4 hunks)
  • .vortex/tests/bats/_helper.workflow.bash (1 hunks)
  • .vortex/tests/bats/e2e/workflow.install.db.bats (1 hunks)
  • .vortex/tests/bats/fixtures/docker-compose.env.json (3 hunks)
  • .vortex/tests/bats/fixtures/docker-compose.env_local.json (3 hunks)
  • .vortex/tests/bats/fixtures/docker-compose.env_mod.json (3 hunks)
  • .vortex/tests/bats/fixtures/docker-compose.noenv.json (3 hunks)
  • CLAUDE.md (1 hunks)
  • docker-compose.yml (3 hunks)
  • scripts/custom/provision-10-example.sh (1 hunks)
  • tests/phpunit/Drupal/SettingsTestCase.php (1 hunks)
  • tests/phpunit/Drupal/SwitchableSettingsTest.php (4 hunks)
  • web/sites/default/includes/modules/settings.redis.php (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-08T12:02:24.652Z
Learnt from: AlexSkrypnyk
PR: drevops/vortex#1896
File: .vortex/tests/bats/unit/download-db-lagoon.bats:24-25
Timestamp: 2025-08-08T12:02:24.652Z
Learning: In .vortex/tests/bats/unit Bats tests using ../_helper.bash (run_steps), prefixing a STEPS entry with "- " denotes a negative assertion (the substring must NOT appear in output). Unprefixed entries are positive assertions. Example: "- Database dump refresh requested. Will create a new dump." asserts absence; "Database dump refresh requested. Will create a new dump." asserts presence.

Applied to files:

  • .vortex/tests/bats/e2e/workflow.install.db.bats
  • .vortex/tests/bats/_helper.workflow.bash
📚 Learning: 2025-09-04T10:49:47.322Z
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T10:49:47.322Z
Learning: Never use 'drush php:eval' directly; always use 'drush php:script'

Applied to files:

  • CLAUDE.md
🧬 Code graph analysis (9)
.vortex/tests/bats/e2e/workflow.install.db.bats (1)
.vortex/tests/bats/_helper.workflow.bash (1)
  • assert_redis (846-894)
tests/phpunit/Drupal/SwitchableSettingsTest.php (1)
tests/phpunit/Drupal/SettingsTestCase.php (2)
  • setEnvVars (135-166)
  • requireSettingsFile (205-224)
.vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (4)
.vortex/installer/src/Utils/Env.php (2)
  • Env (7-243)
  • put (24-26)
.vortex/installer/src/Prompts/PromptManager.php (2)
  • PromptManager (57-593)
  • makeEnvName (409-411)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/tests/Functional/FunctionalTestCase.php (1)
  • assertSutNotContains (139-154)
.vortex/installer/tests/Functional/Handlers/BaselineInstallTest.php (2)
.vortex/installer/src/Prompts/PromptManager.php (2)
  • PromptManager (57-593)
  • makeEnvName (409-411)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
scripts/custom/provision-10-example.sh (1)
scripts/vortex/provision.sh (2)
  • task (68-68)
  • drush (74-74)
.vortex/tests/bats/_helper.workflow.bash (1)
.vortex/tests/bats/_helper.bash (3)
  • step (1287-1290)
  • substep (1293-1295)
  • sync_to_container (1307-1313)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (3)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/src/Prompts/Handlers/AbstractHandler.php (1)
  • id (52-62)
.vortex/installer/src/Prompts/Handlers/HandlerInterface.php (1)
  • id (19-19)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
.vortex/installer/src/Utils/File.php (2)
  • File (10-121)
  • removeTokenAsync (93-100)
.vortex/installer/tests/Unit/Handlers/ServicesPromptManagerTest.php (2)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (2)
  • AbstractPromptManagerTestCase (46-266)
  • stubVortexProject (252-258)
🪛 Biome (2.1.2)
.vortex/docs/static/img/installer.json

[error] 65-68: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: build (1)
  • GitHub Check: build (0)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-deployment (1)
  • GitHub Check: vortex-test-workflow (4)
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-deployment (0)
  • GitHub Check: vortex-test-workflow (0)
  • GitHub Check: vortex-test-common
  • GitHub Check: vortex-test-installer (8.2)
  • GitHub Check: vortex-test-installer (8.4)
  • GitHub Check: vortex-test-installer (8.3)
  • GitHub Check: vortex-test-docs
🔇 Additional comments (47)
.vortex/docs/src/pages/index.mdx (1)

84-85: Terminology update looks correct (Valkey → Redis).

Matches the PR intent and other docs. No further action.

.vortex/docs/content/getting-started/features.mdx (1)

52-53: Consistent rename to Redis.

Both admin modules and local stack sections correctly reflect Redis. Good alignment with installer and compose changes.

Also applies to: 135-136

.vortex/docs/content/workflows/variables.mdx (1)

227-228: Variable description updated correctly.

“Enable Redis integration.” aligns with settings.redis.php and service rename.

.vortex/docs/cspell.json (2)

12-12: Dictionary updated (VALKEY → REDIS).

Matches repo-wide rename; prevents false positives in docs.


62-62: Lowercase “redis” added to dictionary.

Good coverage for common usage.

scripts/custom/provision-10-example.sh (1)

45-49: Gating tags switched to SERVICE_REDIS.

Template markers now match the renamed service. drush install target remains “redis” — OK.

.vortex/docs/content/drupal/README.mdx (1)

34-35: Redis module description corrected.

Accurate, concise, and consistent with the rest of the docs.

.vortex/docs/content/tools/docker.mdx (1)

214-215: Service bullet updated to “redis”.

Correctly reflects the compose service name and role.

.vortex/tests/bats/fixtures/docker-compose.env_mod.json (3)

376-386: Rename to redis looks correct; image kept as Valkey is acceptable per objective.

Service name aligns with Drupal expectations while retaining the compatible image. No issues spotted.


455-456: Updated wait target to redis:6379 — OK.

Dependency gate now points to the correct service name.


470-473: depends_on switched to redis — OK.

Compose start-order combined with the dedicated wait_dependencies service is sufficient here.

.env (1)

75-80: Token rename SERVICE_VALKEY → SERVICE_REDIS is consistent.

Docs text updated accordingly; env flag remains DRUPAL_REDIS_ENABLED=1 — OK.

CLAUDE.md (1)

338-340: Ensure redis_status script exists or update documentation
Could not locate any redis_status script in the repo (e.g. under scripts/custom/redis_status.php or as a Drush command). Please confirm the script is included or update the doc at CLAUDE.md lines 338–340 to point to its actual location.

.vortex/tests/bats/fixtures/docker-compose.noenv.json (3)

376-386: Service rename to redis with Valkey image — OK.

Matches the “expose as redis, keep image if desired” objective.


455-456: wait_dependencies updated to redis:6379 — OK.


470-473: depends_on → redis — OK.

.vortex/CLAUDE.md (2)

384-385: Token list updated to SERVICE_REDIS — OK.


173-178: Rename verified; no stale references remain
Ran rg -nP 'services_no_valkey' returned no results, confirming all references updated.

.vortex/tests/bats/fixtures/docker-compose.env_local.json (3)

376-386: Redis service block inserted correctly.

Name/image/labels consistent with broader rename.


455-456: wait_dependencies now targets redis:6379 — OK.


470-473: depends_on updated to redis — OK.

.vortex/tests/bats/fixtures/docker-compose.env.json (3)

376-386: Redis service addition — OK.

Keeps uselagoon/valkey-8 while exposing as redis; matches intent.


455-456: wait_dependencies uses redis:6379 — OK.


470-473: depends_on redis — OK.

.vortex/tests/bats/e2e/workflow.install.db.bats (1)

60-62: Rename + assertion switch to Redis looks good.

Matches helper assert_redis() and keeps the Redis check last to avoid contention.

docker-compose.yml (2)

65-69: Env flag gating for Redis is correct.

DRUPAL_REDIS_ENABLED is properly wrapped in SERVICE_REDIS tokens.


261-263: depends_on tokenization for Redis is correct.

Lines are properly wrapped in SERVICE_REDIS.

.vortex/installer/src/Prompts/Handlers/Services.php (5)

14-14: Introduce Services::REDIS — OK.


39-40: Options list updated to show Redis — OK.


47-47: Defaults now include Redis — OK.


75-77: Discovery switched to 'redis' service key — OK.


106-111: Token handling migrated to SERVICE_REDIS — OK.

.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (1)

129-129: Expected defaults updated to include Redis — OK.

.vortex/installer/tests/Functional/Handlers/BaselineInstallTest.php (1)

103-104: Config-string dataset switched to REDIS — OK.

tests/phpunit/Drupal/SettingsTestCase.php (1)

66-67: No VALKEY_ occurrences found; transitional support not required.

.vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (2)

22-23: “no clamav” scenario updated to [SOLR, REDIS] — OK.


38-39: “no solr” scenario updated to include REDIS — OK.

web/sites/default/includes/modules/settings.redis.php (2)

7-8: Docs rename to Redis only — good.
Wording now consistently reflects Redis.


20-22: Deployment flow comment tweaks — good.
Clarifies the staged enablement.

tests/phpunit/Drupal/SwitchableSettingsTest.php (4)

234-239: Redis test block rename — good.
Markers and method rename align with the service rename.


263-282: Partial enable path looks correct.
With VORTEX_REDIS_EXTENSION_LOADED=0 you avoid setting cache.default and bootstrap container — matches intent.


311-331: Custom port scenario — good coverage.
Covers non-default port and custom host; will pass once port casting is applied in settings.


333-333: Closing marker update — good.
Keeps phpcs ignore block consistent post-rename.

.vortex/installer/tests/Unit/Handlers/ServicesPromptManagerTest.php (4)

24-24: Defaults now include REDIS — OK

Matches Services::default() returning [CLAMAV, SOLR, REDIS].


36-42: Redis discovery case — OK

Expectation and docker-compose stub correctly switched from ValKey to REDIS.


91-91: Non-Vortex scenario updated — OK

Stub uses REDIS; discovery correctly falls back to defaults when not a Vortex project.


36-42: Verify absence of stray “valkey” references
Previous grep attempts returned no files searched—please perform a comprehensive scan (for example, rg --hidden --no-ignore -n -I -i 'valkey' .) to confirm no lingering identifiers remain.

Comment on lines +107 to +111
#;< SERVICE_REDIS
flush-redis:
usage: Flush Redis cache.
cmd: docker compose exec redis redis-cli flushall
#;> SERVICE_REDIS
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Make flush resilient: support Valkey CLI and avoid blocking.
If the underlying image lacks redis-cli, the command fails. Also prefer non-blocking flush.

Apply:

-  flush-redis:
-    usage: Flush Redis cache.
-    cmd: docker compose exec redis redis-cli flushall
+  flush-redis:
+    usage: Flush Redis cache.
+    aliases: [flush-valkey]
+    cmd: docker compose exec redis sh -lc 'command -v redis-cli >/dev/null && redis-cli FLUSHALL ASYNC || valkey-cli FLUSHALL ASYNC'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#;< SERVICE_REDIS
flush-redis:
usage: Flush Redis cache.
cmd: docker compose exec redis redis-cli flushall
#;> SERVICE_REDIS
#;< SERVICE_REDIS
flush-redis:
usage: Flush Redis cache.
aliases: [flush-valkey]
cmd: docker compose exec redis sh -lc 'command -v redis-cli >/dev/null && redis-cli FLUSHALL ASYNC || valkey-cli FLUSHALL ASYNC'
#;> SERVICE_REDIS
🤖 Prompt for AI Agents
.ahoy.yml around lines 107-111: the flush-redis command should handle images
without redis-cli and avoid blocking; update the cmd to run a short shell that
checks for redis-cli and falls back to valkey (e.g., if command -v redis-cli
succeeds use redis-cli flushall else use valkey redis flushall), and execute via
docker compose exec -T (or otherwise background/daemonize the shell) so the ahoy
task does not block waiting for a TTY.

Comment on lines 65 to 68
[21.349675, "o", "\u001b[?25l\r\r\n\u001b[90m ┌\u001b[39m \u001b[36mServices \u001b[2m(12/25)\u001b[22m\u001b[39m \u001b[90m────────────────────────────────────────────┐\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m› ◼\u001b[39m ClamAV \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mSolr\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mRedis\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m └──────────────────────────────────────────────────────────────┘\u001b[39m\r\r\n\u001b[90m Use ⬆, ⬇ and Space bar to select one or more services.\u001b[39m\r\r\n\u001b[1G\u001b[7A\u001b[J\r\r\n\u001b[90m ┌\u001b[39m \u001b[2mServices \u001b[2m(12/25)\u001b[22m\u001b[22m \u001b[90m────────────────────────────────────────────┐\u001b"]
[21.349909, "o", "[39m\r\r\n\u001b["]
[21.350007, "o", "90m │\u001b[39m ClamAV \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m Solr \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m Valkey \u001b[90m│\u001b[39m\r\r\n\u001b[90m └──────────────────────────────────────────────────────────────┘\u001b[39m\r\r\n\r\r\n\u001b[?25h"]
[21.350007, "o", "90m │\u001b[39m ClamAV \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m Solr \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m Redis \u001b[90m│\u001b[39m\r\r\n\u001b[90m └──────────────────────────────────────────────────────────────┘\u001b[39m\r\r\n\r\r\n\u001b[?25h"]
[22.354451, "o", "\u001b[?25l\r\r\n\u001b[90m ┌\u001b[39m \u001b[36mDevelopment tools \u001b[2m(13/25)\u001b[22m\u001b[39m \u001b[90m───────────────────────────────────┐\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m› ◼\u001b[39m PHP CodeSniffer \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mPHPStan\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mRector\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mPHP Mess Detector\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mPHPUnit\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mBehat\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m └───────────────────────────────────────────────────"]
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Biome JSON parse error: this file is NDJSON/cast, not strict JSON.

Your linter flags “End of file expected”. Either:

  • Rename to “installer.cast” (preferred for Asciinema v2) and adjust references, or
  • Exclude this file from Biome linting.

Add a Biome ignore to avoid false positives:

+// .biome.json
+{
+  "files": {
+    "ignore": [
+      ".vortex/docs/static/img/installer.json"
+    ]
+  }
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[21.349675, "o", "\u001b[?25l\r\r\n\u001b[90m ┌\u001b[39m \u001b[36mServices \u001b[2m(12/25)\u001b[22m\u001b[39m \u001b[90m────────────────────────────────────────────┐\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m› ◼\u001b[39m ClamAV \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mSolr\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mRedis\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m └──────────────────────────────────────────────────────────────┘\u001b[39m\r\r\n\u001b[90m Use ⬆, ⬇ and Space bar to select one or more services.\u001b[39m\r\r\n\u001b[1G\u001b[7A\u001b[J\r\r\n\u001b[90m ┌\u001b[39m \u001b[2mServices \u001b[2m(12/25)\u001b[22m\u001b[22m \u001b[90m────────────────────────────────────────────┐\u001b"]
[21.349909, "o", "[39m\r\r\n\u001b["]
[21.350007, "o", "90m │\u001b[39m ClamAV \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m Solr \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m Valkey \u001b[90m│\u001b[39m\r\r\n\u001b[90m └──────────────────────────────────────────────────────────────┘\u001b[39m\r\r\n\r\r\n\u001b[?25h"]
[21.350007, "o", "90m │\u001b[39m ClamAV \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m Solr \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m Redis \u001b[90m│\u001b[39m\r\r\n\u001b[90m └──────────────────────────────────────────────────────────────┘\u001b[39m\r\r\n\r\r\n\u001b[?25h"]
[22.354451, "o", "\u001b[?25l\r\r\n\u001b[90m ┌\u001b[39m \u001b[36mDevelopment tools \u001b[2m(13/25)\u001b[22m\u001b[39m \u001b[90m───────────────────────────────────┐\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m› ◼\u001b[39m PHP CodeSniffer \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mPHPStan\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mRector\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mPHP Mess Detector\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mPHPUnit\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m │\u001b[39m \u001b[36m◼\u001b[39m \u001b[2mBehat\u001b[22m \u001b[90m│\u001b[39m\r\r\n\u001b[90m └───────────────────────────────────────────────────"]
// .biome.json
{
"files": {
"ignore": [
".vortex/docs/static/img/installer.json"
]
}
}
🧰 Tools
🪛 Biome (2.1.2)

[error] 65-68: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 68-68: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 68-68: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)

🤖 Prompt for AI Agents
In .vortex/docs/static/img/installer.json around lines 65-68 the file is
actually NDJSON/cast output (Asciinema) and Biome reports "End of file
expected"; either rename the file to installer.cast and update any references to
that path (preferred for Asciinema v2), or exclude it from Biome linting by
adding the path to your ignore list (e.g., .biomeignore or your Biome config
"ignore" array) so the linter skips .vortex/docs/static/img/installer.json.

💡 Verification agent

🧩 Analysis chain

Verify no other ‘valkey’ remnants remain in this cast.

There may be other occurrences buried in the payload.


🏁 Script executed:

#!/bin/bash
# Find any remaining "valkey" references (case-insensitive) in the cast.
rg -nPi 'valkey' .vortex/docs/static/img/installer.json -C1

Length of output: 2897


Remove the remaining “valkey” entry from the services list in .vortex/docs/static/img/installer.json (line 111). Ensure the payload no longer references “valkey.”

🧰 Tools
🪛 Biome (2.1.2)

[error] 65-68: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 68-68: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 68-68: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)

🤖 Prompt for AI Agents
.vortex/docs/static/img/installer.json around lines 65-68 (and specifically
remove at line 111): the JSON still contains a "valkey" service entry that must
be removed; delete the entire array/object entry that references "valkey" (and
any trailing comma or adjust neighboring commas so the JSON stays valid), search
the file for any other occurrences of "valkey" and remove them from payloads or
metadata (e.g., counts or labels), and validate the JSON after removal to ensure
no syntax errors remain.

Comment on lines +185 to 193
#;< SERVICE_REDIS
redis:
image: uselagoon/valkey-8:25.8.0
#;< HOSTING_LAGOON
labels:
lagoon.type: redis # Change to 'none' if dedicated Valkey service is used. See https://docs.lagoon.sh/using-lagoon-advanced/service-types/
lagoon.type: redis # Change to 'none' if dedicated Redis service is used. See https://docs.lagoon.sh/using-lagoon-advanced/service-types/
#;> HOSTING_LAGOON
#;> SERVICE_VALKEY
#;> SERVICE_REDIS

Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Service rename to redis (while using Valkey image) is consistent; consider adding a healthcheck.

Optional: add a lightweight healthcheck to improve robustness for local/CI.

 redis:
   image: uselagoon/valkey-8:25.8.0
+  healthcheck:
+    test: ["CMD", "redis-cli", "ping"]
+    interval: 5s
+    timeout: 3s
+    retries: 10
+    start_period: 5s
   #;< HOSTING_LAGOON
   labels:
     lagoon.type: redis # Change to 'none' if dedicated Redis service is used. See https://docs.lagoon.sh/using-lagoon-advanced/service-types/
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#;< SERVICE_REDIS
redis:
image: uselagoon/valkey-8:25.8.0
#;< HOSTING_LAGOON
labels:
lagoon.type: redis # Change to 'none' if dedicated Valkey service is used. See https://docs.lagoon.sh/using-lagoon-advanced/service-types/
lagoon.type: redis # Change to 'none' if dedicated Redis service is used. See https://docs.lagoon.sh/using-lagoon-advanced/service-types/
#;> HOSTING_LAGOON
#;> SERVICE_VALKEY
#;> SERVICE_REDIS
#;< SERVICE_REDIS
redis:
image: uselagoon/valkey-8:25.8.0
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
#;< HOSTING_LAGOON
labels:
lagoon.type: redis # Change to 'none' if dedicated Redis service is used. See https://docs.lagoon.sh/using-lagoon-advanced/service-types/
#;> HOSTING_LAGOON
#;> SERVICE_REDIS
🤖 Prompt for AI Agents
In docker-compose.yml around lines 185 to 193, the redis service (using the
uselagoon/valkey-8 image) lacks a healthcheck; add a lightweight Docker
healthcheck block under the redis service that runs a simple Redis probe (for
example via redis-cli PING or checking TCP port 6379), and configure sensible
interval, timeout, start_period and retries (e.g. interval 10s, timeout 5s,
start_period 5s, retries 3) so local/CI runs can detect unhealthy Redis
instances reliably.

Comment on lines 241 to 252
'DRUPAL_REDIS_ENABLED' => 1,
'VALKEY_HOST' => 'valkey_host',
'VALKEY_SERVICE_PORT' => 1234,
'REDIS_HOST' => 'redis_host',
'REDIS_SERVICE_PORT' => 1234,
'VORTEX_REDIS_EXTENSION_LOADED' => 1,
]);

$this->requireSettingsFile();

$settings['redis.connection']['interface'] = 'PhpRedis';
$settings['redis.connection']['host'] = 'valkey_host';
$settings['redis.connection']['host'] = 'redis_host';
$settings['redis.connection']['port'] = 1234;
$settings['cache']['default'] = 'cache.backend.redis';
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Tests assume integer port — align settings casting.
You assert port as int (e.g., 1234). Ensure settings.redis.php casts the env port to int (see suggested diff there) to avoid brittle type mismatches.

Run to confirm after changes:


🏁 Script executed:

#!/bin/bash
rg -nP 'redis\.connection\'\]\[\'port\'\]\s*=\s*[^;]*' web/sites/default/includes/modules/settings.redis.php

Length of output: 68


🏁 Script executed:

#!/bin/bash
# Verify port assignment in settings.redis.php
rg -nP "\$settings\['redis\.connection'\]\['port'\]\s*=\s*[^;]+;" web/sites/default/includes/modules/settings.redis.php

# Verify that REDIS_SERVICE_PORT is cast to integer (via (int) or intval)
rg -nP "(?:\(int\)|intval)\s*\(?\s*getenv\(['\"]REDIS_SERVICE_PORT['\"]\)" -n web/sites/default/includes/modules/settings.redis.php

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Locate settings.redis.php anywhere in the repo
find . -type f -name 'settings.redis.php'

# Search for 'redis.connection' references across all PHP files
rg -n "redis\.connection" -tphp

# Search for any usage of REDIS_SERVICE_PORT to see where it's read
rg -n "REDIS_SERVICE_PORT" -tphp

Length of output: 2240


Cast REDIS_SERVICE_PORT to integer in settings.redis.php
Wrap the env-port fallback in an integer cast so $settings['redis.connection']['port'] matches the integer assertions in SwitchableSettingsTest:

--- web/sites/default/includes/modules/settings.redis.php
@@ -31,2 +31,2 @@
-  $settings['redis.connection']['port'] = getenv('REDIS_SERVICE_PORT') ?: '6379';
+  $settings['redis.connection']['port'] = (int) (getenv('REDIS_SERVICE_PORT') ?: 6379);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'DRUPAL_REDIS_ENABLED' => 1,
'VALKEY_HOST' => 'valkey_host',
'VALKEY_SERVICE_PORT' => 1234,
'REDIS_HOST' => 'redis_host',
'REDIS_SERVICE_PORT' => 1234,
'VORTEX_REDIS_EXTENSION_LOADED' => 1,
]);
$this->requireSettingsFile();
$settings['redis.connection']['interface'] = 'PhpRedis';
$settings['redis.connection']['host'] = 'valkey_host';
$settings['redis.connection']['host'] = 'redis_host';
$settings['redis.connection']['port'] = 1234;
$settings['cache']['default'] = 'cache.backend.redis';
$settings['redis.connection']['port'] = (int) (getenv('REDIS_SERVICE_PORT') ?: 6379);
🤖 Prompt for AI Agents
In tests/phpunit/Drupal/SwitchableSettingsTest.php around lines 241 to 252, the
test expects $settings['redis.connection']['port'] to be an integer but the
settings file returns a string from the env fallback; update settings.redis.php
to cast the REDIS_SERVICE_PORT fallback to an integer when assigning the redis
connection port (e.g. ensure the result of env('REDIS_SERVICE_PORT', ...) is
cast to int) so the $settings['redis.connection']['port'] matches the integer
assertions in this test.

@github-actions github-actions bot temporarily deployed to commit September 10, 2025 01:04 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (11)
.vortex/docs/static/img/installer.json (2)

111-111: Leftover “valkey” in summary panel. Replace with “redis”.

The final summary still lists “clamav, solr, valkey”. This contradicts the earlier Redis rename and can confuse viewers.

Apply this minimal fix:

- \u001b[90m│\u001b[39m\u001b[39m   Services                         \u001b[39m\u001b[90m│\u001b[39m\u001b[39m clamav, solr, valkey                    \u001b[39m\u001b[90m│\u001b[39m
+ \u001b[90m│\u001b[39m\u001b[39m   Services                         \u001b[39m\u001b[90m│\u001b[39m\u001b[39m clamav, solr, redis                     \u001b[39m\u001b[90m│\u001b[39m

Run to ensure no other “valkey” remnants remain in this cast:

#!/usr/bin/env bash
rg -nPi --line-number 'valkey' .vortex/docs/static/img/installer.json -C2

1-1: Biome parsing: this is Asciinema cast, not strict JSON.

Either rename to installer.cast and update references, or exclude from Biome lint to stop false parse errors.

Optional ignore example:

+// .biome.json
+{
+  "files": { "ignore": [ ".vortex/docs/static/img/installer.json" ] }
+}
.ahoy.yml (1)

107-111: Make cache flush resilient and non-blocking; add alias for backward compat.

Some images ship only valkey-cli; also prefer async flush and no TTY in CI.

Apply:

   #;< SERVICE_REDIS
   flush-redis:
     usage: Flush Redis cache.
-    cmd: docker compose exec redis redis-cli flushall
+    aliases: [flush-valkey]
+    cmd: docker compose exec -T redis sh -lc 'command -v redis-cli >/dev/null && redis-cli FLUSHALL ASYNC || valkey-cli FLUSHALL ASYNC'
   #;> SERVICE_REDIS
docker-compose.yml (2)

261-265: Make wait_dependencies.command token-aware (avoid brittle string replace).

Represent as a YAML list with tokens, rather than a single string.

   wait_dependencies:
@@
-    command: database:3306 clamav:3310 redis:6379
+    command:
+      - database:3306
+      #;< SERVICE_CLAMAV
+      - clamav:3310
+      #;> SERVICE_CLAMAV
+      #;< SERVICE_REDIS
+      - redis:6379
+      #;> SERVICE_REDIS

185-193: Add a lightweight healthcheck with CLI fallback.

Improves local/CI robustness and integrates with depends_on: condition if used later.

   #;< SERVICE_REDIS
   redis:
     image: uselagoon/valkey-8:25.8.0
+    healthcheck:
+      test: ["CMD-SHELL", "command -v redis-cli >/dev/null && redis-cli ping || valkey-cli ping"]
+      interval: 5s
+      timeout: 3s
+      retries: 10
+      start_period: 5s
     #;< HOSTING_LAGOON
     labels:
       lagoon.type: redis # Change to 'none' if dedicated Redis service is used. See https://docs.lagoon.sh/using-lagoon-advanced/service-types/
     #;> HOSTING_LAGOON
   #;> SERVICE_REDIS
.vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (1)

49-50: Add assertion to ensure no stray “valkey” remains in the “none” scenario.

Keeps the migration airtight by failing on any leftover Valkey references.

           $test->assertSutNotContains('solr');
-          $test->assertSutNotContains('redis');
+          $test->assertSutNotContains('redis');
+          $test->assertSutNotContains('valkey');
CLAUDE.md (1)

341-343: Replace drush php:eval with ahoy flush-redis for safety and consistency.

Avoids inline eval; aligns with “Never use drush php:eval directly”.

-# Flush Redis cache specifically
-ahoy drush eval "\\Drupal::service('cache.backend.redis')->deleteAll();"
+# Flush Redis cache specifically
+ahoy flush-redis
web/sites/default/includes/modules/settings.redis.php (2)

31-33: Ensure port is int, not string.

Prevents subtle type drift in consumers using strict typing.

-  $settings['redis.connection']['host'] = getenv('REDIS_HOST') ?: 'redis';
-  $settings['redis.connection']['port'] = getenv('REDIS_SERVICE_PORT') ?: '6379';
+  $settings['redis.connection']['host'] = getenv('REDIS_HOST') ?: 'redis';
+  $settings['redis.connection']['port'] = (int) (getenv('REDIS_SERVICE_PORT') ?: 6379);

40-40: Don’t enable Redis backend unless php-redis is actually loaded.

Current condition allows enabling solely via env var; tighten the gate.

-  if ((extension_loaded('redis') && getenv('VORTEX_REDIS_EXTENSION_LOADED') === FALSE) || !empty(getenv('VORTEX_REDIS_EXTENSION_LOADED'))) {
+  if (extension_loaded('redis') && getenv('VORTEX_REDIS_EXTENSION_LOADED') !== '0') {
tests/phpunit/Drupal/SwitchableSettingsTest.php (1)

241-244: Cast REDIS_SERVICE_PORT to int in settings.redis.php to match integer assertions.

putenv stores envs as strings; the test expects 1234 (int). Ensure settings.redis.php casts the env value.

Apply in settings.redis.php:

-$settings['redis.connection']['port'] = getenv('REDIS_SERVICE_PORT') ?: '6379';
+$settings['redis.connection']['port'] = (int) (getenv('REDIS_SERVICE_PORT') ?: 6379);

Run to verify:

#!/bin/bash
# Ensure port assignment exists and is integer-cast.
rg -nP "\$settings\['redis\.connection'\]\['port'\]\s*=" web/sites/default/includes/modules/settings.redis.php
rg -nP "(?:\(int\)|intval)\s*\(?\s*getenv\(['\"]REDIS_SERVICE_PORT['\"]\)" web/sites/default/includes/modules/settings.redis.php
.vortex/installer/src/Prompts/Handlers/Services.php (1)

149-156: Drop explicit 'redis:6379' literal replacement; rely on tokenization.

This cleanup is redundant once wait_dependencies.command is tokenized; avoid brittle string deletion in docker-compose.yml.

Apply:

       @unlink($t . DIRECTORY_SEPARATOR . $w . DIRECTORY_SEPARATOR . 'sites/default/includes/modules/settings.redis.php');
-      File::replaceContentInFile($t . DIRECTORY_SEPARATOR . 'docker-compose.yml', 'redis:6379', '');
       File::replaceContentInFile($t . DIRECTORY_SEPARATOR . 'composer.json', '/\s*"drupal\/redis":\s*"[^\"]+",?\n/', "\n");
       @unlink($t . DIRECTORY_SEPARATOR . 'tests/behat/features/redis.feature');
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6949ecc and 2d467b0.

⛔ Files ignored due to path filters (64)
  • .vortex/installer/tests/Fixtures/install/_baseline/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SettingsTestCase.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ai_instructions_claude/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_circleci/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_gha/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/db_download_source_container_registry/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_string/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_profile/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_profile/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_clamav/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_clamav/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/tests/behat/features/-redis.feature is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/web/sites/default/includes/modules/-settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_solr/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_solr/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_absent/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_absent/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_lint/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_lint/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_lint_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_lint_circleci/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_tests/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_tests_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_behat/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_behat_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpcs/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpcs/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpcs_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpcs_circleci/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpmd/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpmd_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpstan/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpstan_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpunit/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpunit_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_rector/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_rector_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_none/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_none/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (27)
  • .ahoy.yml (1 hunks)
  • .env (1 hunks)
  • .vortex/CLAUDE.md (2 hunks)
  • .vortex/docs/content/drupal/README.mdx (1 hunks)
  • .vortex/docs/content/getting-started/features.mdx (2 hunks)
  • .vortex/docs/content/tools/docker.mdx (1 hunks)
  • .vortex/docs/content/workflows/variables.mdx (1 hunks)
  • .vortex/docs/cspell.json (2 hunks)
  • .vortex/docs/src/pages/index.mdx (1 hunks)
  • .vortex/docs/static/img/installer.json (1 hunks)
  • .vortex/installer/src/Prompts/Handlers/Services.php (5 hunks)
  • .vortex/installer/tests/Functional/Handlers/BaselineInstallTest.php (1 hunks)
  • .vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (2 hunks)
  • .vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (1 hunks)
  • .vortex/installer/tests/Unit/Handlers/ServicesPromptManagerTest.php (4 hunks)
  • .vortex/tests/bats/_helper.workflow.bash (1 hunks)
  • .vortex/tests/bats/e2e/workflow.install.db.bats (1 hunks)
  • .vortex/tests/bats/fixtures/docker-compose.env.json (3 hunks)
  • .vortex/tests/bats/fixtures/docker-compose.env_local.json (3 hunks)
  • .vortex/tests/bats/fixtures/docker-compose.env_mod.json (3 hunks)
  • .vortex/tests/bats/fixtures/docker-compose.noenv.json (3 hunks)
  • CLAUDE.md (1 hunks)
  • docker-compose.yml (3 hunks)
  • scripts/custom/provision-10-example.sh (1 hunks)
  • tests/phpunit/Drupal/SettingsTestCase.php (1 hunks)
  • tests/phpunit/Drupal/SwitchableSettingsTest.php (4 hunks)
  • web/sites/default/includes/modules/settings.redis.php (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-08T12:02:24.652Z
Learnt from: AlexSkrypnyk
PR: drevops/vortex#1896
File: .vortex/tests/bats/unit/download-db-lagoon.bats:24-25
Timestamp: 2025-08-08T12:02:24.652Z
Learning: In .vortex/tests/bats/unit Bats tests using ../_helper.bash (run_steps), prefixing a STEPS entry with "- " denotes a negative assertion (the substring must NOT appear in output). Unprefixed entries are positive assertions. Example: "- Database dump refresh requested. Will create a new dump." asserts absence; "Database dump refresh requested. Will create a new dump." asserts presence.

Applied to files:

  • .vortex/tests/bats/e2e/workflow.install.db.bats
  • .vortex/tests/bats/_helper.workflow.bash
📚 Learning: 2025-09-04T10:49:47.322Z
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T10:49:47.322Z
Learning: Never use 'drush php:eval' directly; always use 'drush php:script'

Applied to files:

  • CLAUDE.md
🧬 Code graph analysis (9)
tests/phpunit/Drupal/SwitchableSettingsTest.php (1)
tests/phpunit/Drupal/SettingsTestCase.php (2)
  • setEnvVars (135-166)
  • requireSettingsFile (205-224)
scripts/custom/provision-10-example.sh (1)
scripts/vortex/provision.sh (2)
  • task (68-68)
  • drush (74-74)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
.vortex/installer/src/Utils/File.php (2)
  • File (10-121)
  • removeTokenAsync (93-100)
.vortex/installer/tests/Functional/Handlers/BaselineInstallTest.php (2)
.vortex/installer/src/Prompts/PromptManager.php (2)
  • PromptManager (57-593)
  • makeEnvName (409-411)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (3)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/src/Prompts/Handlers/AbstractHandler.php (1)
  • id (52-62)
.vortex/installer/src/Prompts/Handlers/HandlerInterface.php (1)
  • id (19-19)
.vortex/tests/bats/e2e/workflow.install.db.bats (1)
.vortex/tests/bats/_helper.workflow.bash (1)
  • assert_redis (846-894)
.vortex/tests/bats/_helper.workflow.bash (1)
.vortex/tests/bats/_helper.bash (3)
  • step (1287-1290)
  • substep (1293-1295)
  • sync_to_container (1307-1313)
.vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (5)
.vortex/installer/src/Utils/Env.php (2)
  • Env (7-243)
  • put (24-26)
.vortex/installer/src/Prompts/PromptManager.php (2)
  • PromptManager (57-593)
  • makeEnvName (409-411)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/src/Prompts/Handlers/AiCodeInstructions.php (1)
  • AiCodeInstructions (7-71)
.vortex/installer/tests/Functional/FunctionalTestCase.php (1)
  • assertSutNotContains (139-154)
.vortex/installer/tests/Unit/Handlers/ServicesPromptManagerTest.php (2)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (2)
  • AbstractPromptManagerTestCase (46-266)
  • stubVortexProject (252-258)
🪛 Biome (2.1.2)
.vortex/docs/static/img/installer.json

[error] 65-68: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: build (0)
  • GitHub Check: build (1)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-workflow (4)
  • GitHub Check: vortex-test-deployment (1)
  • GitHub Check: vortex-test-deployment (0)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-workflow (0)
  • GitHub Check: vortex-test-common
  • GitHub Check: vortex-test-installer (8.3)
  • GitHub Check: vortex-test-installer (8.4)
  • GitHub Check: vortex-test-installer (8.2)
  • GitHub Check: vortex-test-docs
🔇 Additional comments (39)
.vortex/docs/src/pages/index.mdx (1)

84-85: Docs: Redis rename reflected in Local Development card.

Copy looks good and consistent with PR intent.

.vortex/docs/static/img/installer.json (1)

65-67: Services step now shows Redis — OK.

The visible selector reflects Redis correctly.

.vortex/docs/content/getting-started/features.mdx (2)

52-53: Docs: Redis cache module reference updated.

Accurate and aligned with Drupal module naming.


135-136: Docs: Stack list switched to Redis.

Good consistency with the service rename.

scripts/custom/provision-10-example.sh (1)

45-49: SERVICE_VALKEY removed and SERVICE_REDIS gates verified
SERVICE_REDIS tags are present in scripts/custom, .ahoy.yml, .env, docker-compose.yml, .vortex docs and installer handlers; no SERVICE_VALKEY remains. Approving merge.

.vortex/docs/content/workflows/variables.mdx (1)

227-228: Docs: DRUPAL_REDIS_ENABLED description corrected.

Clear and points to settings.redis.php — good.

.vortex/docs/cspell.json (1)

12-12: Approve CSpell update: REDIS added; ripgrep confirms no VALKEY entries remain.

.vortex/docs/content/drupal/README.mdx (1)

34-35: Docs: Redis module description fixed.

Accurate and consistent with project direction.

.vortex/docs/content/tools/docker.mdx (1)

214-215: Docs: Service bullet renamed to redis — OK.

Matches docker-compose service naming.

.vortex/tests/bats/fixtures/docker-compose.env_mod.json (2)

376-386: Rename to redis looks correct.

Service name, image, and Lagoon label align with objectives. No issues.


455-456: Dependency wiring updated correctly.

wait_dependencies command and depends_on now target redis; matches the service rename.

Also applies to: 470-473

.env (1)

75-80: Token rename to SERVICE_REDIS is consistent.

Marker swap only; DRUPAL_REDIS_ENABLED remains unchanged. Good.

.vortex/CLAUDE.md (2)

384-385: Token list updated to SERVICE_REDIS.

Docs match code changes. Nothing else to do.


173-174: Verify fixture directory exists
Can’t locate .vortex/installer/tests/Fixtures/install/services_no_redis/ in the repo; please confirm this path (and removal of services_no_valkey/) matches the fixture layout or update the docs accordingly.

.vortex/tests/bats/fixtures/docker-compose.noenv.json (2)

376-386: Redis service block looks good.

Naming, image and label are consistent; no functional changes beyond rename.


455-456: wait_dependencies updated to redis.

Command and depends_on correctly reference redis.

Also applies to: 470-473

.vortex/tests/bats/fixtures/docker-compose.env.json (2)

376-386: Redis service addition is correct.

Consistent with the broader rename; nothing else needed.


455-456: Dependencies switched to redis correctly.

References in command and depends_on now match the new service.

Also applies to: 470-473

docker-compose.yml (1)

65-69: Environment gating for SERVICE_REDIS is correct.

Tokenized DRUPAL_REDIS_ENABLED matches installer expectations.

.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (1)

129-129: Defaults updated to include REDIS.

Matches handler defaults and rename. Looks good.

.vortex/tests/bats/e2e/workflow.install.db.bats (1)

60-62: LGTM: switched to assert_redis at the tail of the workflow.

Aligned with helper rename; sequencing (last to avoid concurrency noise) remains intact.

.vortex/installer/tests/Functional/Handlers/BaselineInstallTest.php (1)

103-104: LGTM: config override dataset updated to REDIS.

Matches Services::REDIS and PromptManager env key usage.

tests/phpunit/Drupal/SettingsTestCase.php (1)

66-67: LGTM: ALLOWED_ENV_VARS updated to REDIS_.

Consistent with settings.redis.php and docker-compose changes.

.vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (2)

22-24: LGTM: “no clamav” dataset now uses [SOLR, REDIS].

Matches service constants and expected behavior.


38-39: LGTM: “no solr” dataset now includes REDIS.

Aligned with handler defaults.

.vortex/installer/tests/Unit/Handlers/ServicesPromptManagerTest.php (1)

24-25: LGTM: tests updated to REDIS and ordering matches discover()’s sort.

Defaults and discovery scenarios correctly reflect [CLAMAV, REDIS, SOLR].

Also applies to: 36-42, 57-62, 91-92

.vortex/tests/bats/_helper.workflow.bash (1)

846-895: LGTM: assert_redis helper mirrors prior flow and uses redis-cli/flush-redis.

Covers enable/disable via DRUPAL_REDIS_ENABLED and validates Drupal status.

tests/phpunit/Drupal/SwitchableSettingsTest.php (4)

234-234: Redis service tokens correctly updated.

Markers align with installer token logic (!SERVICE_REDIS / SERVICE_REDIS).


261-268: Partial Redis settings scenario looks correct.

Env flags and expectations are consistent with the “extension not loaded” path.


309-325: Custom port case reads clean.

Consistent with the rename and prior tests; relies on the same int-cast in settings.redis.php.


333-333: Closing Redis token marker updated — OK.

.vortex/installer/src/Prompts/Handlers/Services.php (5)

14-14: Introduce REDIS constant — aligns public API with new service name.


39-40: Options list updated (Redis) — OK.


47-47: Default selection includes Redis — OK.


75-77: Discovery switched to detect 'redis' service — OK.


106-111: Token handling migrated to SERVICE_REDIS — OK.

.vortex/tests/bats/fixtures/docker-compose.env_local.json (3)

376-386: Service renamed to 'redis' while retaining ValKey image — matches PR intent.


455-456: wait_dependencies switched to redis:6379 — consistent with rename.


470-473: depends_on updated to 'redis' — OK.

Comment on lines +28 to 34
'services, no redis' => [
static::cw(function (): void {
Env::put(PromptManager::makeEnvName(Services::id()), Converter::toList([Services::CLAMAV, Services::SOLR]));
Env::put(PromptManager::makeEnvName(AiCodeInstructions::id()), AiCodeInstructions::CLAUDE);
}),
static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains(['valkey', 'redis'])),
static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains('redis')),
],
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Also assert absence of legacy “valkey” in this negative case.

Adds a guardrail against stray references lingering post-rename.

-        static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains('redis')),
+        static::cw(function (FunctionalTestCase $test): void {
+          $test->assertSutNotContains('redis');
+          $test->assertSutNotContains('valkey');
+        }),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'services, no redis' => [
static::cw(function (): void {
Env::put(PromptManager::makeEnvName(Services::id()), Converter::toList([Services::CLAMAV, Services::SOLR]));
Env::put(PromptManager::makeEnvName(AiCodeInstructions::id()), AiCodeInstructions::CLAUDE);
}),
static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains(['valkey', 'redis'])),
static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains('redis')),
],
'services, no redis' => [
static::cw(function (): void {
Env::put(PromptManager::makeEnvName(Services::id()), Converter::toList([Services::CLAMAV, Services::SOLR]));
Env::put(PromptManager::makeEnvName(AiCodeInstructions::id()), AiCodeInstructions::CLAUDE);
}),
static::cw(function (FunctionalTestCase $test): void {
$test->assertSutNotContains('redis');
$test->assertSutNotContains('valkey');
}),
],
🤖 Prompt for AI Agents
In .vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php around
lines 28–34, the negative test case that asserts absence of 'redis' should also
assert absence of the legacy key 'valkey'; update the test's assertion lambda to
include an additional check (e.g., call $test->assertSutNotContains('valkey')
along with the existing redis check) so the test fails if any stray references
to 'valkey' remain after the rename.

@github-actions github-actions bot temporarily deployed to commit September 10, 2025 01:50 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
tests/phpunit/Drupal/SettingsTestCase.php (1)

63-74: Allow legacy VALKEY_ env vars in tests*
Insert 'VALKEY_' immediately after 'REDIS_' in tests/phpunit/Drupal/SettingsTestCase.php::ALLOWED_ENV_VARS for back-compat with pre-rename variables.

.vortex/tests/bats/_helper.workflow.bash (1)

846-894: Harden Redis checks: fallback to valkey-cli and narrow scan to config keys.

uselagoon/valkey-8 may lack redis-cli. Also scan only config:* to avoid false matches.

Apply:

@@
-  run docker compose exec redis redis-cli --scan
-  assert_output_not_contains "config"
+  run docker compose exec -T redis sh -lc 'command -v redis-cli >/dev/null && redis-cli --scan --pattern "config:*" || valkey-cli --scan --pattern "config:*"'
+  assert_output_not_contains "config:"
@@
-  run docker compose exec redis redis-cli --scan
-  assert_output_contains "config"
+  run docker compose exec -T redis sh -lc 'command -v redis-cli >/dev/null && redis-cli --scan --pattern "config:*" || valkey-cli --scan --pattern "config:*"'
+  assert_output_contains "config:"
♻️ Duplicate comments (10)
.vortex/CLAUDE.md (1)

330-346: Replace drush php:eval with the safer ahoy task.

Keeps docs aligned with the “never use php:eval directly” rule and the new ahoy command.

 ### Redis Caching Service

 ```bash
 # Clear all caches (includes Redis)
 ahoy drush cache:rebuild

 # Check Redis connection status
 ahoy drush php:script -- redis_status

-# Flush Redis cache specifically
-ahoy drush eval "\\Drupal::service('cache.backend.redis')->deleteAll();"
+# Flush Redis cache specifically
+ahoy flush-redis

</blockquote></details>
<details>
<summary>web/sites/default/includes/modules/settings.redis.php (1)</summary><blockquote>

`39-41`: **Fix enabling condition to require php-redis extension.**

Current OR branch allows enabling solely via env var even if the extension is missing.


```diff
-  // Redis uses `redis` PHP extension.
-  if ((extension_loaded('redis') && getenv('VORTEX_REDIS_EXTENSION_LOADED') === FALSE) || !empty(getenv('VORTEX_REDIS_EXTENSION_LOADED'))) {
+  // Redis uses `redis` PHP extension.
+  $toggle = getenv('VORTEX_REDIS_EXTENSION_LOADED');
+  // Enable only if the extension is loaded AND not explicitly disabled (VORTEX_REDIS_EXTENSION_LOADED='0').
+  if (extension_loaded('redis') && ($toggle === FALSE || $toggle !== '0')) {
.ahoy.yml (1)

107-111: Make flush resilient (redis-cli/valkey-cli) and non-blocking.

Add alias for backward compatibility and use FLUSHALL ASYNC.

Apply:

   #;< SERVICE_REDIS
   flush-redis:
     usage: Flush Redis cache.
-    cmd: docker compose exec redis redis-cli flushall
+    aliases: [flush-valkey]
+    cmd: docker compose exec -T redis sh -lc 'command -v redis-cli >/dev/null && redis-cli FLUSHALL ASYNC || valkey-cli FLUSHALL ASYNC'
   #;> SERVICE_REDIS
tests/phpunit/Drupal/SwitchableSettingsTest.php (1)

239-259: Ensure REDIS_SERVICE_PORT is cast to int in settings.redis.php.

Tests set integer ports; settings must assign an int to avoid brittle type mismatches.

Run:

#!/bin/bash
# Verify integer cast in settings.redis.php
rg -nP "\$settings\['redis\.connection'\]\['port'\]\s*=\s*[^;]+;" web/sites/default/includes/modules/settings.redis.php
rg -nP "(?:\(int\)|intval)\s*\(?\s*getenv\(['\"]REDIS_SERVICE_PORT['\"]\)" web/sites/default/includes/modules/settings.redis.php

Also applies to: 287-301, 311-331

docker-compose.yml (2)

185-193: Add a healthcheck for redis with redis-cli/valkey-cli fallback.

Improves robustness in local/CI.

Apply:

 redis:
   image: uselagoon/valkey-8:25.8.0
+  healthcheck:
+    test: ["CMD-SHELL", "command -v redis-cli >/dev/null && redis-cli PING || command -v valkey-cli >/dev/null && valkey-cli PING || exit 1"]
+    interval: 5s
+    timeout: 3s
+    retries: 10
+    start_period: 5s
   #;< HOSTING_LAGOON
   labels:
     lagoon.type: redis # Change to 'none' if dedicated Redis service is used. See https://docs.lagoon.sh/using-lagoon-advanced/service-types/

261-265: Tokenize wait_dependencies.command as YAML list.

Avoids string munging and eases token-based removal.

Apply:

   wait_dependencies:
@@
-    depends_on:
+    depends_on:
@@
-      #;< SERVICE_REDIS
-      - redis
-      #;> SERVICE_REDIS
-    command: database:3306 clamav:3310 redis:6379
+      #;< SERVICE_REDIS
+      - redis
+      #;> SERVICE_REDIS
+    command:
+      - database:3306
+      #;< SERVICE_CLAMAV
+      - clamav:3310
+      #;> SERVICE_CLAMAV
+      #;< SERVICE_REDIS
+      - redis:6379
+      #;> SERVICE_REDIS
.vortex/installer/src/Prompts/Handlers/Services.php (1)

149-156: Avoid string-based removal of 'redis:6379'; rely on tokenized command.

Once docker-compose wait_dependencies.command is a tokenized list, this replacement becomes unnecessary and brittle.

Apply:

     if (!in_array(self::REDIS, $v)) {
       File::rmdir($t . DIRECTORY_SEPARATOR . '.docker/config/redis');
       @unlink($t . DIRECTORY_SEPARATOR . '.docker/redis.dockerfile');
       @unlink($t . DIRECTORY_SEPARATOR . $w . DIRECTORY_SEPARATOR . 'sites/default/includes/modules/settings.redis.php');
-      File::replaceContentInFile($t . DIRECTORY_SEPARATOR . 'docker-compose.yml', 'redis:6379', '');
       File::replaceContentInFile($t . DIRECTORY_SEPARATOR . 'composer.json', '/\s*"drupal\/redis":\s*"[^\"]+",?\n/', "\n");
       @unlink($t . DIRECTORY_SEPARATOR . 'tests/behat/features/redis.feature');
     }

Please confirm that docker-compose.yml has the list-based, token-gated wait_dependencies.command applied (see suggested diff in that file).

.vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (2)

28-34: Also assert absence of legacy “valkey” in the “no redis” case.

Guards against stray remnants after the rename.

Apply:

-        static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains('redis')),
+        static::cw(function (FunctionalTestCase $test): void {
+          $test->assertSutNotContains('redis');
+          $test->assertSutNotContains('valkey');
+        }),

49-50: Add guard against legacy “valkey” in the “none” case.

In a no-services scenario, neither redis nor valkey artifacts should remain.

Apply:

           $test->assertSutNotContains('solr');
-          $test->assertSutNotContains('redis');
+          $test->assertSutNotContains('redis');
+          $test->assertSutNotContains('valkey');
CLAUDE.md (1)

341-343: Replace drush php:eval with ahoy flush-redis.
This contradicts the doc’s own “Never use drush php:eval directly” rule and our prior guidance. Use the documented Ahoy command instead.

-# Flush Redis cache specifically
-ahoy drush eval "\\Drupal::service('cache.backend.redis')->deleteAll();"
+# Flush Redis cache specifically
+ahoy flush-redis
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d467b0 and 74d17e2.

⛔ Files ignored due to path filters (65)
  • .vortex/docs/static/img/installer.svg is excluded by !**/*.svg
  • .vortex/installer/tests/Fixtures/install/_baseline/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SettingsTestCase.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ai_instructions_claude/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_circleci/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_gha/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/db_download_source_container_registry/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_file/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/non_interactive_config_string/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_profile/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_profile/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_clamav/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_clamav/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/tests/behat/features/-redis.feature is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_redis/web/sites/default/includes/modules/-settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_solr/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_solr/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/docker-compose.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_absent/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_absent/CLAUDE.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_lint/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_lint/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_lint_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_lint_circleci/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_tests/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_groups_no_be_tests_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_behat/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_behat_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpcs/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpcs/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpcs_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpcs_circleci/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpmd/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpmd_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpstan/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpstan_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpunit/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_phpunit_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_rector/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_no_rector_circleci/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_none/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/tools_none/web/sites/default/includes/modules/settings.redis.php is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (26)
  • .ahoy.yml (1 hunks)
  • .env (1 hunks)
  • .vortex/CLAUDE.md (2 hunks)
  • .vortex/docs/content/drupal/README.mdx (1 hunks)
  • .vortex/docs/content/getting-started/features.mdx (2 hunks)
  • .vortex/docs/content/tools/docker.mdx (1 hunks)
  • .vortex/docs/content/workflows/variables.mdx (1 hunks)
  • .vortex/docs/cspell.json (2 hunks)
  • .vortex/docs/src/pages/index.mdx (1 hunks)
  • .vortex/installer/src/Prompts/Handlers/Services.php (5 hunks)
  • .vortex/installer/tests/Functional/Handlers/BaselineInstallTest.php (1 hunks)
  • .vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (2 hunks)
  • .vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (1 hunks)
  • .vortex/installer/tests/Unit/Handlers/ServicesPromptManagerTest.php (4 hunks)
  • .vortex/tests/bats/_helper.workflow.bash (1 hunks)
  • .vortex/tests/bats/e2e/workflow.install.db.bats (1 hunks)
  • .vortex/tests/bats/fixtures/docker-compose.env.json (3 hunks)
  • .vortex/tests/bats/fixtures/docker-compose.env_local.json (3 hunks)
  • .vortex/tests/bats/fixtures/docker-compose.env_mod.json (3 hunks)
  • .vortex/tests/bats/fixtures/docker-compose.noenv.json (3 hunks)
  • CLAUDE.md (1 hunks)
  • docker-compose.yml (3 hunks)
  • scripts/custom/provision-10-example.sh (1 hunks)
  • tests/phpunit/Drupal/SettingsTestCase.php (1 hunks)
  • tests/phpunit/Drupal/SwitchableSettingsTest.php (4 hunks)
  • web/sites/default/includes/modules/settings.redis.php (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-08T12:02:24.652Z
Learnt from: AlexSkrypnyk
PR: drevops/vortex#1896
File: .vortex/tests/bats/unit/download-db-lagoon.bats:24-25
Timestamp: 2025-08-08T12:02:24.652Z
Learning: In .vortex/tests/bats/unit Bats tests using ../_helper.bash (run_steps), prefixing a STEPS entry with "- " denotes a negative assertion (the substring must NOT appear in output). Unprefixed entries are positive assertions. Example: "- Database dump refresh requested. Will create a new dump." asserts absence; "Database dump refresh requested. Will create a new dump." asserts presence.

Applied to files:

  • .vortex/tests/bats/e2e/workflow.install.db.bats
  • .vortex/tests/bats/_helper.workflow.bash
📚 Learning: 2025-09-04T10:49:47.322Z
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T10:49:47.322Z
Learning: Never use 'drush php:eval' directly; always use 'drush php:script'

Applied to files:

  • CLAUDE.md
🧬 Code graph analysis (9)
.vortex/tests/bats/e2e/workflow.install.db.bats (1)
.vortex/tests/bats/_helper.workflow.bash (1)
  • assert_redis (846-894)
scripts/custom/provision-10-example.sh (1)
scripts/vortex/provision.sh (2)
  • task (68-68)
  • drush (74-74)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (1)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/tests/bats/_helper.workflow.bash (1)
.vortex/tests/bats/_helper.bash (3)
  • step (1287-1290)
  • substep (1293-1295)
  • sync_to_container (1307-1313)
tests/phpunit/Drupal/SwitchableSettingsTest.php (1)
tests/phpunit/Drupal/SettingsTestCase.php (2)
  • setEnvVars (135-166)
  • requireSettingsFile (205-224)
.vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (4)
.vortex/installer/src/Utils/Env.php (2)
  • Env (7-243)
  • put (24-26)
.vortex/installer/src/Prompts/PromptManager.php (2)
  • PromptManager (57-593)
  • makeEnvName (409-411)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/tests/Functional/FunctionalTestCase.php (1)
  • assertSutNotContains (139-154)
.vortex/installer/tests/Functional/Handlers/BaselineInstallTest.php (2)
.vortex/installer/src/Prompts/PromptManager.php (2)
  • PromptManager (57-593)
  • makeEnvName (409-411)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
.vortex/installer/src/Utils/File.php (2)
  • File (10-121)
  • removeTokenAsync (93-100)
.vortex/installer/tests/Unit/Handlers/ServicesPromptManagerTest.php (2)
.vortex/installer/src/Prompts/Handlers/Services.php (1)
  • Services (10-159)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (2)
  • AbstractPromptManagerTestCase (46-266)
  • stubVortexProject (252-258)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: vortex-test-workflow (4)
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-workflow (0)
🔇 Additional comments (30)
.vortex/docs/src/pages/index.mdx (1)

84-84: LGTM – Redis rename reflected in Local Development card.

.vortex/docs/content/getting-started/features.mdx (1)

52-52: LGTM – Docs consistently updated to Redis.

Also applies to: 135-135

scripts/custom/provision-10-example.sh (1)

45-45: Gating token migration confirmed
No occurrences of SERVICE_VALKEY remain and SERVICE_REDIS gating tokens are present across the codebase.

.vortex/tests/bats/e2e/workflow.install.db.bats (1)

60-61: The scripts above will locate any Docker Compose files defining Redis and reveal the implementation of assert_redis (and whether it invokes redis-cli). Proceed once these results are available to confirm if the test harness indeed requires redis-cli in the container image.

.vortex/docs/cspell.json (1)

12-12: LGTM – Dictionary updated for Redis. No “Valkey” mentions remain in documentation; the sole occurrence is in docker-compose.yml:187 (service image), which doesn’t affect docs.

.vortex/docs/content/drupal/README.mdx (1)

34-34: Doc rename is correct and consistent.

Matches the project-wide Redis terminology and aligns with Drupal module naming.

.vortex/tests/bats/fixtures/docker-compose.env_mod.json (1)

376-386: Verify no residual Valkey references

Run the following to ensure no stray Valkey service names or tokens remain outside the intended valkey-8 image:

grep -RIn --exclude-dir={node_modules,.git} \
  -e 'SERVICE_VALKEY' \
  -e 'VALKEY_' \
  -e 'valkey-cli' \
  -e 'valkey' . \
| grep -v 'valkey-8:'

Applies to .vortex/tests/bats/fixtures/docker-compose.env_mod.json lines 376–386, 455–456, 470–473.

.vortex/CLAUDE.md (2)

173-174: Fixture dir token updated.

services_no_redis directory reference aligns with the token rename.


384-385: Token list updated to SERVICE_REDIS.

Consistent with installer handler rename.

.env (1)

75-80: Approve Redis gating and confirm removal of Valkey tokens.

No SERVICE_VALKEY gating tokens or VALKEY_ variables detected in the repository.

web/sites/default/includes/modules/settings.redis.php (2)

7-9: Doc wording updated to Redis-only.

Accurately reflects the module/service naming.


29-29: $contrib_path is defined upstream. Confirmed in web/sites/default/settings.php (line 55) where $contrib_path is set, so there’s no undefined-variable risk here.

.vortex/tests/bats/fixtures/docker-compose.env.json (1)

376-386: Fixture updates consistent.

Service key, wait list, and depends_on migrated to redis cleanly.

Also applies to: 455-456, 470-473

.vortex/tests/bats/fixtures/docker-compose.env_local.json (1)

376-386: Local fixture aligned with Redis rename.

Matches other fixtures; no functional changes beyond the rename.

Also applies to: 455-456, 470-473

.vortex/tests/bats/fixtures/docker-compose.noenv.json (2)

376-386: Service rename to redis (kept Valkey image) is correct.

Naming and Lagoon label align with the PR intent. No issues.


451-474: wait_dependencies wiring updated to redis looks good.

Switch to redis:6379 and depends_on redis is consistent across the stack.

tests/phpunit/Drupal/SwitchableSettingsTest.php (1)

237-259: Redis test rename and expectations are correct.

Covers host, port, backend, and bootstrap container definition. Looks good.

docker-compose.yml (1)

65-69: Env flag rename to DRUPAL_REDIS_ENABLED is consistent.

Token-wrapped as expected. No issues.

.vortex/installer/src/Prompts/Handlers/Services.php (1)

14-40: Redis rename in constants, options, defaults, and discovery looks correct.

Public surface matches the new service naming.

Also applies to: 47-48, 75-77, 106-111

.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (1)

129-129: Defaults: REDIS inclusion/order matches handler default.

Updated to [CLAMAV, REDIS, SOLR]; consistent with Services::default().

.vortex/installer/tests/Functional/Handlers/BaselineInstallTest.php (1)

103-104: Config-string dataset updated to REDIS.

Swap from VALKEY → REDIS looks correct and aligns with the rename.

.vortex/installer/tests/Functional/Handlers/ServicesInstallTest.php (2)

22-24: Env override uses REDIS (no clamav case).

Good switch to [SOLR, REDIS].


38-40: Env override uses REDIS (no solr case).

Correct replacement; matches new constant.

.vortex/installer/tests/Unit/Handlers/ServicesPromptManagerTest.php (4)

24-25: Prompt default expects REDIS.

Matches updated defaults and public API.


36-42: Discovery: single REDIS service.

Test inputs and expectations align with Services::discover() logic.


57-62: Discovery: all services + sorted order.

Order [CLAMAV, REDIS, SOLR] matches alphabetical sort; good.


91-92: Non-Vortex project snapshot updated to REDIS.

OK; discover() will ignore since not installed, preserving defaults.

CLAUDE.md (3)

330-331: SERVICE_REDIS gating looks correct.
Block start marker aligns with the rename and macro system.


332-340: Good: Redis section and php:script usage follow guidelines.
Header/title and the redis_status example use drush php:script (not php:eval), matching our “Never use drush php:eval directly” rule.


345-345: SERVICE_REDIS gating end marker is consistent.
Matches the start marker; no issues.

Comment on lines +214 to 216
- `redis` - an optional container that runs a Redis server. This container is
used to store the application cache.
- `solr` - an optional container that runs a Solr server. This container is used
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Consistency nit: add host-port hint like Solr section.

-- `redis` - an optional container that runs a Redis server. This container is
-  used to store the application cache.
+- `redis` - an optional container that runs a Redis server. This container is
+  used to store the application cache. It can be accessed from the host via a
+  randomly assigned port - run `docker compose port redis 6379` to get the port
+  number.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `redis` - an optional container that runs a Redis server. This container is
used to store the application cache.
- `solr` - an optional container that runs a Solr server. This container is used
- `redis` - an optional container that runs a Redis server. This container is
used to store the application cache. It can be accessed from the host via a
randomly assigned port – run `docker compose port redis 6379` to get the port
number.
- `solr` - an optional container that runs a Solr server. This container is used
🤖 Prompt for AI Agents
.vortex/docs/content/tools/docker.mdx around lines 214 to 216: the Redis entry
lacks the host-port hint present in the Solr section; update the Redis bullet to
include the host and port information (e.g., add "(host: 6379)") and mirror the
phrasing/format used for the Solr entry so both optional container descriptions
are consistent.

### `DRUPAL_REDIS_ENABLED`

Enable Redis/Valkey integration.<br/>See settings.redis.php for details.
Enable Redis integration.<br/>See settings.redis.php for details.
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Nit: Clarify file reference for readers.
Suggest pointing to the exact path.

-Enable Redis integration.<br/>See settings.redis.php for details.
+Enable Redis integration.<br/>See `web/sites/default/includes/modules/settings.redis.php` for details.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Enable Redis integration.<br/>See settings.redis.php for details.
Enable Redis integration.<br/>See `web/sites/default/includes/modules/settings.redis.php` for details.
🤖 Prompt for AI Agents
.vortex/docs/content/workflows/variables.mdx around line 227: the reference
"settings.redis.php" is ambiguous for readers; update the sentence to point to
the exact repository path to that file (use the relative path from the repo
root, e.g., config/settings.redis.php or wherever the file actually lives) and,
if MDX supports it, make it a clickable link to the file so readers can jump
directly to the configuration details.

Comment on lines 852 to 860

substep "Disable ValKey integration with Drupal"
substep "Disable Redis integration with Drupal"
add_var_to_file .env "DRUPAL_REDIS_ENABLED" "0"
sync_to_container
run ahoy up
assert_success
sleep 10
ahoy flush-valkey
ahoy flush-redis

Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Replace sleeps with dependency wait to reduce flakiness.

Use the existing wait_dependencies service instead of fixed delays.

Apply:

@@
-  run ahoy up
+  run ahoy up wait_dependencies
   assert_success
-  sleep 10
   ahoy flush-redis
@@
-  run ahoy up
+  run ahoy up wait_dependencies
   assert_success
-  sleep 10
   ahoy flush-redis

Also applies to: 876-884

🤖 Prompt for AI Agents
.vortex/tests/bats/_helper.workflow.bash lines 852-860 (and similarly lines
876-884): the test uses a fixed sleep (sleep 10) after bringing services up,
which causes flakiness; replace the sleep with the existing dependency wait
helper by invoking the wait_dependencies service/function after ahoy up and
assert_success (e.g., call wait_dependencies or ahoy wait_dependencies as used
elsewhere in this test suite) so the script explicitly waits for required
services to be ready; apply the same change to the block at 876-884.

Comment on lines +31 to 33
$settings['redis.connection']['host'] = getenv('REDIS_HOST') ?: 'redis';
$settings['redis.connection']['port'] = getenv('REDIS_SERVICE_PORT') ?: '6379';

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Cast port to int and validate.

Prevents string/invalid values from leaking into settings.

-  $settings['redis.connection']['port'] = getenv('REDIS_SERVICE_PORT') ?: '6379';
+  $port = getenv('REDIS_SERVICE_PORT');
+  $settings['redis.connection']['port'] = is_numeric($port) && (int) $port > 0 ? (int) $port : 6379;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$settings['redis.connection']['host'] = getenv('REDIS_HOST') ?: 'redis';
$settings['redis.connection']['port'] = getenv('REDIS_SERVICE_PORT') ?: '6379';
$settings['redis.connection']['host'] = getenv('REDIS_HOST') ?: 'redis';
$port = getenv('REDIS_SERVICE_PORT');
$settings['redis.connection']['port'] = is_numeric($port) && (int) $port > 0
? (int) $port
: 6379;
🤖 Prompt for AI Agents
In web/sites/default/includes/modules/settings.redis.php around lines 31 to 33,
the port is set from getenv() as a string which can allow invalid or non-numeric
values to leak into settings; cast the retrieved value to an integer and
validate it (e.g., use intval or equivalent, then ensure it's within a valid
port range like 1–65535), and if validation fails fall back to the default 6379;
assign the validated integer to $settings['redis.connection']['port'] so the
settings always store a proper int.

@AlexSkrypnyk AlexSkrypnyk merged commit 3ecce06 into develop Sep 10, 2025
31 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/back-to-redis branch September 10, 2025 03:08
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Released in 25.10.0

Development

Successfully merging this pull request may close these issues.

Rename valkey service back to redis in container stack and installer

2 participants