Repository: drevops/vortex
Pull request #1638: [#1609]: Added `DRUPAL_SHIELD_DISABLED` variable.
Author: login: skipper-vp
Labels: name: AUTOMERGE
description: Pull request has been approved and set to automerge
Created: 2025-05-14T01:44:57Z | Merged: 2025-05-14T11:24:28Z

Closes #1609

Added DRUPAL_SHIELD_DISABLED variable.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced support for disabling the Shield feature via the `DRUPAL_SHIELD_DISABLED` environment variable, allowing users to easily turn off Shield protection regardless of other settings.
- **Tests**
  - Expanded test coverage to verify Shield behavior with various values of the `DRUPAL_SHIELD_DISABLED` environment variable across different environments.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Linked issue #1609: Allow to disable shield in the environment with a flag
Add this to the bottom of `settings.shield.php` and update unit tests. Also, update docs.

```
// Allow to disable Shield completely in the environment.
if (getenv('DRUPAL_SHIELD_DISABLED')) {
  $config['shield.settings']['shield_enable'] = FALSE;
}
```

Diff:
diff --git a/.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php
index 40a6846b6..a6686809e 100644
--- a/.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php
+++ b/.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php
@@ -390,6 +390,121 @@ public static function dataProviderShield(): array {
           'shield.settings' => ['shield_enable' => TRUE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
         ],
       ],
+
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => '',
+        ],
+        [
+          'shield.settings' => ['shield_enable' => TRUE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => 0,
+        ],
+        [
+          'shield.settings' => ['shield_enable' => TRUE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => 1,
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => '0',
+        ],
+        [
+          'shield.settings' => ['shield_enable' => TRUE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => '1',
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => 'false',
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => 'true',
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_DISABLED' => TRUE,
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE],
+        ],
+      ],
+      [
+        static::ENVIRONMENT_STAGE,
+        [
+          'DRUPAL_SHIELD_DISABLED' => TRUE,
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE],
+        ],
+      ],
+      [
+        static::ENVIRONMENT_PROD,
+        [
+          'DRUPAL_SHIELD_DISABLED' => TRUE,
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE],
+        ],
+      ],
     ];
   }
 
diff --git a/.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php b/.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php
index a73526914..ee11b94ec 100644
--- a/.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php
+++ b/.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php
@@ -40,3 +40,8 @@
 if (getenv('DRUPAL_SHIELD_PRINT')) {
   $config['shield.settings']['print'] = getenv('DRUPAL_SHIELD_PRINT');
 }
+
+// Allow to disable Shield completely in the environment.
+if (!empty(getenv('DRUPAL_SHIELD_DISABLED'))) {
+  $config['shield.settings']['shield_enable'] = FALSE;
+}
diff --git a/.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php b/.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php
index a73526914..ee11b94ec 100644
--- a/.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php
+++ b/.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php
@@ -40,3 +40,8 @@
 if (getenv('DRUPAL_SHIELD_PRINT')) {
   $config['shield.settings']['print'] = getenv('DRUPAL_SHIELD_PRINT');
 }
+
+// Allow to disable Shield completely in the environment.
+if (!empty(getenv('DRUPAL_SHIELD_DISABLED'))) {
+  $config['shield.settings']['shield_enable'] = FALSE;
+}
diff --git a/tests/phpunit/Drupal/SwitchableSettingsTest.php b/tests/phpunit/Drupal/SwitchableSettingsTest.php
index 6bbac1253..4b5262b6d 100644
--- a/tests/phpunit/Drupal/SwitchableSettingsTest.php
+++ b/tests/phpunit/Drupal/SwitchableSettingsTest.php
@@ -398,6 +398,121 @@ public static function dataProviderShield(): array {
           'shield.settings' => ['shield_enable' => TRUE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
         ],
       ],
+
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => '',
+        ],
+        [
+          'shield.settings' => ['shield_enable' => TRUE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => 0,
+        ],
+        [
+          'shield.settings' => ['shield_enable' => TRUE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => 1,
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => '0',
+        ],
+        [
+          'shield.settings' => ['shield_enable' => TRUE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => '1',
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => 'false',
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+          'DRUPAL_SHIELD_DISABLED' => 'true',
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE, 'credentials' => ['shield' => ['user' => 'drupal_shield_user', 'pass' => 'drupal_shield_pass']], 'print' => 'drupal_shield_print'],
+        ],
+      ],
+
+      [
+        static::ENVIRONMENT_DEV,
+        [
+          'DRUPAL_SHIELD_DISABLED' => TRUE,
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE],
+        ],
+      ],
+      [
+        static::ENVIRONMENT_STAGE,
+        [
+          'DRUPAL_SHIELD_DISABLED' => TRUE,
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE],
+        ],
+      ],
+      [
+        static::ENVIRONMENT_PROD,
+        [
+          'DRUPAL_SHIELD_DISABLED' => TRUE,
+        ],
+        [
+          'shield.settings' => ['shield_enable' => FALSE],
+        ],
+      ],
     ];
   }
 
diff --git a/web/sites/default/includes/modules/settings.shield.php b/web/sites/default/includes/modules/settings.shield.php
index a73526914..ee11b94ec 100644
--- a/web/sites/default/includes/modules/settings.shield.php
+++ b/web/sites/default/includes/modules/settings.shield.php
@@ -40,3 +40,8 @@
 if (getenv('DRUPAL_SHIELD_PRINT')) {
   $config['shield.settings']['print'] = getenv('DRUPAL_SHIELD_PRINT');
 }
+
+// Allow to disable Shield completely in the environment.
+if (!empty(getenv('DRUPAL_SHIELD_DISABLED'))) {
+  $config['shield.settings']['shield_enable'] = FALSE;
+}


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: ASSERTIVE**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between ff67855a965ee7ad25127776e5d136286d62f3a3 and 83de756eaf0500d42641d32827e373a28d7d07ce.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `.env` (1 hunks)
* `.vortex/docs/content/workflows/variables.mdx` (1 hunks)
* `tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `web/sites/default/includes/modules/settings.shield.php` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 GitHub Actions: Vortex - Test docs</summary>

<details>
<summary>.vortex/docs/content/workflows/variables.mdx</summary>

[error] 160-179: Documentation is not up-to-date. The file '.vortex/docs/content/workflows/variables.mdx' has changes that need to be committed. Run 'cd .vortex && ahoy update-docs' and commit changes.

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (12)</summary>

* GitHub Check: build (1)
* GitHub Check: build (0)
* GitHub Check: vortex-test-workflow (3)
* GitHub Check: vortex-test-deployment (1)
* GitHub Check: vortex-test-workflow (2)
* GitHub Check: vortex-test-deployment (0)
* GitHub Check: vortex-test-workflow (1)
* GitHub Check: vortex-test-workflow (0)
* GitHub Check: vortex-test-installer (8.4)
* GitHub Check: vortex-test-installer (8.3)
* GitHub Check: vortex-test-common
* GitHub Check: vortex-test-installer (8.2)

</details>

<details>
<summary>🔇 Additional comments (3)</summary><blockquote>

<details>
<summary>.env (1)</summary>

`57-59`: **LGTM: Environment variable added correctly**

The new `DRUPAL_SHIELD_DISABLED` environment variable follows project conventions, using a descriptive name and default value of `0` (disabled) which is consistent with other boolean flags in the file.

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

`44-47`: **LGTM: Shield disabling logic implemented correctly**

The implementation checks for the presence of the environment variable and correctly overrides any previous Shield settings, which aligns well with the approach used elsewhere in this file. The conditional check follows the pattern used for other environment variables, and the comment clearly explains the purpose.

</details>
<details>
<summary>tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`96-130`: **LGTM: Comprehensive test implementation**

The test thoroughly verifies that Shield can be disabled via the environment variable across all relevant environment types while preserving other Shield-related settings. The data provider approach ensures consistency across environments. Good job implementing proper test coverage for this new feature.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-14T01:47:13Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 2**

<details>
<summary>♻️ Duplicate comments (1)</summary><blockquote>

<details>
<summary>.vortex/docs/content/workflows/variables.mdx (1)</summary><blockquote>

`163-170`: _⚠️ Potential issue_

**Fix documentation default value inconsistency**

The default value is listed as `UNDEFINED` in this documentation, which is inconsistent with the `.env` file where it's set to `0`. Additionally, the pipeline failures indicate that the documentation needs to be updated and committed.



```diff
Shield disabled.

-Default value: `UNDEFINED`
+Default value: `0`

Defined in: `.env`
```

Please run `cd .vortex && ahoy update-docs` and commit the changes to resolve the pipeline error.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: ASSERTIVE**
**Plan: Lite**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 83de756eaf0500d42641d32827e373a28d7d07ce and ff9dcd89fe4c6030a221fae5837f6594a12dd998.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `.env` (1 hunks)
* `.vortex/docs/content/workflows/variables.mdx` (1 hunks)
* `tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `web/sites/default/includes/modules/settings.shield.php` (1 hunks)

</details>

<details>
<summary>🔇 Additional comments (2)</summary><blockquote>

<details>
<summary>.env (1)</summary>

`57-59`: **Good addition of a new control flag for Shield.**

This addition follows the established pattern for environment variables and provides a clear way to disable Shield functionality regardless of other settings.

</details>
<details>
<summary>tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`96-130`: **Good test coverage for the new functionality.**

The test effectively verifies that the Shield feature can be disabled across all environments when the DRUPAL_SHIELD_DISABLED flag is set.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-14T01:50:01Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>🔭 Outside diff range comments (1)</summary><blockquote>

<details>
<summary>.vortex/installer/tests/Fixtures/install/services_none/.env (1)</summary><blockquote>

`5-17`: _💡 Verification agent_

<details>
<summary>🧩 Analysis chain</summary>

**Remove legacy Valkey and ClamAV settings**  
All `DRUPAL_VALKEY_ENABLED`, `DRUPAL_CLAMAV_ENABLED`, and related mode flags have been removed in favor of the new `DRUPAL_SHIELD_DISABLED` toggle.  

Please verify that no remaining test cases or modules reference `DRUPAL_VALKEY_ENABLED` or `DRUPAL_CLAMAV_ENABLED`:

---

🏁 Script executed:

```shell
#!/bin/bash
# Check for residual references to removed service flags.
rg -n 'DRUPAL_VALKEY_ENABLED'
rg -n 'DRUPAL_CLAMAV_ENABLED'
```

Length of output: 1274

---



</details>

**Remove residual DRUPAL_VALKEY_ENABLED and DRUPAL_CLAMAV_ENABLED references**  
The search showed that legacy flags are still referenced in several places. Please update or remove these, replacing with the new `DRUPAL_SHIELD_DISABLED` toggle as appropriate:

- tests/phpunit/Drupal/SwitchableSettingsTest.php  
  • Lines 277, 301: `'DRUPAL_VALKEY_ENABLED'`  
  • Lines 27, 47, 65: `'DRUPAL_CLAMAV_ENABLED'`  
- web/sites/default/includes/modules/settings.redis.php  
  • Code block around `if (file_exists($contrib_path . '/redis') && !empty(getenv('DRUPAL_VALKEY_ENABLED')))`  
- web/sites/default/includes/modules/settings.clamav.php  
  • Code block around `if (file_exists($contrib_path . '/clamav') && !empty(getenv('DRUPAL_CLAMAV_ENABLED')))`  
- docker-compose.yml (line 77)  
  • `DRUPAL_VALKEY_ENABLED: ${DRUPAL_VALKEY_ENABLED:-}`  

Remove or refactor these to use `DRUPAL_SHIELD_DISABLED` and ensure all tests and configs are updated accordingly.

</blockquote></details>

</blockquote></details>

<details>
<summary>♻️ Duplicate comments (3)</summary><blockquote>

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

`44-47`: **Consider using a more explicit boolean check for DRUPAL_SHIELD_DISABLED.**

The current implementation will treat any non-empty value (including "0") as truthy, which may not be the intended behavior for a boolean toggle.

```diff
// Allow to disable Shield completely in the environment.
-if (getenv('DRUPAL_SHIELD_DISABLED')) {
+if (getenv('DRUPAL_SHIELD_DISABLED') && filter_var(getenv('DRUPAL_SHIELD_DISABLED'), FILTER_VALIDATE_BOOLEAN)) {
  $config['shield.settings']['shield_enable'] = FALSE;
}
```

This ensures only values like "1", "true", "yes" will disable Shield, while "0", "false", "no" will not.

</blockquote></details>
<details>
<summary>.vortex/docs/content/workflows/variables.mdx (1)</summary><blockquote>

`163-170`: **Fix documentation default value inconsistency.**

The default value is listed as `UNDEFINED` in this documentation, which is inconsistent with the `.env` file where it's set to `0`. 

```shell
#!/bin/bash
# Verify the default value in .env file
grep "DRUPAL_SHIELD_DISABLED" .env | grep -v "^#"
```

Please run `cd .vortex && ahoy update-docs` and commit the changes to resolve the documentation inconsistency.

</blockquote></details>
<details>
<summary>tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary><blockquote>

`96-118`: _🛠️ Refactor suggestion_

**Consider adding tests with different DRUPAL_SHIELD_DISABLED values.**

The test currently uses a boolean `TRUE` for `DRUPAL_SHIELD_DISABLED`, but environment variables are typically strings. Consider testing with string values like "1" or "0" to ensure the implementation correctly handles various input types.



```diff
  public function testShieldDisabled(string $env): void {
    $this->setEnvVars([
      'DRUPAL_ENVIRONMENT' => $env,
      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
-     'DRUPAL_SHIELD_DISABLED' => TRUE,
+     'DRUPAL_SHIELD_DISABLED' => '1',
    ]);

    $this->requireSettingsFile();

    $config['shield.settings']['shield_enable'] = FALSE;
    $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
    $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
    $config['shield.settings']['print'] = 'drupal_shield_print';

    $this->assertConfigContains($config);
  }
  
  /**
   * Test Shield remains enabled when DRUPAL_SHIELD_DISABLED is falsy.
   *
   * @dataProvider dataProviderEnvironments
   */
  public function testShieldNotDisabled(string $env): void {
    // Skip local and CI environments as they have special handling
    if ($env === static::ENVIRONMENT_LOCAL || $env === static::ENVIRONMENT_CI) {
      $this->markTestSkipped('Local and CI environments disable Shield by default.');
    }
    
    $this->setEnvVars([
      'DRUPAL_ENVIRONMENT' => $env,
      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
      'DRUPAL_SHIELD_DISABLED' => '0',
    ]);

    $this->requireSettingsFile();

    // For environments other than production, Shield should be enabled
    $expectedEnabled = $env !== static::ENVIRONMENT_PROD;
    
    $config['shield.settings']['shield_enable'] = $expectedEnabled;
    $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
    $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
    $config['shield.settings']['print'] = 'drupal_shield_print';

    $this->assertConfigContains($config);
  }
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: ASSERTIVE**
**Plan: Lite**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between ff9dcd89fe4c6030a221fae5837f6594a12dd998 and ee288cfbdf9b2bf05d45e7fa2b1f45f111531fee.

</details>

<details>
<summary>📒 Files selected for processing (28)</summary>

* `.env` (1 hunks)
* `.vortex/docs/content/workflows/variables.mdx` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/_baseline/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_acquia/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_container_registry/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_ftp/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_lagoon/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_all_gha/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_artifact/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_container_image/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_lagoon/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_none_gha/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/hosting_acquia/.env` (4 hunks)
* `.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/hosting_lagoon/.env` (4 hunks)
* `.vortex/installer/tests/Fixtures/install/names/.env` (3 hunks)
* `.vortex/installer/tests/Fixtures/install/provision_profile/.env` (3 hunks)
* `.vortex/installer/tests/Fixtures/install/services_no_clamav/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_no_valkey/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_no_valkey/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_none/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `web/sites/default/includes/modules/settings.shield.php` (1 hunks)

</details>

<details>
<summary>🔇 Additional comments (49)</summary><blockquote>

<details>
<summary>.env (1)</summary>

`57-58`: **Add `DRUPAL_SHIELD_DISABLED` to control Shield enablement**  
Introducing `DRUPAL_SHIELD_DISABLED` provides an explicit override for Shield. Please ensure you have:  
- Updated `.env.local.example` with the same key and default.  
- Updated any `.env.schema` or validation logic if present.  
- Confirmed that documentation (e.g., `.vortex/docs/content/workflows/variables.mdx`) reflects this new variable and its default of `0`.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/.env (1)</summary>

`5-6`: **Expand `VORTEX_DEPLOY_TYPES` in CircleCI fixture**  
Updating this fixture to include all supported deployment mechanisms (`webhook,container_image,lagoon,artifact`) aligns it with other CI environments. Verify that the code branches handling `VORTEX_DEPLOY_TYPES` correctly parse and act on these new values.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_none_gha/.env (1)</summary>

`5-12`: **Remove deployment block for “none” GHA fixture**  
Dropping the `VORTEX_DEPLOY_TYPES=webhook` block cleanly disables deployment triggers in this fixture. This mirrors the pattern in other “none” fixtures.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/.env (1)</summary>

`5-12`: **Remove deployment block for “none” CircleCI fixture**  
Consistent with the GHA variant, this removal disables deployment in the CircleCI “none” fixture.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_container_registry/.env (2)</summary>

`5-14`: **Switch database download source to `container_registry`**  
Changing `VORTEX_DB_DOWNLOAD_SOURCE` to `container_registry` and adding `VORTEX_DB_IMAGE` is correct. Please verify that:  
- Installer logic supports `container_registry` as a source type.  
- Documentation and any schema files reference this new source and image variable.

---

`23-36`: **Remove demo URL section**  
The demo section for URL-based DB downloads has been removed. Ensure that any downstream demo workflows or fixtures are updated to use the container registry image instead of the URL.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_artifact/.env (1)</summary>

`5-6`: **Deployment type updated to match fixture purpose.**

The change from `webhook` to `artifact` for `VORTEX_DEPLOY_TYPES` correctly aligns this test fixture with its intended deployment type configuration.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_container_image/.env (1)</summary>

`5-6`: **Deployment type updated to match fixture purpose.**

The change from `webhook` to `container_image` for `VORTEX_DEPLOY_TYPES` correctly aligns this test fixture with its intended deployment type configuration.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_clamav/.env (1)</summary>

`5-12`: **ClamAV configuration removed from no_clamav fixture.**

The removal of ClamAV-related environment variables is appropriate for a fixture specifically designed to test the system without ClamAV integration.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php (1)</summary>

`44-47`: **Good addition to allow disabling Shield through environment configuration.**

This change introduces a flexible way to disable the Shield feature through an environment variable, which fits well with the codebase's existing pattern of environment-based configuration.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/.env (1)</summary>

`55-56`: **Good addition of Shield disable configuration with default of off.**

The environment variable is well documented with a clear description and default value of `0`, which maintains Shield protection by default.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_lagoon/.env (1)</summary>

`5-6`: **Correct deployment type for Lagoon fixture**  
The `VORTEX_DEPLOY_TYPES` value has been updated from `webhook` to `lagoon`, matching the directory’s purpose. This ensures the CI fixture aligns with the Lagoon environment.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_all_gha/.env (1)</summary>

`5-6`: **Expand allowed deploy types in GHA fixture**  
Updating `VORTEX_DEPLOY_TYPES` to `webhook,container_image,lagoon,artifact` standardizes this fixture with the others. All supported deployment mechanisms are now included.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/provision_profile/.env (3)</summary>

`5-6`: **Switch provision type to profile**  
Changing `VORTEX_PROVISION_TYPE` from `database` to `profile` aligns this fixture with profile-based provisioning and removes unnecessary DB dump steps.

---

`14-26`: **Remove database download configuration**  
The block defining `VORTEX_DB_DOWNLOAD_SOURCE`, `VORTEX_DB_DOWNLOAD_URL`, and `VORTEX_DB_DOWNLOAD_ENVIRONMENT` has been removed, which is consistent with profile-based installs that no longer require a database dump.

---

`35-47`: **Clean up demo database section**  
Dropping the demo-only `VORTEX_DB_DOWNLOAD_URL` section prevents confusion in profile installs and keeps this fixture focused on production-like provisioning.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_none/.env (1)</summary>

`3-3`: **Introduce explicit Shield disable flag**  
Added `DRUPAL_SHIELD_DISABLED=0` to clearly disable Shield in this fixture. This new variable centralizes the disabling logic.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_lagoon/.env (3)</summary>

`5-6`: **Update DB download source to Lagoon**  
Changed `VORTEX_DB_DOWNLOAD_SOURCE` from `url` to `lagoon` to match the hosting environment’s API-based dump retrieval.

---

`8-12`: **Remove obsolete CURL download block**  
Dropping the `VORTEX_DB_DOWNLOAD_URL` and its CURL-specific comments cleans up the fixture, as the Lagoon source no longer uses direct URLs.

---

`19-22`: **Eliminate demo database URL section**  
Removed the demo-only `VORTEX_DB_DOWNLOAD_URL` snippet to prevent stale references in the Lagoon download fixture.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_acquia/.env (3)</summary>

`5-6`: **Unrelated to Shield feature but changes look good.**

The change of database download source from `url` to `acquia` is unrelated to the PR's main purpose of adding `DRUPAL_SHIELD_DISABLED`, but the change itself is correct and aligns with the shift to hosting-specific download sources.

---

`8-12`: **Clean removal of URL-based download configuration.**

Removal of these URL-specific comments and variables is appropriate since the download source has been changed to Acquia-specific.

---

`20-22`: **Proper cleanup of demo database URL.**

Good cleanup of the demo database URL that's no longer needed with the Acquia download source.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/names/.env (3)</summary>

`5-6`: **Project name change looks good.**

The change from `star_wars` to `the_new_hope` is consistent and appears to be part of a broader fixture renaming effort, unrelated to the `DRUPAL_SHIELD_DISABLED` feature.

---

`14-15`: **Theme name change looks appropriate.**

Changing the theme name from `star_wars` to `lightsaber` continues the fixture renaming pattern.

---

`21-22`: **Domain name changes are consistent.**

All domain name changes from `star-wars-domain.example` to `the-new-hope-domain.example` are consistent across all references in the file.



Also applies to: 30-31, 39-40, 48-49

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_ftp/.env (3)</summary>

`5-6`: **Database download source change looks good.**

Changing from `url` to `ftp` is appropriate for this fixture.

---

`8-22`: **FTP configuration is well-structured.**

The new FTP-specific variables are properly documented with clear comments. The default values for port (21) and file name (db.sql) are sensible defaults for FTP.

---

`30-32`: **Demo URL cleanup is appropriate.**

Proper removal of the demo URL that's no longer needed with the FTP download source.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_valkey/.env (2)</summary>

`2-3`: **Good implementation of DRUPAL_SHIELD_DISABLED.**

This change adds the new `DRUPAL_SHIELD_DISABLED` variable with a default value of `0` (not disabled). This matches the PR objective to add the ability to disable Shield via an environment variable.

---

`5-7`: **Appropriate removal of Valkey integration settings.**

Removing the Valkey-related settings aligns with the fixture's purpose of not having Valkey services.

</details>
<details>
<summary>tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`123-130`: **Well-structured data provider.**

The data provider includes all the necessary environments (DEV, STAGE, PROD, SUT) for comprehensive testing. This ensures the Shield disabling feature works consistently across all environments.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_valkey/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`4-50`: **Simplified codebase by removing legacy Valkey tests.**

The removal of the `testValkey` and `testValkeyPartial` test methods is part of a broader effort to clean up Valkey-related environment variables and tests across the codebase. This aligns with the deprecation of Valkey integration support.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_lagoon/.env (5)</summary>

`4-14`: **Added dedicated HOSTING section for Lagoon configuration.**

Good addition of a structured HOSTING section with Lagoon-specific variables like `LAGOON_PROJECT` and `VORTEX_LAGOON_PRODUCTION_BRANCH`. This improves code organization and readability.

---

`21-23`: **Updated database download source to use Lagoon.**

Changed the database download source from generic 'url' to the more specific 'lagoon', which better reflects the actual source of the database in this hosting environment.

---

`24-29`: **Removed unused database download URL configuration.**

Cleaning up the previously commented-out URL-based database download configuration helps maintain a cleaner configuration file since it's no longer needed with the Lagoon-specific source.

---

`35-38`: **Updated deployment type to match hosting environment.**

Changed deployment type from 'webhook' to 'lagoon' to properly align with the Lagoon hosting environment's deployment mechanism.

---

`42-49`: **Removed unused database download demonstration URL.**

Cleaned up the configuration by removing the example URL for database download that's no longer needed with the Lagoon-specific database source.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php (2)</summary>

`92-114`: **Added comprehensive test for Shield disabling functionality.**

Excellent addition of the `testShieldDisabled` method that verifies the Shield module can be completely disabled using the new `DRUPAL_SHIELD_DISABLED` environment variable. The test properly verifies that:
1. Shield is disabled (`shield_enable` is set to `FALSE`)
2. Shield credentials and print settings are still preserved when disabled

This test ensures the new functionality works as expected.

---

`116-126`: **Added data provider for Shield disabled testing across environments.**

Good implementation of a data provider that tests the Shield disabling functionality across all environments (DEV, STAGE, PROD, SUT). This ensures the feature works consistently in all deployment contexts.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_acquia/.env (7)</summary>

`4-6`: **Updated web root directory for Acquia compatibility.**

Changed web root directory from 'web' to 'docroot' to match Acquia's standard directory structure, improving compatibility with Acquia hosting.

---

`13-19`: **Added dedicated HOSTING section for Acquia configuration.**

Good addition of a structured HOSTING section with the Acquia-specific variable `VORTEX_ACQUIA_APP_NAME`. This improves code organization and readability.

---

`27-29`: **Updated database download source to use Acquia.**

Changed the database download source from generic 'url' to the more specific 'acquia', which better reflects the actual source of the database in this hosting environment.

---

`30-35`: **Removed unused database download URL configuration.**

Cleaning up the previously commented-out URL-based database download configuration helps maintain a cleaner configuration file since it's no longer needed with the Acquia-specific source.

---

`41-43`: **Added Acquia-specific database configuration.**

Good addition of the `VORTEX_DB_DOWNLOAD_ACQUIA_DB_NAME` variable to specify which database to download from Acquia.

---

`50-52`: **Updated deployment type to match hosting environment.**

Changed deployment type from 'webhook' to 'artifact' to properly align with the Acquia hosting environment's deployment mechanism.

---

`56-63`: **Removed unused database download demonstration URL.**

Cleaned up the configuration by removing the example URL for database download that's no longer needed with the Acquia-specific database source.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php (2)</summary>

`4-58`: **Verify that ClamAV test removals are intentional.**

I see you've removed the ClamAV-related test methods (`testClamavDaemonCustom`, `testClamavExecutable`, and `testClamavDaemonDefaults`). Based on the PR context, this appears to be part of a coordinated change to simplify or remove ClamAV integration settings from the `services_none` fixture.

Could you confirm that:
1. These tests are intentionally removed as part of the broader architectural changes
2. ClamAV functionality is either fully removed from this fixture or tested elsewhere
3. There are no regressions in testing coverage for any remaining ClamAV functionality

---

`65-116`: **Verify that Valkey test removals are intentional.**

Similar to the ClamAV tests, you've removed the Valkey Redis connection test methods (`testValkey` and `testValkeyPartial`). This appears to align with simplifying the services_none fixture.

Please confirm that:
1. These Valkey test removals are intentional
2. The Valkey functionality is either fully removed from this fixture or tested elsewhere
3. Test coverage for any remaining Valkey functionality is maintained

Additionally, since the PR is focused on adding the `DRUPAL_SHIELD_DISABLED` variable, could you verify that tests for this new functionality have been added in the appropriate test files as mentioned in the summary?

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-14T02:46:04Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 3**

<details>
<summary>🔭 Outside diff range comments (1)</summary><blockquote>

<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/.env (1)</summary><blockquote>

`5-12`: _🧹 Nitpick (assertive)_

**Add a placeholder to document removed deployment section**  
The removal of the `DEPLOYMENT` block and `VORTEX_DEPLOY_TYPES` makes this fixture a "no-deployment" scenario. For clarity, consider adding a brief comment above the `NOTIFICATIONS` section, e.g.:  
```diff
+ # Deployment disabled in this fixture (no deploy types)
```

</blockquote></details>

</blockquote></details>

<details>
<summary>♻️ Duplicate comments (5)</summary><blockquote>

<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_none_gha/.env (1)</summary><blockquote>

`5-12`: _🧹 Nitpick (assertive)_

**Add a placeholder to document removed deployment section**  
Same as above: since the deployment block was removed, consider a comment clarifying that this fixture intentionally has no deployment types.

</blockquote></details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php (1)</summary><blockquote>

`43-47`: **Consider clarifying expected values for DRUPAL_SHIELD_DISABLED.**

The implementation of a global Shield disable switch is clean and follows the established pattern. However, PHP treats any non-empty string as true in boolean context, so values like "0" would still disable Shield.


Consider making the check more explicit about the expected values:

```diff
-// Allow to disable Shield completely in the environment.
+// Allow to disable Shield completely by setting DRUPAL_SHIELD_DISABLED=1 in the environment.
 if (getenv('DRUPAL_SHIELD_DISABLED')) {
   $config['shield.settings']['shield_enable'] = FALSE;
 }
```

Or for more strict checking:

```diff
-if (getenv('DRUPAL_SHIELD_DISABLED')) {
+// Set DRUPAL_SHIELD_DISABLED=1 to disable Shield completely.
+if (getenv('DRUPAL_SHIELD_DISABLED') && getenv('DRUPAL_SHIELD_DISABLED') === '1') {
   $config['shield.settings']['shield_enable'] = FALSE;
 }
```

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

`44-47`: **Consider using a more explicit boolean check for DRUPAL_SHIELD_DISABLED.**

The current implementation will treat any non-empty value (including "0") as truthy, which may not be the intended behavior for a boolean toggle.


```diff
// Allow to disable Shield completely in the environment.
-if (getenv('DRUPAL_SHIELD_DISABLED')) {
+if (getenv('DRUPAL_SHIELD_DISABLED') && filter_var(getenv('DRUPAL_SHIELD_DISABLED'), FILTER_VALIDATE_BOOLEAN)) {
  $config['shield.settings']['shield_enable'] = FALSE;
}
```

This ensures only values like "1", "true", "yes", etc. will disable Shield, while "0", "false", "no" will not.

</blockquote></details>
<details>
<summary>.vortex/docs/content/workflows/variables.mdx (1)</summary><blockquote>

`163-169`: **Fix documentation default value inconsistency**  
The docs list the default for `DRUPAL_SHIELD_DISABLED` as `UNDEFINED`, but in the `.env` fixtures it’s set to `0`. Please update the documentation to reflect the actual default value.

</blockquote></details>
<details>
<summary>tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary><blockquote>

`96-118`: **Test for Shield disabling functionality is good, but could be more comprehensive.**

The test successfully verifies that Shield can be disabled via the `DRUPAL_SHIELD_DISABLED` environment variable. However, per previous feedback, it would be beneficial to also test with string values like "1" or "0" to ensure proper type handling.



Consider adding tests with different DRUPAL_SHIELD_DISABLED values.

The test currently only checks with `TRUE`, but it would be beneficial to also test with other values like "1" or "0" to ensure the implementation behaves as expected with various inputs.

```diff
  public function testShieldDisabled(string $env): void {
    $this->setEnvVars([
      'DRUPAL_ENVIRONMENT' => $env,
      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
-     'DRUPAL_SHIELD_DISABLED' => TRUE,
+     'DRUPAL_SHIELD_DISABLED' => '1',
    ]);

    $this->requireSettingsFile();

    $config['shield.settings']['shield_enable'] = FALSE;
    $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
    $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
    $config['shield.settings']['print'] = 'drupal_shield_print';

    $this->assertConfigContains($config);
  }
  
  /**
   * Test Shield remains enabled when DRUPAL_SHIELD_DISABLED is falsy.
   *
   * @dataProvider dataProviderEnvironments
   */
  public function testShieldNotDisabled(string $env): void {
    // Skip local and CI environments as they have special handling
    if ($env === static::ENVIRONMENT_LOCAL || $env === static::ENVIRONMENT_CI) {
      $this->markTestSkipped('Local and CI environments disable Shield by default.');
    }
    
    $this->setEnvVars([
      'DRUPAL_ENVIRONMENT' => $env,
      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
      'DRUPAL_SHIELD_DISABLED' => '0',
    ]);

    $this->requireSettingsFile();

    // For environments other than production, Shield should be enabled
    $expectedEnabled = $env !== static::ENVIRONMENT_PROD;
    
    $config['shield.settings']['shield_enable'] = $expectedEnabled;
    $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
    $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
    $config['shield.settings']['print'] = 'drupal_shield_print';

    $this->assertConfigContains($config);
  }
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: ASSERTIVE**
**Plan: Lite**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between ff67855a965ee7ad25127776e5d136286d62f3a3 and ee288cfbdf9b2bf05d45e7fa2b1f45f111531fee.

</details>

<details>
<summary>📒 Files selected for processing (28)</summary>

* `.env` (1 hunks)
* `.vortex/docs/content/workflows/variables.mdx` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/_baseline/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_acquia/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_container_registry/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_ftp/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_lagoon/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_all_gha/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_artifact/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_container_image/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_lagoon/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_none_gha/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/hosting_acquia/.env` (4 hunks)
* `.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/hosting_lagoon/.env` (4 hunks)
* `.vortex/installer/tests/Fixtures/install/names/.env` (3 hunks)
* `.vortex/installer/tests/Fixtures/install/provision_profile/.env` (3 hunks)
* `.vortex/installer/tests/Fixtures/install/services_no_clamav/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_no_valkey/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_no_valkey/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_none/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `web/sites/default/includes/modules/settings.shield.php` (1 hunks)

</details>

<details>
<summary>🔇 Additional comments (37)</summary><blockquote>

<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_container_image/.env (1)</summary>

`5-6`: **Ensure correct container_image-only deployment in fixture**  
Switching `VORTEX_DEPLOY_TYPES` to `container_image` is appropriate for this fixture. This aligns the test environment with the intended deployment type.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/.env (1)</summary>

`5-6`: **Approve expanded deployment types**  
Including `webhook,container_image,lagoon,artifact` in `VORTEX_DEPLOY_TYPES` accurately reflects the "all" deployment scenario for CircleCI fixtures.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_all_gha/.env (1)</summary>

`5-6`: **Expansion of deployment types improves test coverage.**

The change from a single deployment type to multiple types (webhook,container_image,lagoon,artifact) makes this test fixture more comprehensive by including all supported deployment mechanisms.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/names/.env (1)</summary>

`5-6`: **Name changes standardize test fixtures.**

The renaming from "star_wars" to "the_new_hope" (and related domain changes) across multiple variables creates consistency in the test fixtures. Note that DRUPAL_THEME uses "lightsaber" which breaks the pattern but is likely intentional.



Also applies to: 14-15, 21-22, 30-31, 39-40, 48-49

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_ftp/.env (2)</summary>

`5-22`: **FTP database download configuration is well-structured.**

The change from URL to FTP source for database downloads is implemented comprehensively with appropriate variables (host, port, filename) and sensible defaults (port 21, db.sql filename). The comments clearly explain the purpose of each variable.

---

`30-33`: **Removal of demo section aligns with new FTP approach.**

Removing the demo URL section is appropriate since the fixture now uses an FTP source instead of URL-based downloads.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_artifact/.env (1)</summary>

`5-6`: **Deploy type correctly updated to match fixture purpose.**

The change from "webhook" to "artifact" correctly aligns the deployment type with the fixture's intended purpose as indicated by its directory name "deploy_type_artifact".

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_clamav/.env (1)</summary>

`5-12`: **Removal of ClamAV settings aligns with broader service configuration updates.**

The removal of ClamAV configuration settings from this fixture is consistent with the changes mentioned in the AI summary regarding cleanup of service integrations. This change doesn't directly relate to the new Shield feature but appears to be part of ongoing maintenance.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/.env (1)</summary>

`55-56`: **LGTM: New Shield disable feature properly documented and configured.**

The addition of the `DRUPAL_SHIELD_DISABLED` environment variable with a default value of `0` (disabled by default) is well-documented and follows the project's variable naming convention pattern.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_lagoon/.env (1)</summary>

`5-6`: **Align deployment type with Lagoon environment**  
The `VORTEX_DEPLOY_TYPES` value has been updated from `webhook` to `lagoon`, which correctly reflects the target hosting environment for these fixtures.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_acquia/.env (2)</summary>

`5-6`: **Switch database download source to Acquia**  
Updating `VORTEX_DB_DOWNLOAD_SOURCE` to `acquia` aligns the fixture with the Acquia-specific download logic.

---

`7-13`: **Remove URL-based download variables**  
The removal of `VORTEX_DB_DOWNLOAD_URL` and its comments is appropriate now that the source is Acquia-driven. Ensure no residual references to the old URL-based logic remain in the installer code.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_none/.env (1)</summary>

`1-3`: **Clean up unused service variables**  
Removing Valkey and ClamAV environment settings in the “services_none” fixture is correct, as those integrations are being deprecated in favor of the new `DRUPAL_SHIELD_DISABLED` flag.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/provision_profile/.env (2)</summary>

`5-6`: **Change provisioning type to profile**  
Switching `VORTEX_PROVISION_TYPE` from `database` to `profile` properly configures this fixture for profile-based installations.

---

`14-26`: **Remove database download config for profile provisioning**  
Since the install is now profile-based, dropping `VORTEX_DB_DOWNLOAD_SOURCE`, `VORTEX_DB_DOWNLOAD_URL`, and related environment settings is appropriate to avoid dead configuration.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_lagoon/.env (3)</summary>

`4-6`: **Database download source configuration update looks good.**

The change from URL-based to Lagoon-based database source is appropriate and consistent with other fixture updates.

---

`8-12`: **Clean removal of URL-based database configuration.**

Properly removed URL-specific configuration that's no longer needed with the Lagoon source type.

---

`20-22`: **Demo section cleanup is appropriate.**

Removed unused demo database URL that's no longer relevant with the Lagoon source type.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_valkey/.env (1)</summary>

`5-7`: **Valkey integration removal is appropriate.**

Clean removal of Valkey integration settings that are no longer needed in this fixture.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_container_registry/.env (3)</summary>

`4-6`: **Database download source configuration update looks good.**

The change from URL-based to container registry-based database source is appropriate and consistent with other fixture updates.

---

`8-14`: **Replaced URL configuration with container registry configuration.**

Properly replaced URL-specific configuration with container registry-specific variables and added helpful documentation link.

---

`22-35`: **Demo section cleanup is appropriate.**

Removed unused demo database URL that's no longer relevant with the container registry source type.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_lagoon/.env (4)</summary>

`4-14`: **Added appropriate Lagoon hosting configuration.**

The new HOSTING section with Lagoon-specific variables is well-structured and properly documented.

---

`21-29`: **Database download source configuration update looks good.**

The change from URL-based to Lagoon-based database source is appropriate and properly removes the obsolete URL configuration.

---

`36-38`: **Updated deployment types for Lagoon compatibility.**

Correctly updated the deployment types to "lagoon" to align with the hosting configuration.

---

`46-48`: **Demo section cleanup is appropriate.**

Removed unused demo database URL that's no longer relevant with the Lagoon source type.

</details>
<details>
<summary>tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`120-130`: **Data provider for environments is good.**

The data provider includes all relevant environments for comprehensive testing.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_valkey/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`4-50`: **Removed Valkey test methods align with environment configuration changes.**

The removal of Valkey test methods (`testValkey` and `testValkeyPartial`) aligns with the broader removal of Valkey configuration across the codebase. This change is part of cleaning up and consolidating service integrations.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`92-126`: **Well-implemented test for new Shield disablement feature.**

The new test method `testShieldDisabled` properly verifies that setting `DRUPAL_SHIELD_DISABLED` to TRUE forces Shield to be disabled regardless of environment, while maintaining other Shield configuration values. The comprehensive data provider ensures the feature works across all environments.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_acquia/.env (6)</summary>

`5-6`: **Update of web root directory for Acquia compatibility.**

Changing from `WEBROOT=web` to `WEBROOT=docroot` aligns with Acquia's standard directory structure requirement.

---

`14-18`: **Added Acquia hosting configuration section.**

Good addition of a dedicated hosting section with the Acquia application name variable, which improves organization and configuration clarity.

---

`28-29`: **Updated database download source for Acquia integration.**

Changing from URL-based download to Acquia-specific database download source improves integration with the Acquia hosting platform.

---

`41-42`: **Added Acquia database name configuration.**

The addition of `VORTEX_DB_DOWNLOAD_ACQUIA_DB_NAME` properly supports the Acquia database download functionality.

---

`51-52`: **Updated deployment type for Acquia compatibility.**

Changing deployment type from `webhook` to `artifact` better aligns with Acquia's deployment practices.

---

`60-62`: **Removed redundant database download URL.**

Appropriately removed the URL-based database download configuration since it's no longer needed with the Acquia database source.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php (2)</summary>

`4-58`: **Appropriate removal of ClamAV test methods.**

The removal of ClamAV-related test methods from this fixture aligns with the simplification of the `services_none` fixture configuration. Since these services are not intended to be used in this fixture, removing the tests maintains consistency with the updated environment configuration.

---

`70-115`: **Properly removed Valkey test methods.**

Similar to the removal of ClamAV tests, removing Valkey-related test methods maintains consistency with the updated environment configuration for the `services_none` fixture, where Valkey integration is no longer supported.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-14T03:03:32Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 2**

<details>
<summary>🔭 Outside diff range comments (3)</summary><blockquote>

<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_lagoon/.env (1)</summary><blockquote>

`5-8`: _🧹 Nitpick (assertive)_

**Enhance source comment and verify removal of URL handling.**  
The `VORTEX_DB_DOWNLOAD_SOURCE` is now set to `lagoon` and URL variables removed. To avoid confusion, enrich the comment to list supported sources:
```diff
-# Database download source.
+# Database download source (options: `url`, `acquia`, `container_registry`, `ftp`, `lagoon`).
```
Also ensure downstream code no longer references `VORTEX_DB_DOWNLOAD_URL`.

</blockquote></details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_acquia/.env (1)</summary><blockquote>

`1-64`: _💡 Verification agent_

<details>
<summary>🧩 Analysis chain</summary>

**Verify if DRUPAL_SHIELD_DISABLED variable should be added to this file as well.**

According to the PR title, this change is about adding the `DRUPAL_SHIELD_DISABLED` variable, but I don't see it being added to this file. If the variable is intended to be universally available across environments, consider adding it to this Acquia hosting configuration too.

---

🏁 Script executed:

```shell
#!/bin/bash
# Check if DRUPAL_SHIELD_DISABLED is present in other .env files
find .vortex/installer/tests/Fixtures -name '.env' -type f -exec grep -l "DRUPAL_SHIELD_DISABLED" {} \;
```

Length of output: 285

---

🏁 Script executed:

```shell
#!/bin/bash
# Show context for DRUPAL_SHIELD_DISABLED in relevant .env fixtures
for file in .vortex/installer/tests/Fixtures/install/_baseline/.env \
            .vortex/installer/tests/Fixtures/install/services_no_valkey/.env \
            .vortex/installer/tests/Fixtures/install/services_none/.env; do
  echo "===== $file ====="
  grep -n -C3 "DRUPAL_SHIELD_DISABLED" "$file" || echo "Not found in $file"
  echo
done
```

Length of output: 1887

---



</details>

**Add `DRUPAL_SHIELD_DISABLED` to hosting_acquia fixture**

The `hosting_acquia/.env` file currently omits the Drupal Shield flag, but all other `.env` fixtures include it. To keep environments consistent, add the following immediately after `VORTEX_PROVISION_USE_MAINTENANCE_MODE=1`:

```diff
 VORTEX_PROVISION_USE_MAINTENANCE_MODE=1

+# Disable Drupal Shield for all environments (0 = enabled, 1 = disabled).
+DRUPAL_SHIELD_DISABLED=0

 ################################################################################
 #                                HOSTING                                       #
 ################################################################################
```

• File: `.vortex/installer/tests/Fixtures/install/hosting_acquia/.env`

</blockquote></details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary><blockquote>

`1-119`: _💡 Verification agent_

<details>
<summary>🧩 Analysis chain</summary>

**Verify if a test for DRUPAL_SHIELD_DISABLED is needed in this test class.**

According to the PR title and summary, a new variable `DRUPAL_SHIELD_DISABLED` is being added. However, I don't see any corresponding test being added to this test class. The summary mentions that tests were added to other files. Please verify if a test for this functionality should also be added to this test class for consistency.

---

🏁 Script executed:

```shell
#!/bin/bash
# Check if testShieldDisabled exists in other test files
find . -name '*SwitchableSettingsTest.php' -type f -exec grep -l "testShieldDisabled" {} \;

# Also check for the shield settings file to understand implementation
find . -name 'settings.shield.php' -type f | head -n 1 | xargs cat
```

Length of output: 1985

---



</details>

**Add a `testShieldDisabled` case to SwitchableSettingsTest**

Please add a new PHPUnit test in `SwitchableSettingsTest` to cover the `DRUPAL_SHIELD_DISABLED` flag. Without it, the override logic in `settings.shield.php` won’t be validated. For example:

• File:  
  - `.vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php`  
  - `tests/phpunit/Drupal/SwitchableSettingsTest.php`  

• New method sketch:
```php
public function testShieldDisabled(): void {
  // Even if ENVIRONMENT_CI/LOCAL would normally disable or enable Shield,
  // setting DRUPAL_SHIELD_DISABLED must force shield_enable = FALSE.
  $this->setEnvVars([
    'DRUPAL_SHIELD_DISABLED' => '1',
    // Optionally include other SHIELD envs to assert precedence:
    'DRUPAL_SHIELD_USER'     => 'user',
    'DRUPAL_SHIELD_PASS'     => 'pass',
  ]);

  $this->requireSettingsFile();

  $config = ['shield.settings' => ['shield_enable' => FALSE]];
  $this->assertConfigContains($config);
}
```
This ensures the last `if (getenv('DRUPAL_SHIELD_DISABLED'))` branch is tested.

</blockquote></details>

</blockquote></details>

<details>
<summary>♻️ Duplicate comments (7)</summary><blockquote>

<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php (1)</summary><blockquote>

`44-47`: _🧹 Nitpick (assertive)_

**Consider clarifying expected values for DRUPAL_SHIELD_DISABLED.**

The implementation of a global Shield disable switch is clean and follows the established pattern. However, PHP treats any non-empty string as true in boolean context, so values like "0" would still disable Shield.




Consider making the check more explicit about the expected values:

```diff
-// Allow to disable Shield completely in the environment.
+// Allow to disable Shield completely by setting DRUPAL_SHIELD_DISABLED=1 in the environment.
 if (getenv('DRUPAL_SHIELD_DISABLED')) {
   $config['shield.settings']['shield_enable'] = FALSE;
 }
```

Or for more strict checking:

```diff
-// Allow to disable Shield completely in the environment.
+// Allow to disable Shield completely by setting DRUPAL_SHIELD_DISABLED=1 in the environment.
-if (getenv('DRUPAL_SHIELD_DISABLED')) {
+if (getenv('DRUPAL_SHIELD_DISABLED') && getenv('DRUPAL_SHIELD_DISABLED') === '1') {
   $config['shield.settings']['shield_enable'] = FALSE;
 }
```

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

`44-47`: _🛠️ Refactor suggestion_

**Consider using a more explicit boolean check for DRUPAL_SHIELD_DISABLED.**

The current implementation will treat any non-empty value (including "0") as truthy, which may not be the intended behavior for a boolean toggle.



```diff
// Allow to disable Shield completely in the environment.
-if (getenv('DRUPAL_SHIELD_DISABLED')) {
+if (getenv('DRUPAL_SHIELD_DISABLED') && filter_var(getenv('DRUPAL_SHIELD_DISABLED'), FILTER_VALIDATE_BOOLEAN)) {
  $config['shield.settings']['shield_enable'] = FALSE;
}
```

This ensures only values like "1", "true", "yes", etc. will disable Shield, while "0", "false", "no" will not.

</blockquote></details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php (1)</summary><blockquote>

`44-47`: _⚠️ Potential issue_

**Consider using a more explicit boolean check for DRUPAL_SHIELD_DISABLED.**

The current implementation will treat any non-empty value (including "0") as truthy, which may not be the intended behavior for a boolean toggle.



```diff
// Allow to disable Shield completely in the environment.
-if (getenv('DRUPAL_SHIELD_DISABLED')) {
+if (getenv('DRUPAL_SHIELD_DISABLED') && filter_var(getenv('DRUPAL_SHIELD_DISABLED'), FILTER_VALIDATE_BOOLEAN)) {
  $config['shield.settings']['shield_enable'] = FALSE;
}
```

This ensures only values like "1", "true", "yes", etc. will disable Shield, while "0", "false", "no" will not.

</blockquote></details>
<details>
<summary>.vortex/docs/content/workflows/variables.mdx (1)</summary><blockquote>

`163-170`: _🛠️ Refactor suggestion_

**Update documentation default to match `.env`.**  
The documentation lists the default value as `UNDEFINED`, but in the `.env` file it's set to `0`. This inconsistency can cause confusion and CI failures. Please update the default to `0` and clarify the description accordingly:
```diff
- Default value: `UNDEFINED`
+ Default value: `0`
```

</blockquote></details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_valkey/.env (1)</summary><blockquote>

`2-3`: **Clarify comment to reflect variable semantics.**  
The comment `# Shield disabled.` may be misleading since `0` means Shield is enabled. Consider updating it to:
```diff
-# Shield disabled.
+# Whether Shield should be disabled (0=enabled, 1=disabled).
 DRUPAL_SHIELD_DISABLED=0
```

</blockquote></details>
<details>
<summary>tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary><blockquote>

`96-118`: _🛠️ Refactor suggestion_

**Consider testing with different DRUPAL_SHIELD_DISABLED values**

The test currently only checks with `TRUE`, but environment variables in PHP are typically strings. You should also test with various string values like "1" or "0" to ensure the implementation handles them correctly.


Apply this diff to enhance the test:

```diff
  public function testShieldDisabled(string $env): void {
    $this->setEnvVars([
      'DRUPAL_ENVIRONMENT' => $env,
      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
-     'DRUPAL_SHIELD_DISABLED' => TRUE,
+     'DRUPAL_SHIELD_DISABLED' => '1',
    ]);

    $this->requireSettingsFile();

    $config['shield.settings']['shield_enable'] = FALSE;
    $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
    $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
    $config['shield.settings']['print'] = 'drupal_shield_print';

    $this->assertConfigContains($config);
  }
  
  /**
   * Test Shield remains properly configured when DRUPAL_SHIELD_DISABLED is falsy.
   *
   * @dataProvider dataProviderEnvironments
   */
  public function testShieldNotDisabled(string $env): void {
    // Skip local and CI environments as they have special handling
    if ($env === static::ENVIRONMENT_LOCAL || $env === static::ENVIRONMENT_CI) {
      $this->markTestSkipped('Local and CI environments disable Shield by default.');
    }
    
    $this->setEnvVars([
      'DRUPAL_ENVIRONMENT' => $env,
      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
      'DRUPAL_SHIELD_DISABLED' => '0',
    ]);

    $this->requireSettingsFile();

    // For environments other than production, Shield should be enabled
    $expectedEnabled = $env !== static::ENVIRONMENT_PROD;
    
    $config['shield.settings']['shield_enable'] = $expectedEnabled;
    $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
    $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
    $config['shield.settings']['print'] = 'drupal_shield_print';

    $this->assertConfigContains($config);
  }
```

</blockquote></details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary><blockquote>

`92-114`: _🛠️ Refactor suggestion_

**Consider testing with string values instead of boolean**

Similar to the main test file, this test uses a boolean `TRUE` for the `DRUPAL_SHIELD_DISABLED` environment variable. Since environment variables are typically passed as strings, consider using string values like "1" instead to better reflect real-world usage.



```diff
  public function testShieldDisabled(string $env): void {
    $this->setEnvVars([
      'DRUPAL_ENVIRONMENT' => $env,
      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
-     'DRUPAL_SHIELD_DISABLED' => TRUE,
+     'DRUPAL_SHIELD_DISABLED' => '1',
    ]);
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: ASSERTIVE**
**Plan: Lite**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 08056b06c0907a63f690ae9e95c5b010b0954e80 and 6d152553513022f945869c0badbd4b3c0b8a4018.

</details>

<details>
<summary>📒 Files selected for processing (28)</summary>

* `.env` (1 hunks)
* `.vortex/docs/content/workflows/variables.mdx` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/_baseline/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_acquia/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_container_registry/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_ftp/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_lagoon/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_all_gha/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_artifact/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_container_image/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_lagoon/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_none_gha/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/hosting_acquia/.env` (4 hunks)
* `.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/hosting_lagoon/.env` (4 hunks)
* `.vortex/installer/tests/Fixtures/install/names/.env` (3 hunks)
* `.vortex/installer/tests/Fixtures/install/provision_profile/.env` (3 hunks)
* `.vortex/installer/tests/Fixtures/install/services_no_clamav/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_no_valkey/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_no_valkey/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_none/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `web/sites/default/includes/modules/settings.shield.php` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧬 Code Graph Analysis (1)</summary>

<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary><blockquote>

<details>
<summary>tests/phpunit/Drupal/SettingsTestCase.php (3)</summary>

* `setEnvVars` (126-164)
* `requireSettingsFile` (203-222)
* `assertConfigContains` (248-250)

</details>

</blockquote></details>

</details>

</details>

<details>
<summary>🔇 Additional comments (44)</summary><blockquote>

<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_artifact/.env (1)</summary>

`5-6`: **Correct deployment type fixture for artifact**  
The `VORTEX_DEPLOY_TYPES` value has been updated from `webhook` to `artifact`, which aligns with this fixture’s purpose.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/.env (1)</summary>

`5-6`: **Expand CircleCI deployment types list**  
Updating `VORTEX_DEPLOY_TYPES` to `webhook,container_image,lagoon,artifact` correctly broadens supported deployment methods for this fixture.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_lagoon/.env (1)</summary>

`5-6`: **Align Lagoon deployment type**  
Changing `VORTEX_DEPLOY_TYPES` to `lagoon` is consistent with the fixture’s intent.

</details>
<details>
<summary>.env (1)</summary>

`57-58`: **Document Drupal Shield disable variable**  
The comment `# Disable Drupal Shield for all environments (0 = enabled, 1 = disabled).` is clear and the default `DRUPAL_SHIELD_DISABLED=0` makes sense. Please verify that the corresponding entry in `.vortex/docs/content/workflows/variables.mdx` has been updated to reflect this semantics.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/provision_profile/.env (2)</summary>

`5-6`: **Switch to profile-based provisioning**  
Updating `VORTEX_PROVISION_TYPE` from `database` to `profile` correctly reflects a profile install for this fixture.

---

`14-26`: **Remove database download configuration**  
The removal of `VORTEX_DB_DOWNLOAD_SOURCE`, `VORTEX_DB_DOWNLOAD_URL`, and `VORTEX_DB_DOWNLOAD_ENVIRONMENT` aligns with the transition away from database dumps. Ensure no downstream tests or scripts expect these variables in this fixture.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_container_registry/.env (3)</summary>

`5-6`: **Changes in DB download source appear unrelated to the PR purpose.**

The switch from URL-based database downloads to container registry appears unrelated to the stated PR purpose of adding the `DRUPAL_SHIELD_DISABLED` variable. Please clarify if these changes are intentionally included in this PR or should be separated.

---

`8-14`: **New container registry configuration replaces URL-based download.**

The implementation correctly adds container registry configuration with appropriate documentation, including a reference to the GitHub repository for seeding the DB image.

---

`22-35`: **Removal of demo section increases clarity.**

Removing the demo section with the hardcoded database URL makes the configuration cleaner and more focused on the actual implementation.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_ftp/.env (3)</summary>

`5-6`: **Changes in DB download source appear unrelated to the PR purpose.**

The switch from URL-based database downloads to FTP appears unrelated to the stated PR purpose of adding the `DRUPAL_SHIELD_DISABLED` variable. Please clarify if these changes are intentionally included in this PR or should be separated.

---

`8-22`: **FTP configuration is well structured with defaults.**

The FTP configuration is implemented with appropriate defaults for port (21) and filename (db.sql), which follows good practices for configuration management.

---

`30-32`: **Removal of demo URL improves configuration clarity.**

Removing the hardcoded demo database URL makes the configuration cleaner and more appropriate for a production-ready system.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_container_image/.env (1)</summary>

`5-6`: **Deployment type change appears unrelated to the PR purpose.**

The change from webhook to container_image deployment type seems unrelated to the stated PR purpose of adding the `DRUPAL_SHIELD_DISABLED` variable. Please confirm if this change should be included in this PR.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_clamav/.env (1)</summary>

`5-12`: <details>
<summary>✅ Verification successful</summary>

**Removal of ClamAV configuration is unrelated to DRUPAL_SHIELD_DISABLED feature**

This change removes ClamAV-related environment variables from the test fixture. While this appears to be unrelated to the main PR objective of adding `DRUPAL_SHIELD_DISABLED`, it's likely part of fixture cleanup. However, ensure this removal doesn't break any test scenarios that might depend on these settings.

---

🏁 Script executed:

```shell
#!/bin/bash
# Check if there are any tests that might depend on ClamAV settings in this fixture
rg -l "DRUPAL_CLAMAV" .vortex/installer/tests/Fixtures/install/services_no_clamav/
```

Length of output: 190

---

🏁 Script executed:

```shell
#!/bin/bash
# Show context around ClamAV references in the SwitchableSettingsTest
rg -n -C3 "CLAMAV" .vortex/installer/tests/Fixtures/install/services_no_clamav/tests/phpunit/Drupal/SwitchableSettingsTest.php
```

Length of output: 953

---



</details>

**ClamAV fixture cleanup is safe**  
All ClamAV‐related settings in this fixture are explicitly provided by `SwitchableSettingsTest.php` via `setEnvVars()`, so removing the defaults from `.vortex/installer/tests/Fixtures/install/services_no_clamav/.env` won’t break these tests.

– `SwitchableSettingsTest.php` sets `DRUPAL_CLAMAV_ENABLED` and `DRUPAL_CLAMAV_MODE` (and host/port) in every test case.

No further changes are required.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_none_gha/.env (1)</summary>

`5-10`: <details>
<summary>✅ Verification successful</summary>

**Removal of deployment configuration appears unrelated to main PR objective**

This change removes the deployment section and `VORTEX_DEPLOY_TYPES=webhook` from the test fixture. While this seems unrelated to adding `DRUPAL_SHIELD_DISABLED`, it's likely part of a broader cleanup. Verify that any tests depending on this configuration still function as expected.

---

🏁 Script executed:

```shell
#!/bin/bash
# Check if there are any tests that might depend on VORTEX_DEPLOY_TYPES in this fixture
rg -l "VORTEX_DEPLOY_TYPES" .vortex/installer/tests/Fixtures/install/deploy_type_none_gha/
```

Length of output: 90

---

🏁 Script executed:

```shell
#!/bin/bash
# Search the entire repository for any references to VORTEX_DEPLOY_TYPES
rg -n "VORTEX_DEPLOY_TYPES" .
```

Length of output: 981

---



</details>

**Deployment fixture update is safe**  
No references to `VORTEX_DEPLOY_TYPES` were found in any tests or fixtures after its removal, so the change won’t break existing installer tests.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/.env (1)</summary>

`5-10`: <details>
<summary>❓ Verification inconclusive</summary>

**Removal of deployment configuration appears unrelated to main PR objective**

This change removes the deployment section and `VORTEX_DEPLOY_TYPES=webhook` from the test fixture. While this seems unrelated to adding `DRUPAL_SHIELD_DISABLED`, it's likely part of a broader cleanup. Verify that any tests depending on this configuration still function as expected.

---

🏁 Script executed:

```shell
#!/bin/bash
# Check if there are any tests that might depend on VORTEX_DEPLOY_TYPES in this fixture
rg -l "VORTEX_DEPLOY_TYPES" .vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/
```

Length of output: 95

---

Let’s ensure no other parts of the repo reference this env var—search the entire codebase:

---

🏁 Script executed:

```shell
#!/bin/bash
# Search globally for any usage of VORTEX_DEPLOY_TYPES
rg -n "VORTEX_DEPLOY_TYPES" .
```

Length of output: 981

---



</details>

**Verify removal of VORTEX_DEPLOY_TYPES in fixture**

We ran a search in the fixture directory and found no usages of `VORTEX_DEPLOY_TYPES` under  
`.vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/`. That means no tests there explicitly load or assert this value. However, the deploy script still requires this variable (see `scripts/vortex/deploy.sh` at lines 26 and 61) and will error out if it’s unset.

• No occurrences of `VORTEX_DEPLOY_TYPES` in `deploy_type_none_circleci/.env` or related tests  
• `scripts/vortex/deploy.sh` will fail on an empty `VORTEX_DEPLOY_TYPES`—ensure your install/test harness does not invoke it for this fixture

Please run the full test suite to confirm that removing `VORTEX_DEPLOY_TYPES=webhook` hasn’t introduced any failures.

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

`44-47`: <details>
<summary>✅ Verification successful</summary>

**Ensure tests have been added for this new functionality**

For a new configuration option like this, there should be tests that verify it works as expected.

---

🏁 Script executed:

```shell
#!/bin/bash
# Check if tests have been added for this new functionality
rg -l "DRUPAL_SHIELD_DISABLED" tests/
```

Length of output: 85

---

🏁 Script executed:

```shell
#!/bin/bash
# Show context around the DRUPAL_SHIELD_DISABLED reference in the test file
rg -n -C 5 "DRUPAL_SHIELD_DISABLED" tests/phpunit/Drupal/SwitchableSettingsTest.php
```

Length of output: 486

---

🏁 Script executed:

```shell
#!/bin/bash
sed -n '1,300p' tests/phpunit/Drupal/SwitchableSettingsTest.php
```

Length of output: 8917

---



</details>

**Tests for DRUPAL_SHIELD_DISABLED are present and passing**

The `testShieldDisabled()` method in tests/phpunit/Drupal/SwitchableSettingsTest.php covers the new `DRUPAL_SHIELD_DISABLED` flag, verifying that `shield_enable` is set to FALSE (along with credentials and print settings). No further tests are required.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/.env (1)</summary>

`55-56`: **LGTM: New environment variable for fine-grained Shield control**

The new `DRUPAL_SHIELD_DISABLED` environment variable with a default value of `0` provides a clear mechanism to globally control the Shield functionality across all environments.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_all_gha/.env (1)</summary>

`5-6`: **Deployment types expanded beyond webhook**

The deployment types have been expanded to include container_image, lagoon, and artifact deployment methods, which increases the testing coverage for this fixture.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_acquia/.env (3)</summary>

`5-6`: **Database download source changed to Acquia**

The database download source has been changed from URL-based to Acquia-specific, which is appropriate for this Acquia-specific test fixture.

---

`8-12`: **Removal of URL-based download configuration**

Removing the URL-based download configuration is consistent with changing the download source to Acquia-specific.

---

`20-23`: **Removed demo database URL**

The demo database URL was correctly removed as it's no longer needed for this Acquia-specific download source configuration.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_none/.env (1)</summary>

`5-17`: **Service variables removed appropriately.**  
This fixture represents `services_none`, so removing Valkey (`DRUPAL_VALKEY_ENABLED`) and ClamAV (`DRUPAL_CLAMAV_ENABLED` and `DRUPAL_CLAMAV_MODE`) configuration aligns with the fixture's intent to disable all optional services.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/names/.env (6)</summary>

`5-6`: **Check project variable rename.**  
The `VORTEX_PROJECT` has been updated to `the_new_hope`. Confirm that all references, including directory names or documentation that rely on `$VORTEX_PROJECT`, are updated accordingly.

---

`14-15`: **Verify theme name change.**  
The `DRUPAL_THEME` value changed from `star_wars` to `lightsaber`. Please confirm this is intentional and consistent with theming conventions, as it differs from the project slug.

---

`21-22`: **Project-specific domain updated correctly.**  
The `DRUPAL_STAGE_FILE_PROXY_ORIGIN` URL reflects the new domain `the-new-hope-domain.example`, ensuring consistency with the project slug.

---

`30-31`: **Sanitize DB email domain updated correctly.**  
The `VORTEX_PROVISION_SANITIZE_DB_EMAIL` now uses `the-new-hope-domain.example`, matching the updated project context.

---

`39-40`: **Notification sender email updated correctly.**  
The `VORTEX_NOTIFY_EMAIL_FROM` value is updated to `webmaster@the-new-hope-domain.example`, aligning with the new domain.

---

`48-49`: **Notification recipient email updated correctly.**  
The `VORTEX_NOTIFY_EMAIL_RECIPIENTS` value is updated to `webmaster@the-new-hope-domain.example`, ensuring notification targets match the new domain.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_valkey/.env (1)</summary>

`5-8`: **Removal of Valkey integration variables is correct.**  
This fixture `services_no_valkey` should not include Valkey settings. Removing `DRUPAL_VALKEY_ENABLED` and its comments aligns with the fixture's intent.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_lagoon/.env (4)</summary>

`5-14`: **Hosting section creates clear organization**

The addition of a dedicated HOSTING section with Lagoon-specific variables improves the organization of the configuration file and clearly separates hosting concerns from other configuration areas.

---

`22-23`: **Updated database source aligns with hosting platform**

Changing the database download source from "url" to "lagoon" makes the configuration more consistent with the hosting environment.

---

`37-38`: **Deploy types updated to match hosting environment**

The deployment type has been correctly updated from "webhook" to "lagoon" to reflect the Lagoon hosting environment.

---

`46-49`: **Removed unused URL configuration**

Removing the demonstration database URL simplifies the configuration by eliminating unused settings that are no longer needed with the Lagoon-based approach.

</details>
<details>
<summary>tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`123-130`: **Data provider covers appropriate environments**

Good job providing a comprehensive set of test environments for testing the Shield disabled functionality.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_valkey/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`4-52`: **Appropriate removal of Valkey tests from no_valkey fixture**

The removal of Valkey test methods from this fixture is appropriate since they're no longer applicable in a "no_valkey" context. This helps maintain consistency between the fixture name and its actual configuration.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`119-126`: **Well-structured data provider enhances test coverage**

The data provider offers good coverage by testing multiple environments, ensuring the feature works consistently across different contexts.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_acquia/.env (5)</summary>

`5-6`: **The web root directory path has been updated to match Acquia's standard structure.**

The change from `WEBROOT=web` to `WEBROOT=docroot` aligns with Acquia's standard directory structure, where Drupal is typically installed in a directory named `docroot` rather than `web`.

---

`14-19`: **New hosting section added with Acquia-specific configuration.**

A dedicated hosting section has been added with the `VORTEX_ACQUIA_APP_NAME` variable, which is necessary for Acquia integration. This aligns with the changes to make this fixture more Acquia-specific.

---

`28-35`: **Database download configuration updated for Acquia integration.**

The database download source has been changed from generic `url` to Acquia-specific `acquia`. The URL-based download variables have been removed and replaced with the Acquia-specific database name variable. This change provides better integration with Acquia's platform and tooling.



Also applies to: 41-42

---

`51-52`: **Deployment type changed from webhook to artifact.**

The deployment type has been updated from `webhook` to `artifact`, which is more appropriate for Acquia deployments that typically use artifact-based deployment processes.

---

`60-63`: **Removal of demo database URL.**

The demonstration database URL has been removed as it's no longer needed with the shift to Acquia-based database downloads.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php (2)</summary>

`4-58`: **Removal of ClamAV test methods improves codebase clarity.**

Three test methods related to ClamAV configuration (`testClamavDaemonCustom`, `testClamavExecutable`, and `testClamavDaemonDefaults`) have been removed. This cleanup helps simplify the test class by removing tests for functionality that may no longer be required or is being tested elsewhere.

---

`70-116`: **Removal of Valkey test methods streamlines the test suite.**

Two test methods related to Valkey Redis configuration (`testValkey` and `testValkeyPartial`) have been removed. This cleanup aligns with the broader changes in the project to simplify service configurations.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-14T03:24:43Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>🔭 Outside diff range comments (2)</summary><blockquote>

<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/.env (1)</summary><blockquote>

`5-6`: _💡 Verification agent_

<details>
<summary>🧩 Analysis chain</summary>

**Validate multi-value deploy types parsing**  
The `VORTEX_DEPLOY_TYPES` variable has been expanded to a comma-separated list. Please verify that the deployment scripts (e.g., `scripts/vortex/deploy.sh`) correctly split and handle each type.  
  
You can run a quick check to locate the parsing logic:

---

🏁 Script executed:

```shell
#!/bin/bash
# Verify that scripts parse comma-separated deploy types
rg -n "VORTEX_DEPLOY_TYPES" -A5 scripts/vortex/deploy.sh
```

Length of output: 1726

---



</details>

**Fix mismatch in deploy types between tests and deploy script**  
The parsing logic in `scripts/vortex/deploy.sh` correctly handles comma-separated values via substring checks, but there’s a naming inconsistency:

• In `.vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/.env` you set:  
  ```diff
  -VORTEX_DEPLOY_TYPES=webhook,container_image,lagoon,artifact
  +VORTEX_DEPLOY_TYPES=webhook,container_registry,lagoon,artifact
  ```
• The script checks for `container_registry` (not `container_image`):  
  ```bash
  if [ -z "${VORTEX_DEPLOY_TYPES##*container_registry*}" ]; then
    ./scripts/vortex/deploy-container-registry.sh
  fi
  ```

Please align the fixture’s type name (or add a synonym in the script) so that all four deploy hooks are invoked as expected.

</blockquote></details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_lagoon/.env (1)</summary><blockquote>

`5-13`: _⚠️ Potential issue_

**Inconsistent LAGOON_PROJECT value**  
`LAGOON_PROJECT` is still set to `star_wars` while `VORTEX_PROJECT` was renamed to `the_new_hope`. Please update `LAGOON_PROJECT` to match the new project identifier:  
```diff
-LAGOON_PROJECT=star_wars
+LAGOON_PROJECT=the_new_hope
```

</blockquote></details>

</blockquote></details>

<details>
<summary>♻️ Duplicate comments (6)</summary><blockquote>

<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php (1)</summary><blockquote>

`44-47`: _🧹 Nitpick (assertive)_

**Consider clarifying expected values for DRUPAL_SHIELD_DISABLED**

The implementation of a global Shield disable switch is clean and follows the established pattern. However, PHP treats any non-empty string as true in boolean context, so values like "0" would still disable Shield.




Consider making the check more explicit about the expected values:

```diff
-// Allow to disable Shield completely in the environment.
+// Allow to disable Shield completely by setting DRUPAL_SHIELD_DISABLED=1 in the environment.
 if (getenv('DRUPAL_SHIELD_DISABLED')) {
   $config['shield.settings']['shield_enable'] = FALSE;
 }
```

For even more robustness, you could be explicit about the value:

```diff
-if (getenv('DRUPAL_SHIELD_DISABLED')) {
+if (getenv('DRUPAL_SHIELD_DISABLED') && getenv('DRUPAL_SHIELD_DISABLED') === '1') {
   $config['shield.settings']['shield_enable'] = FALSE;
 }
```

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

`44-47`: _🛠️ Refactor suggestion_

**Consider using a more explicit boolean check for DRUPAL_SHIELD_DISABLED.**

The current implementation will treat any non-empty value (including "0") as truthy, which doesn't align with the intended behavior where 0=enabled, 1=disabled as defined in the .env file.



```diff
// Allow to disable Shield completely in the environment.
-if (getenv('DRUPAL_SHIELD_DISABLED')) {
+if (getenv('DRUPAL_SHIELD_DISABLED') && filter_var(getenv('DRUPAL_SHIELD_DISABLED'), FILTER_VALIDATE_BOOLEAN)) {
  $config['shield.settings']['shield_enable'] = FALSE;
}
```

This ensures only values like "1", "true", "yes", etc. will disable Shield, while "0", "false", "no" will not.

</blockquote></details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php (1)</summary><blockquote>

`44-47`: _🛠️ Refactor suggestion_

**Consider using a more explicit boolean check for DRUPAL_SHIELD_DISABLED.**

The current implementation will treat any non-empty value (including "0") as truthy, which doesn't align with the intended behavior where 0=enabled, 1=disabled as defined in the .env file.



```diff
// Allow to disable Shield completely in the environment.
-if (getenv('DRUPAL_SHIELD_DISABLED')) {
+if (getenv('DRUPAL_SHIELD_DISABLED') && filter_var(getenv('DRUPAL_SHIELD_DISABLED'), FILTER_VALIDATE_BOOLEAN)) {
  $config['shield.settings']['shield_enable'] = FALSE;
}
```

This ensures only values like "1", "true", "yes", etc. will disable Shield, while "0", "false", "no" will not.

</blockquote></details>
<details>
<summary>.vortex/docs/content/workflows/variables.mdx (1)</summary><blockquote>

`163-169`: _⚠️ Potential issue_

**Fix documentation default value inconsistency**  
The doc lists the default for `DRUPAL_SHIELD_DISABLED` as `UNDEFINED`, but in the `.env` fixtures it’s initialized to `0`. Update the default to match the implementation.  
  
```diff
- Default value: `UNDEFINED`
+ Default value: `0`
```

</blockquote></details>
<details>
<summary>tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary><blockquote>

`96-118`: _🛠️ Refactor suggestion_

**The test could be improved with proper boolean handling.**

The test correctly validates that Shield can be disabled with the environment variable, but it uses a PHP boolean value (`TRUE`) for the `DRUPAL_SHIELD_DISABLED` environment variable, which in real environments would likely be a string.


Consider modifying the test to use string values that would actually be used in environment files:

```diff
  public function testShieldDisabled(string $env): void {
    $this->setEnvVars([
      'DRUPAL_ENVIRONMENT' => $env,
      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
-     'DRUPAL_SHIELD_DISABLED' => TRUE,
+     'DRUPAL_SHIELD_DISABLED' => '1',
    ]);

    $this->requireSettingsFile();
```

</blockquote></details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary><blockquote>

`92-127`: _🛠️ Refactor suggestion_

**The test should use string values for environment variables.**

The baseline test also uses a PHP boolean value (`TRUE`) for the `DRUPAL_SHIELD_DISABLED` environment variable instead of a string value that would be used in actual environment files.



Update the test to use string values that would actually be used in environment files:

```diff
  public function testShieldDisabled(string $env): void {
    $this->setEnvVars([
      'DRUPAL_ENVIRONMENT' => $env,
      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
-     'DRUPAL_SHIELD_DISABLED' => TRUE,
+     'DRUPAL_SHIELD_DISABLED' => '1',
    ]);
```

Also consider adding the complementary test for when Shield remains enabled (as recommended for the main test file).

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: ASSERTIVE**
**Plan: Lite**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 6d152553513022f945869c0badbd4b3c0b8a4018 and f1dc2e8a0caca73bfbb6ab06c92c7da95871baf3.

</details>

<details>
<summary>📒 Files selected for processing (28)</summary>

* `.env` (1 hunks)
* `.vortex/docs/content/workflows/variables.mdx` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/_baseline/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_acquia/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_container_registry/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_ftp/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/db_download_source_lagoon/.env` (2 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_all_gha/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_artifact/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_container_image/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_lagoon/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/deploy_type_none_gha/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/hosting_acquia/.env` (4 hunks)
* `.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/hosting_lagoon/.env` (4 hunks)
* `.vortex/installer/tests/Fixtures/install/names/.env` (3 hunks)
* `.vortex/installer/tests/Fixtures/install/provision_profile/.env` (3 hunks)
* `.vortex/installer/tests/Fixtures/install/services_no_clamav/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_no_valkey/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_no_valkey/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_none/.env` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `web/sites/default/includes/modules/settings.shield.php` (1 hunks)

</details>

<details>
<summary>🔇 Additional comments (39)</summary><blockquote>

<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_artifact/.env (1)</summary>

`5-6`: **Approve updated deploy type to “artifact”.**  
The fixture now correctly reflects the `artifact` deploy type, matching the directory name and CI expectations.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_container_image/.env (1)</summary>

`5-6`: **Approve updated deploy type to “container_image”.**  
This aligns the fixture with the container-image deployment strategy and keeps it consistent with other artifacts.

</details>
<details>
<summary>.env (1)</summary>

`57-58`: **Approve inline documentation for `DRUPAL_SHIELD_DISABLED`.**  
The comment now clearly describes valid values (0 = enabled, 1 = disabled). Please verify that the corresponding entry in `.vortex/docs/content/workflows/variables.mdx` has been updated to reflect this detail.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_lagoon/.env (1)</summary>

`5-6`: **Approve updated deploy type to “lagoon”.**  
Fixture configuration now correctly targets Lagoon deployments, aligning with other environment presets.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_container_registry/.env (2)</summary>

`5-14`: **Approve switch to `container_registry` and introduction of `VORTEX_DB_IMAGE`.**  
Moving from HTTP‐based dumps to a container image simplifies provisioning and leverages Docker’s workflow. The new `VORTEX_DB_IMAGE` variable and its comment follow existing conventions.

---

`23-36`: **Approve removal of the demo section.**  
Removing the outdated demo URL and its comments streamlines this fixture, keeping it focused on container‐registry provisioning.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_ftp/.env (2)</summary>

`5-6`: **Switch from URL to FTP for database downloads is well implemented**

The configuration has been successfully updated to use FTP as the database download source instead of URL. The new environment variables for FTP host, port, and filename are clearly documented.




Also applies to: 12-21

---

`30-32`: **Cleanup of demo database URL is appropriate**

The removal of the demo database URL configuration is consistent with the switch from URL-based to FTP-based database downloads.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_clamav/.env (1)</summary>

`5-12`: **Appropriate removal of ClamAV configuration**

Removing ClamAV environment variables from this fixture is consistent with its "no_clamav" purpose. This cleanup helps maintain the fixture's integrity and intended testing scenario.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/.env (1)</summary>

`5-10`: **Appropriate removal of deployment configuration**

Removing the deployment configuration section and the `VORTEX_DEPLOY_TYPES` variable is consistent with this fixture's "deploy_type_none" purpose. This helps maintain the fixture's integrity for testing scenarios without deployment.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_none_gha/.env (1)</summary>

`1-16`: **Deployment section removal is appropriate for this fixture.**

The removal of the deployment section in this "none" deployment type fixture aligns with its intended purpose.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/.env (1)</summary>

`55-56`: **The environment variable is properly defined with a clear comment.**

The addition of `DRUPAL_SHIELD_DISABLED` with a default value of `0` is appropriate and the comment clearly explains its purpose and values.



Please ensure that this variable has been consistently added to all relevant environment variable template files (such as `.env.dist` or `.env.example`) as mentioned in a previous review comment.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/deploy_type_all_gha/.env (1)</summary>

`5-6`: **Expanded deployment types in GHA fixture**  
The change broadens `VORTEX_DEPLOY_TYPES` to include all supported mechanisms and aligns with the CircleCI fixture.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_acquia/.env (2)</summary>

`5-6`: **Ensure download source update is honored**  
You’ve switched `VORTEX_DB_DOWNLOAD_SOURCE` from `url` to `acquia`. Confirm that the corresponding download script (`scripts/vortex/download-db-acquia.sh`) is invoked instead of the generic URL handler.

---

`17-23`: **Approve removal of URL-based config**  
Removing the `VORTEX_DB_DOWNLOAD_URL` and demo section is consistent with moving to a hosting-specific download mechanism.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/provision_profile/.env (2)</summary>

`5-6`: **Switch provisioning method to profile**  
Changing `VORTEX_PROVISION_TYPE` to `profile` reflects the new install flow. Please verify that `scripts/vortex/provision.sh` correctly handles the `profile` case.

---

`14-27`: **Approve removal of deprecated DB download vars**  
The cleanup of all database download related variables is appropriate since provisioning no longer uses a dump.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/db_download_source_lagoon/.env (2)</summary>

`5-6`: **Align database download source with Lagoon**  
Updating `VORTEX_DB_DOWNLOAD_SOURCE` from `url` to `lagoon` matches the intended change for the Lagoon fixture.

---

`8-12`: **Remove obsolete URL-based download variables**  
Dropping `VORTEX_DB_DOWNLOAD_URL` and its related comments is correct since Lagoon-based downloads won’t use a direct URL.  



Also applies to: 21-22

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_none/.env (2)</summary>

`2-3`: **Confirm Drupal Shield disable variable semantics**  
The comment `# Disable Drupal Shield for all environments (0 = enabled, 1 = disabled).` clearly reflects the behavior of `DRUPAL_SHIELD_DISABLED=0`.

---

`4-16`: **Clean up Valkey and ClamAV integration flags**  
Removing `DRUPAL_VALKEY_ENABLED`, `DRUPAL_CLAMAV_ENABLED`, and related comments aligns with the “services_none” fixture’s purpose.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/names/.env (6)</summary>

`5-6`: **Update internal project identifier**  
Changing `VORTEX_PROJECT` from `star_wars` to `the_new_hope` is consistent with the new naming convention.

---

`13-14`: **Verify theme name change**  
The theme was renamed from `star_wars` to `lightsaber`. Please confirm this change is intentional and that the new theme exists in the codebase.

---

`21-22`: **Revise stage file proxy origin URL**  
Updating the proxy origin to `https://www.the-new-hope-domain.example/` correctly reflects the new domain.

---

`30-31`: **Update sanitization email domain**  
Changing the sanitize DB email pattern to use `the-new-hope-domain.example` is consistent with other naming updates.

---

`39-40`: **Update notification sender address**  
The `VORTEX_NOTIFY_EMAIL_FROM` address has been updated to the new domain as expected.

---

`48-49`: **Update notification recipients**  
Renaming `VORTEX_NOTIFY_EMAIL_RECIPIENTS` to the-new-hope domain maintains consistency across the fixture.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_valkey/.env (2)</summary>

`2-3`: **Confirm Drupal Shield disable variable semantics**  
The existing comment for `DRUPAL_SHIELD_DISABLED=0` remains clear and accurate in this fixture as well.

---

`4-7`: **Remove Valkey integration flag**  
Dropping `DRUPAL_VALKEY_ENABLED` and its comments aligns correctly with the “no_valkey” fixture.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_lagoon/.env (3)</summary>

`22-23`: **Align database download source with Lagoon**  
Switching `VORTEX_DB_DOWNLOAD_SOURCE` to `lagoon` is correct for the Lagoon hosting fixture.

---

`26-27`: **Set deployment type to Lagoon**  
Updating `VORTEX_DEPLOY_TYPES` from `webhook` to `lagoon` aligns with the hosting-specific configuration.

---

`35-36`: **Remove obsolete URL-based download example**  
Removing the URL-based demo database reference is appropriate since downloads are now managed via Lagoon.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_valkey/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`1-56`: **Removal of Valkey tests is appropriate.**

The removal of the Valkey test methods is appropriate as part of a broader cleanup of Valkey integration from the codebase. This doesn't appear to be directly related to the Shield feature changes but is included in the same PR.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_acquia/.env (5)</summary>

`4-6`: **Appropriate webroot adjustment for Acquia hosting.**

Changing the webroot from `web` to `docroot` is correct for Acquia hosting, which uses `docroot` as the standard web directory name.

---

`13-19`: **Good addition of Acquia hosting configuration section.**

Adding a dedicated hosting section with the Acquia application name variable improves configuration clarity and structure.

---

`27-43`: **Appropriate database configuration for Acquia hosting.**

The changes correctly update the database download configuration from using a URL to using Acquia as the source, along with adding the appropriate Acquia database name variable.

---

`47-53`: **Correct deployment type for Acquia hosting.**

Changing the deployment type from `webhook` to `artifact` is appropriate for Acquia's deployment workflow, which typically uses artifact-based deployments.

---

`56-63`: **Clean removal of unnecessary demo database URL.**

Removing the demo database URL is appropriate as it's no longer needed with the Acquia-specific database download configuration.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`4-58`: **Removal of tests aligns with the broader PR objective**

The removed test methods for ClamAV and Valkey configurations are consistent with the PR's focus on introducing the new `DRUPAL_SHIELD_DISABLED` variable while deprecating these services in the "services_none" fixture.

Since the PR is specifically introducing a new Shield-related environment variable, the removal of these unrelated test methods helps streamline the codebase by eliminating tests for features that are no longer relevant in this context.



Also applies to: 64-116

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-14T03:31:38Z
user: login: AlexSkrypnyk
body: @skipper-vp 
please see my review comments
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-05-14T04:39:29Z
user: login: coderabbitai[bot]
body: > [!CAUTION]
> Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments.  If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

**Actionable comments posted: 1**

<details>
<summary>♻️ Duplicate comments (7)</summary><blockquote>

<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php (1)</summary><blockquote>

`44-47`: **Consider clarifying expected values for DRUPAL_SHIELD_DISABLED.**

The implementation of a global Shield disable switch is clean and follows the established pattern. However, PHP treats any non-empty string as true in boolean context, so values like "0" would still disable Shield.

Consider making the check more explicit about the expected values:

```diff
-// Allow to disable Shield completely in the environment.
-if (!empty(getenv('DRUPAL_SHIELD_DISABLED'))) {
+// Set DRUPAL_SHIELD_DISABLED=1 to disable Shield completely.
+if (!empty(getenv('DRUPAL_SHIELD_DISABLED')) && getenv('DRUPAL_SHIELD_DISABLED') === '1') {
   $config['shield.settings']['shield_enable'] = FALSE;
 }
```

Alternatively, a simpler approach that preserves the current behavior but adds clarity:

```diff
-// Allow to disable Shield completely in the environment.
+// Allow to disable Shield completely by setting DRUPAL_SHIELD_DISABLED=1 in the environment.
 if (!empty(getenv('DRUPAL_SHIELD_DISABLED'))) {
   $config['shield.settings']['shield_enable'] = FALSE;
 }
```

</blockquote></details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/.env (1)</summary><blockquote>

`55-57`: **Add DRUPAL_SHIELD_DISABLED to .env.dist**

The new environment variable is well-documented here with a clear comment indicating its purpose and values (0 = enabled, 1 = disabled). However, it should also be added to the `.env.dist` template.


As previously noted, please add this variable to your environment-file template (e.g. `.env.dist`) to ensure consistent configuration across environments.

</blockquote></details>
<details>
<summary>.vortex/docs/content/workflows/variables.mdx (1)</summary><blockquote>

`163-170`: **Fix documentation default value inconsistency**  
The docs list the default for `DRUPAL_SHIELD_DISABLED` as `UNDEFINED`, but the `.env` files define it as `0` by default. Update the documentation to reflect `0`.  
```diff
- Default value: `UNDEFINED`
+ Default value: `0`
```

</blockquote></details>
<details>
<summary>tests/phpunit/Drupal/SwitchableSettingsTest.php (2)</summary><blockquote>

`96-118`: _🛠️ Refactor suggestion_

**Consider using string values for DRUPAL_SHIELD_DISABLED.**

The test currently uses a boolean `TRUE` value for `DRUPAL_SHIELD_DISABLED`, but environment variables in PHP are typically processed as strings. It would be better to test with string values like "1" instead.



```diff
-      'DRUPAL_SHIELD_DISABLED' => TRUE,
+      'DRUPAL_SHIELD_DISABLED' => '1',
```

---

`120-130`: _🛠️ Refactor suggestion_

**Add a complementary test for when Shield remains enabled.**

The current test only verifies that Shield can be disabled, but there's no test to verify that Shield remains enabled when `DRUPAL_SHIELD_DISABLED` is falsy or not set.



Consider adding a complementary test method to verify Shield behavior with falsy values, as suggested in previous reviews.

</blockquote></details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php (2)</summary><blockquote>

`97-114`: _🛠️ Refactor suggestion_

**Consider using string values for DRUPAL_SHIELD_DISABLED.**

Similar to the main test file, this baseline fixture test uses a boolean `TRUE` value for `DRUPAL_SHIELD_DISABLED`. For consistency with how environment variables are processed in PHP, it would be better to use a string value like "1".



```diff
-      'DRUPAL_SHIELD_DISABLED' => TRUE,
+      'DRUPAL_SHIELD_DISABLED' => '1',
```

---

`119-126`: _🛠️ Refactor suggestion_

**Add a complementary test for when Shield remains enabled.**

Like in the main test file, you should add a complementary test to verify Shield behavior when `DRUPAL_SHIELD_DISABLED` is falsy or not set.



Consider adding a test method to verify Shield remains enabled with falsy values.

</blockquote></details>

</blockquote></details>

<details>
<summary>🛑 Comments failed to post (1)</summary><blockquote>

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

44-47: _⚠️ Potential issue_

**Fix potential boolean check issue with DRUPAL_SHIELD_DISABLED**

The current implementation treats any non-empty value (including "0") as true. PHP's `getenv()` returns a string, so `getenv('DRUPAL_SHIELD_DISABLED')` with value "0" would still evaluate to true in an if statement.


Apply this diff to properly check for boolean environment variables:

```diff
// Allow to disable Shield completely in the environment.
-if (getenv('DRUPAL_SHIELD_DISABLED')) {
+if (getenv('DRUPAL_SHIELD_DISABLED') === '1') {
  $config['shield.settings']['shield_enable'] = FALSE;
}
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **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.

```suggestion
// Allow to disable Shield completely in the environment.
if (getenv('DRUPAL_SHIELD_DISABLED') === '1') {
  $config['shield.settings']['shield_enable'] = FALSE;
}
```

</details>

<!-- suggestion_end -->

</blockquote></details>

</blockquote></details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-14T05:42:03Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>♻️ Duplicate comments (3)</summary><blockquote>

<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php (1)</summary><blockquote>

`43-47`: **Implementation looks correct!**

The Shield disablement code is consistent with the main implementation. Using `!empty()` was the right choice based on previous review feedback.

</blockquote></details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php (1)</summary><blockquote>

`43-47`: **Implementation looks correct!**

The Shield disablement code is consistent across all environments, including this Acquia hosting fixture. Using `!empty()` addresses previous concerns about boolean validation.

</blockquote></details>
<details>
<summary>tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary><blockquote>

`96-118`: _🧹 Nitpick (assertive)_

**Test verifies the basic override functionality.**

The test properly validates that Shield can be fully disabled using the environment variable while preserving other Shield settings. However, following previous review suggestions, consider expanding the test coverage.



Consider testing with different values of DRUPAL_SHIELD_DISABLED including string values ("1", "true") and adding a complementary test for when Shield remains enabled (with falsy values like "0", "false").

```diff
  public function testShieldDisabled(string $env): void {
    $this->setEnvVars([
      'DRUPAL_ENVIRONMENT' => $env,
      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
-     'DRUPAL_SHIELD_DISABLED' => TRUE,
+     'DRUPAL_SHIELD_DISABLED' => '1',
    ]);

    $this->requireSettingsFile();

    $config['shield.settings']['shield_enable'] = FALSE;
    $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
    $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
    $config['shield.settings']['print'] = 'drupal_shield_print';

    $this->assertConfigContains($config);
  }
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: ASSERTIVE**
**Plan: Lite**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between d781e646a5b19bc3b4c0e1e3dfe3c88e6b2bd345 and a5d58bfd2fa9d90aec9b131f35b1dfb6459f3f25.

</details>

<details>
<summary>📒 Files selected for processing (7)</summary>

* `.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_no_valkey/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `.vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `web/sites/default/includes/modules/settings.shield.php` (1 hunks)

</details>

<details>
<summary>🔇 Additional comments (6)</summary><blockquote>

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

`43-47`: **Implementation looks correct!**

The new code properly adds the ability to completely disable Shield via the `DRUPAL_SHIELD_DISABLED` environment variable. The implementation uses `!empty()` which is good practice as it handles cases where the variable might be set to values like "0".

</details>
<details>
<summary>tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`123-130`: **Data provider implementation is correct.**

The data provider correctly provides all the necessary environments for testing the Shield disablement feature.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_no_valkey/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`1-52`: **LGTM: Clean removal of Valkey test methods.**

The removal of these Valkey-related test methods appears to be part of a broader cleanup of service-specific tests in fixture test suites. This aligns with similar removals in other test files.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`92-126`: **Well-implemented test for the new DRUPAL_SHIELD_DISABLED functionality.**

The new test method and data provider are well-structured and verify that the Shield feature can be explicitly disabled via the environment variable across all relevant environments.

The test effectively verifies that:
1. Setting `DRUPAL_SHIELD_DISABLED` to `TRUE` overrides environment-specific Shield enablement
2. Shield credentials and print settings are still correctly configured even when disabled

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php (2)</summary>

`1-64`: **LGTM: Appropriate removal of ClamAV test methods.**

The removal of these ClamAV-related test methods from this service fixture test suite is consistent with the service-specific test cleanup pattern seen throughout the PR.

---

`64-116`: **LGTM: Clean removal of Valkey test methods.**

The Valkey test method removals are consistent with the changes in other fixture test suites, streamlining the test coverage for service-specific functionality.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-14T06:02:03Z
user: login: AlexSkrypnyk
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-14T11:13:07Z

Review comments:
diff_hunk: @@ -168,6 +168,14 @@ Default value: `Restricted access.`
 
 Defined in: `.env`
 
+### `DRUPAL_SHIELD_DISABLED`
+
+Shield disabled.
+
+Default value: `UNDEFINED`
+
+Defined in: `.env`
+
path: .vortex/docs/content/workflows/variables.mdx
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Fix documentation default value inconsistency**

The default value is listed as `UNDEFINED` in this documentation, which is inconsistent with the `.env` file where it's set to `0`. Additionally, the pipeline failures indicate that the documentation needs to be updated and committed.

```shell
#!/bin/bash
# Verify the default value in .env file
grep "DRUPAL_SHIELD_DISABLED" .env | grep -v "^#"
```

Please run `cd .vortex && ahoy update-docs` and commit the changes to resolve the pipeline error.

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-14T01:47:12Z
author_association: NONE
diff_hunk: @@ -93,6 +93,42 @@ public function testConfigSplit(string $env, array $expected_present, array $exp
     $this->assertConfigNotContains($expected_absent);
   }
 
+  /**
+   * Test Shield can be completely disabled with environment variable.
+   *
+   * @dataProvider dataProviderEnvironments
+   */
+  public function testShieldDisabled(string $env): void {
+    $this->setEnvVars([
+      'DRUPAL_ENVIRONMENT' => $env,
+      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+      'DRUPAL_SHIELD_DISABLED' => TRUE,
path: tests/phpunit/Drupal/SwitchableSettingsTest.php
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Consider adding tests with different DRUPAL_SHIELD_DISABLED values.**

The test currently only checks with `TRUE`, but it would be beneficial to also test with other values like "1" or "0" to ensure the implementation behaves as expected with various inputs.


With the proposed changes to the implementation to use proper boolean validation, you should update the test to validate both truthy and falsy values:

```diff
  public function testShieldDisabled(string $env): void {
    $this->setEnvVars([
      'DRUPAL_ENVIRONMENT' => $env,
      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
-     'DRUPAL_SHIELD_DISABLED' => TRUE,
+     'DRUPAL_SHIELD_DISABLED' => '1',
    ]);

    $this->requireSettingsFile();

    $config['shield.settings']['shield_enable'] = FALSE;
    $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
    $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
    $config['shield.settings']['print'] = 'drupal_shield_print';

    $this->assertConfigContains($config);
  }
  
  /**
   * Test Shield remains enabled when DRUPAL_SHIELD_DISABLED is falsy.
   *
   * @dataProvider dataProviderEnvironments
   */
  public function testShieldNotDisabled(string $env): void {
    // Skip local and CI environments as they have special handling
    if ($env === static::ENVIRONMENT_LOCAL || $env === static::ENVIRONMENT_CI) {
      $this->markTestSkipped('Local and CI environments disable Shield by default.');
    }
    
    $this->setEnvVars([
      'DRUPAL_ENVIRONMENT' => $env,
      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
      'DRUPAL_SHIELD_DISABLED' => '0',
    ]);

    $this->requireSettingsFile();

    // For environments other than production, Shield should be enabled
    $expectedEnabled = $env !== static::ENVIRONMENT_PROD;
    
    $config['shield.settings']['shield_enable'] = $expectedEnabled;
    $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
    $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
    $config['shield.settings']['print'] = 'drupal_shield_print';

    $this->assertConfigContains($config);
  }
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **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.

```suggestion
      public function testShieldDisabled(string $env): void {
        $this->setEnvVars([
          'DRUPAL_ENVIRONMENT' => $env,
          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
-         'DRUPAL_SHIELD_DISABLED' => TRUE,
+         'DRUPAL_SHIELD_DISABLED' => '1',
        ]);

        $this->requireSettingsFile();

        $config['shield.settings']['shield_enable'] = FALSE;
        $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
        $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
        $config['shield.settings']['print'] = 'drupal_shield_print';

        $this->assertConfigContains($config);
      }

      /**
       * Test Shield remains enabled when DRUPAL_SHIELD_DISABLED is falsy.
       *
       * @dataProvider dataProviderEnvironments
       */
      public function testShieldNotDisabled(string $env): void {
        // Skip local and CI environments as they have special handling
        if ($env === static::ENVIRONMENT_LOCAL || $env === static::ENVIRONMENT_CI) {
          $this->markTestSkipped('Local and CI environments disable Shield by default.');
        }

        $this->setEnvVars([
          'DRUPAL_ENVIRONMENT' => $env,
          'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
          'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
          'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
          'DRUPAL_SHIELD_DISABLED' => '0',
        ]);

        $this->requireSettingsFile();

        // For environments other than production, Shield should be enabled
        $expectedEnabled = $env !== static::ENVIRONMENT_PROD;

        $config['shield.settings']['shield_enable'] = $expectedEnabled;
        $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
        $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
        $config['shield.settings']['print'] = 'drupal_shield_print';

        $this->assertConfigContains($config);
      }
```

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-14T01:50:00Z
author_association: NONE
diff_hunk: @@ -40,3 +40,8 @@
 if (getenv('DRUPAL_SHIELD_PRINT')) {
   $config['shield.settings']['print'] = getenv('DRUPAL_SHIELD_PRINT');
 }
+
+// Allow to disable Shield completely in the environment.
+if (getenv('DRUPAL_SHIELD_DISABLED')) {
+  $config['shield.settings']['shield_enable'] = FALSE;
+}
path: .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**Consider clarifying expected values for DRUPAL_SHIELD_DISABLED.**

The implementation of a global Shield disable switch is clean and follows the established pattern. However, PHP treats any non-empty string as true in boolean context, so values like "0" would still disable Shield.


Consider making the check more explicit about the expected values:

```diff
-if (getenv('DRUPAL_SHIELD_DISABLED')) {
+// Set DRUPAL_SHIELD_DISABLED=1 to disable Shield completely.
+if (getenv('DRUPAL_SHIELD_DISABLED') && getenv('DRUPAL_SHIELD_DISABLED') === '1') {
   $config['shield.settings']['shield_enable'] = FALSE;
 }
```

Alternatively, a simpler approach that preserves the current behavior but adds clarity:

```diff
-// Allow to disable Shield completely in the environment.
+// Allow to disable Shield completely by setting DRUPAL_SHIELD_DISABLED=1 in the environment.
 if (getenv('DRUPAL_SHIELD_DISABLED')) {
   $config['shield.settings']['shield_enable'] = FALSE;
 }
```

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-14T02:46:03Z
author_association: NONE
diff_hunk: @@ -54,6 +54,9 @@ DRUPAL_STAGE_FILE_PROXY_ORIGIN=https://www.your-site-domain.example/
 # Shield message.
 DRUPAL_SHIELD_PRINT="Restricted access."
 
+# Shield disabled.
+DRUPAL_SHIELD_DISABLED=0
path: .env
user: login: coderabbitai[bot]
body: _💡 Verification agent_

<details>
<summary>🧩 Analysis chain</summary>

**Clarify DRUPAL_SHIELD_DISABLED documentation**  
The new `DRUPAL_SHIELD_DISABLED` variable is added with a default of `0` (shield enabled). Consider enhancing the inline comment to specify valid values and semantics, e.g.:  
```diff
-# Shield disabled.
+# Disable Drupal Shield (0 = enabled, 1 = disabled).
 DRUPAL_SHIELD_DISABLED=0
```  
Also verify that `.vortex/docs/content/workflows/variables.mdx` is updated to reflect this change.

---

🏁 Script executed:

```shell
#!/bin/bash
# Search for DRUPAL_SHIELD_DISABLED in the variables documentation file
rg "DRUPAL_SHIELD_DISABLED" -n --glob "*/variables.mdx"
```

Length of output: 204

---

🏁 Script executed:

```shell
#!/bin/bash
# List all MDX files to locate the variables documentation
echo "MDX files in repo:"
find . -type f -name "*.mdx"

# Specifically look for any 'variables.mdx' under docs or .vortex
echo "Looking for variables.mdx:"
find . -type f -iname "variables.mdx"

# Search all MDX files for DRUPAL_SHIELD_DISABLED references
echo "References to DRUPAL_SHIELD_DISABLED in MDX files:"
grep -R --include="*.mdx" "DRUPAL_SHIELD_DISABLED" -n .
```

Length of output: 2545

---

🏁 Script executed:

```shell
#!/bin/bash
# Show context around the DRUPAL_SHIELD_DISABLED entry in the variables documentation
rg -n -C3 "DRUPAL_SHIELD_DISABLED" ./.vortex/docs/content/workflows/variables.mdx
```

Length of output: 192

---



</details>

**Clarify DRUPAL_SHIELD_DISABLED semantics in .env and docs**

Please update both the inline comment in your `.env` and the entry in the variables documentation to clearly describe valid values and defaults.

• Files to update:  
  – `.env` (around lines 57–58)  
  – `.vortex/docs/content/workflows/variables.mdx` (around line 163)

Suggested diffs:

```diff
--- .env
@@ lines 57–58
-# Shield disabled.
+# Disable Drupal Shield (0 = enabled, 1 = disabled).
 DRUPAL_SHIELD_DISABLED=0
```

```diff
--- .vortex/docs/content/workflows/variables.mdx
@@ around line 163
 Defined in: `docker-compose.yml`

 ### `DRUPAL_SHIELD_DISABLED`

-  Shield disabled.
+  Disable Drupal Shield. Valid values:
+  - `0`: Shield enabled (default)
+  - `1`: Shield disabled
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **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.

```suggestion
--- .env
@@ lines 57–58
-# Shield disabled.
+# Disable Drupal Shield (0 = enabled, 1 = disabled).
 DRUPAL_SHIELD_DISABLED=0
```

```suggestion
--- .vortex/docs/content/workflows/variables.mdx
@@ around line 163
 Defined in: `docker-compose.yml`

 ### `DRUPAL_SHIELD_DISABLED`

-  Shield disabled.
+  Disable Drupal Shield. Valid values:
+  - `0`: Shield enabled (default)
+  - `1`: Shield disabled
```

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-14T03:03:30Z
author_association: NONE
diff_hunk: @@ -40,3 +40,8 @@
 if (getenv('DRUPAL_SHIELD_PRINT')) {
   $config['shield.settings']['print'] = getenv('DRUPAL_SHIELD_PRINT');
 }
+
+// Allow to disable Shield completely in the environment.
+if (getenv('DRUPAL_SHIELD_DISABLED')) {
+  $config['shield.settings']['shield_enable'] = FALSE;
+}
path: .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Consider using a more explicit boolean check for DRUPAL_SHIELD_DISABLED.**

The current implementation will treat any non-empty value (including "0") as truthy, which may not be the intended behavior for a boolean toggle.


```diff
// Allow to disable Shield completely in the environment.
-if (getenv('DRUPAL_SHIELD_DISABLED')) {
+if (getenv('DRUPAL_SHIELD_DISABLED') && filter_var(getenv('DRUPAL_SHIELD_DISABLED'), FILTER_VALIDATE_BOOLEAN)) {
  $config['shield.settings']['shield_enable'] = FALSE;
}
```

This ensures only values like "1", "true", "yes", etc. will disable Shield, while "0", "false", "no" will not.


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **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.

```suggestion
// Allow to disable Shield completely in the environment.
if (getenv('DRUPAL_SHIELD_DISABLED') && filter_var(getenv('DRUPAL_SHIELD_DISABLED'), FILTER_VALIDATE_BOOLEAN)) {
  $config['shield.settings']['shield_enable'] = FALSE;
}
```

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-14T03:03:30Z
author_association: NONE
diff_hunk: @@ -1,6 +1,6 @@
-@@ -52,10 +52,6 @@
- # Shield message.
- DRUPAL_SHIELD_PRINT="Restricted access."
+@@ -55,10 +55,6 @@
+ # Shield disabled.
+ DRUPAL_SHIELD_DISABLED=0
path: .vortex/installer/tests/Fixtures/install/services_no_valkey/.env
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**Added DRUPAL_SHIELD_DISABLED variable as intended, but comment could be clearer.**

The new variable implements the PR objective. However, the comment "Shield disabled." might be confusing since the value `0` means Shield is actually enabled (not disabled). Consider updating the comment to something like "Whether Shield should be disabled (0=enabled, 1=disabled)."

```diff
-# Shield disabled.
+# Whether Shield should be disabled (0=enabled, 1=disabled).
 DRUPAL_SHIELD_DISABLED=0
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **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.

```suggestion
# Whether Shield should be disabled (0=enabled, 1=disabled).
DRUPAL_SHIELD_DISABLED=0
```

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->

✅ Addressed in commit f1dc2e8
created_at: 2025-05-14T03:03:30Z
author_association: NONE
diff_hunk: @@ -1,6 +1,6 @@
-@@ -52,19 +52,6 @@
- # Shield message.
- DRUPAL_SHIELD_PRINT="Restricted access."
+@@ -55,19 +55,6 @@
+ # Shield disabled.
+ DRUPAL_SHIELD_DISABLED=0
path: .vortex/installer/tests/Fixtures/install/services_none/.env
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**Clarify comment to reflect variable semantics.**  
The comment `# Shield disabled.` may be misleading since `0` means Shield is enabled and `1` means disabled. Consider updating it to:
```diff
-# Shield disabled.
+# Whether Shield should be disabled (0=enabled, 1=disabled).
 DRUPAL_SHIELD_DISABLED=0
```  



<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **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.

```suggestion
# Whether Shield should be disabled (0=enabled, 1=disabled).
DRUPAL_SHIELD_DISABLED=0
```

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->

✅ Addressed in commit f1dc2e8
created_at: 2025-05-14T03:24:43Z
author_association: NONE
diff_hunk: @@ -93,6 +93,42 @@ public function testConfigSplit(string $env, array $expected_present, array $exp
     $this->assertConfigNotContains($expected_absent);
   }
 
+  /**
+   * Test Shield can be completely disabled with environment variable.
+   *
+   * @dataProvider dataProviderEnvironments
+   */
+  public function testShieldDisabled(string $env): void {
+    $this->setEnvVars([
+      'DRUPAL_ENVIRONMENT' => $env,
+      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+      'DRUPAL_SHIELD_DISABLED' => TRUE,
+    ]);
+
+    $this->requireSettingsFile();
+
+    $config['shield.settings']['shield_enable'] = FALSE;
+    $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
+    $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
+    $config['shield.settings']['print'] = 'drupal_shield_print';
+
+    $this->assertConfigContains($config);
+  }
+
+  /**
+   * Data provider for testShieldDisabled().
+   */
+  public static function dataProviderEnvironments(): array {
+    return [
+      [static::ENVIRONMENT_DEV],
+      [static::ENVIRONMENT_STAGE],
+      [static::ENVIRONMENT_PROD],
+      [static::ENVIRONMENT_SUT],
+    ];
+  }
path: tests/phpunit/Drupal/SwitchableSettingsTest.php
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Consider adding a complementary test for when Shield remains enabled.**

While you've added a test to verify Shield can be disabled, there's no test to verify that Shield remains enabled when `DRUPAL_SHIELD_DISABLED` is not set or set to a falsy value.


Add a complementary test method to verify Shield behavior with falsy values:

```php
/**
 * Test Shield remains enabled when DRUPAL_SHIELD_DISABLED is falsy.
 *
 * @dataProvider dataProviderEnvironments
 */
public function testShieldNotDisabled(string $env): void {
  // Skip local and CI environments as they have special handling
  if ($env === static::ENVIRONMENT_LOCAL || $env === static::ENVIRONMENT_CI) {
    $this->markTestSkipped('Local and CI environments disable Shield by default.');
  }
  
  $this->setEnvVars([
    'DRUPAL_ENVIRONMENT' => $env,
    'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
    'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
    'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
    'DRUPAL_SHIELD_DISABLED' => '0',
  ]);

  $this->requireSettingsFile();

  // For environments other than production, Shield should be enabled
  $expectedEnabled = $env !== static::ENVIRONMENT_PROD;
  
  $config['shield.settings']['shield_enable'] = $expectedEnabled;
  $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
  $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
  $config['shield.settings']['print'] = 'drupal_shield_print';

  $this->assertConfigContains($config);
}
```

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-14T03:31:38Z
author_association: NONE
diff_hunk: @@ -54,6 +54,9 @@ DRUPAL_STAGE_FILE_PROXY_ORIGIN=https://www.your-site-domain.example/
 # Shield message.
 DRUPAL_SHIELD_PRINT="Restricted access."
 
+# Disable Drupal Shield for all environments (0 = enabled, 1 = disabled).
+DRUPAL_SHIELD_DISABLED=0
path: .env
user: login: AlexSkrypnyk
body: please remove this - it is supposed to be planted only in the hosting environments
created_at: 2025-05-14T04:22:59Z
author_association: MEMBER
diff_hunk: @@ -40,3 +40,8 @@
 if (getenv('DRUPAL_SHIELD_PRINT')) {
   $config['shield.settings']['print'] = getenv('DRUPAL_SHIELD_PRINT');
 }
+
+// Allow to disable Shield completely in the environment.
+if (getenv('DRUPAL_SHIELD_DISABLED')) {
path: .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php
user: login: AlexSkrypnyk
body: ```suggestion
if (!empty(getenv('DRUPAL_SHIELD_DISABLED'))) {
```
created_at: 2025-05-14T04:39:10Z
author_association: MEMBER
diff_hunk: @@ -93,6 +93,42 @@ public function testConfigSplit(string $env, array $expected_present, array $exp
     $this->assertConfigNotContains($expected_absent);
   }
 
+  /**
+   * Test Shield can be completely disabled with environment variable.
+   *
+   * @dataProvider dataProviderEnvironments
+   */
+  public function testShieldDisabled(string $env): void {
+    $this->setEnvVars([
+      'DRUPAL_ENVIRONMENT' => $env,
+      'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
+      'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
+      'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
+      'DRUPAL_SHIELD_DISABLED' => TRUE,
+    ]);
+
+    $this->requireSettingsFile();
+
+    $config['shield.settings']['shield_enable'] = FALSE;
+    $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
+    $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
+    $config['shield.settings']['print'] = 'drupal_shield_print';
+
+    $this->assertConfigContains($config);
+  }
+
+  /**
+   * Data provider for testShieldDisabled().
path: tests/phpunit/Drupal/SwitchableSettingsTest.php
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**Consider adding a complementary test for falsy values.**

To ensure comprehensive test coverage, consider adding a test that verifies Shield remains enabled when DRUPAL_SHIELD_DISABLED is set to a falsy value.


```php
/**
 * Test Shield remains enabled when DRUPAL_SHIELD_DISABLED is falsy.
 *
 * @dataProvider dataProviderEnvironments
 */
public function testShieldNotDisabled(string $env): void {
  // Skip local and CI environments as they have special handling
  if ($env === static::ENVIRONMENT_LOCAL || $env === static::ENVIRONMENT_CI) {
    $this->markTestSkipped('Local and CI environments disable Shield by default.');
  }
  
  // Skip production as it doesn't explicitly enable/disable Shield
  if ($env === static::ENVIRONMENT_PROD) {
    $this->markTestSkipped('Production environment does not explicitly enable/disable Shield.');
  }
  
  $this->setEnvVars([
    'DRUPAL_ENVIRONMENT' => $env,
    'DRUPAL_SHIELD_USER' => 'drupal_shield_user',
    'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass',
    'DRUPAL_SHIELD_PRINT' => 'drupal_shield_print',
    'DRUPAL_SHIELD_DISABLED' => '0',
  ]);

  $this->requireSettingsFile();

  $config['shield.settings']['shield_enable'] = TRUE;
  $config['shield.settings']['credentials']['shield']['user'] = 'drupal_shield_user';
  $config['shield.settings']['credentials']['shield']['pass'] = 'drupal_shield_pass';
  $config['shield.settings']['print'] = 'drupal_shield_print';

  $this->assertConfigContains($config);
}
```

<!-- This is an auto-generated comment by CodeRabbit -->

✅ Addressed in commit fe5781a
created_at: 2025-05-14T06:02:02Z
author_association: NONE

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-05-14T01:45:04Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

A new environment variable, `DRUPAL_SHIELD_DISABLED`, was introduced to forcibly disable the Shield feature in Drupal configurations. The Shield enablement logic was updated in multiple configuration files to check this variable and override previous enablement logic. Corresponding unit tests were expanded to cover various values of the new environment variable.

## Changes

| Files / Groups                                                                                         | Change Summary                                                                                                                                                                                                                                                                                                                                                                                      |
|--------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `web/sites/default/includes/modules/settings.shield.php`<br>`.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.shield.php`<br>`.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.shield.php` | Added logic to check the `DRUPAL_SHIELD_DISABLED` environment variable and, if set to a truthy value, forcibly disable the Shield feature by setting `shield_enable` to `FALSE`, overriding all previous enablement logic.                                                                                                                                |
| `tests/phpunit/Drupal/SwitchableSettingsTest.php`<br>`.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php`                   | Expanded the `dataProviderShield` method with multiple new test cases to verify the effect of various values of `DRUPAL_SHIELD_DISABLED` on the `shield_enable` setting, ensuring correct behavior for both truthy and falsy representations and verifying credentials and print settings remain present. |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant Env as Environment
    participant Config as ShieldConfig
    participant Test as UnitTest

    Env->>Config: Set DRUPAL_SHIELD_DISABLED (various values)
    Config->>Config: Evaluate normal Shield enablement logic
    Config->>Config: Check DRUPAL_SHIELD_DISABLED
    alt DRUPAL_SHIELD_DISABLED is truthy
        Config->>Config: Set shield_enable = FALSE
    else DRUPAL_SHIELD_DISABLED is falsy or not set
        Config->>Config: shield_enable remains as per previous logic
    end
    Test->>Config: Assert shield_enable and credentials/print settings
```


<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: ASSERTIVE**
**Plan: Lite**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between fe5781a8f27eacb815ad4c72b754cc95a7ebf2bc and b31b870625e8628ff12eba7cc0f5937a17a1ac30.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)
* `tests/phpunit/Drupal/SwitchableSettingsTest.php` (1 hunks)

</details>

<details>
<summary>🔇 Additional comments (2)</summary><blockquote>

<details>
<summary>tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`401-515`: <details>
<summary>✅ Verification successful</summary>

**Excellent comprehensive test coverage for the new DRUPAL_SHIELD_DISABLED variable!**

The test suite thoroughly examines how the `DRUPAL_SHIELD_DISABLED` environment variable affects Shield enablement across different environments and with various input types (empty string, integers, strings, booleans). This ensures robust validation of the feature.

However, I noticed that the test cases on line 463-475 expect the string "false" to be treated as truthy (disabling Shield). This behavior seems counterintuitive, as "false" strings are typically treated as falsy in boolean contexts in PHP. Please verify this matches the actual implementation behavior.



Let's verify the Shield behavior with the string "false" value:

---

🏁 Script executed:

```shell
#!/bin/bash
# Check how "false" string is interpreted in the Shield settings implementation

# Search for the Shield settings implementation
rg "DRUPAL_SHIELD_DISABLED" --type php -A 5 -B 5
```

Length of output: 9820

---



</details>

**Confirmed: `"false"` string disables Shield as implemented**  
The code uses `if (!empty(getenv('DRUPAL_SHIELD_DISABLED')))`, and in PHP `empty("false")` is FALSE, so `!empty("false")` is TRUE—disabling Shield. The tests correctly reflect this behavior.

</details>
<details>
<summary>.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php (1)</summary>

`393-507`: **Fixture file updated correctly with comprehensive test coverage.**

The test fixture file has been correctly updated with the same comprehensive set of test cases for the `DRUPAL_SHIELD_DISABLED` environment variable as the main implementation. This ensures consistency between the implementation and test fixtures.

As noted in the main file review, please verify that the string "false" is intended to be treated as truthy (lines 462-467) to disable Shield, as this is counter to typical PHP behavior where string "false" is falsy only when strictly compared.

</details>

</blockquote></details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIAbTMARgA2AAYATgBdLgBBWiV6ABEbAFUrbIAZAH0AZQAJAEkAUXKCyoL66uyAIXLGgsgJZ3gVSOjIAHc0ZAcBZnUaejkw2A9sREp7AGt4bm5KMAludAx6VHglDHEAM3goqcgMRwEN5IBmAA4NGBXGWExSFCXCiKbAMaToB4kcYDIYjDwYNBsQolMpVOpNFptDrdXoFL4AOXw6Dy6ng+ARviUuG0XmQ+D4TEuJAAHqEVPg8MsPIMKMMBJF+Hx1Mg1mgAeNKB5ePgJOcovAsLgfkpEAxedxxOSvu5PD4/IFgohQqg0IN4F44ZArvT9bKoehQrBcLhuIgOAB6d1EdSwbACDRMZju2j+CT4V3usMUGjM93cbxed1vT7mSwAYRYbEu00czGcrgMOvJXnkgazoXJXN1vn8QRCE3ueaUkCWSo8aDwsHpABotjs9hQDtxe+Mu/q60a7laE7bbtCrsDmFW1hsmEoqKp1NovvUsP5ENxyete2vlJvqToABSYHAEPMLFv4XAASnQDE2GHw40itFI9Db46GmyJxhLyRCkP49BoNOeqhnOPDAmCiCIASRJXNg0YrHwtBIAwayIGSGC9lcJB0AIaDvr2NpluwyASv4CEynK9CVgB8awQaIQaEY+jGOAUBkCxVy3oQpDkFQD40ZcXC8PwwiiOIUgyKWihnmomjaLoYCGCYUBwGcyA3h2BDEGQyiSZm7BcFQ0IOE4Lgtip64qOpWg6LxfGmAYNBGogcawPGGDqO6BQUNg3BoIm1TjOoDB/PyJDVCQzoKkQiDQFx3ABRwBjRHlBgWJA2T1KZ4nUFEdl5g5+DCXF/zSG4PwAAa0NQaBWMCsrrtUCAkF4tBNZAbBKoogJVk10WxfFkRJSlGBpRlRqDQwFrIQ2yAshFJxRDFSoPI4lAcsg5DQj5oQMFM4JKtQ9h7Aw8A3BdPjyCyiIKh4AHwMwEViPwwkAU1RSlBUNQNM0rTtJ0PR9INZCysCGDljCvKWqxzWIL1/WVGQcKDesc1ENqKzrJC0IXesyBMFIfDQTyty4PINWQIDKIg+i4NYlDuKDYMXiGoCK3YDh82QCQ30M/YuC8vNvYKjQEGQCkstMgrCS9ka0tEDEKTROrUupTECS65LmsxFckXrMbGsG9EUvBMbmCLPg+CRDe0AlI0RMfSElPkjcFBLtdoSjmQzNA6ioMYhD2LQwUg2oPjYREtBdtKvIvPBJAl5q4bxu22FJDG+7xSNM+vYAxjtxYzjCWDVcFpawnyVJ8zABiFTVI0TW9iQVwkWIkh9fIOGICMBs9VXtAjggArm7SjN8GLGrp5F/ObKRRxNZXfW0NjCK1+gyBNcXXdeyTZ2GQxvBfUMJb2Ewez/kSAMFI0ABqsMYPD5LliOPrEjhTUFJHwuxIG7D2jBLrIGtHwCa0BsgAHEu7HHoE1WwAB5OOosv7wARuWFC3xva+XQLSIk1MHryCDpACeO9GCQXYMMWkKCEJy3sMlcQ81kD+DzAqBC0h2D6iIM4WgkQ1pMwAiPOE9B65igAOTIAziQVC/A2x8C8Pgb0DBBRhB9hMSUJCaCQW4kYAqlhsheEMdQQiyACBViUCtZwVijx/VFsyQ80Yog2njPyeAWiGHiAagYKAhJfj1Rsc/ZUogLQSWsS4za9IHxeL9F4Xx2Dwi3DovopsJAADc/AMB3zQCSIB4S7FtUYl1DYw0uyoNatSDqTFuqY1oJeZ88csAOLWhNXadUEqzQ4QtEI7TmYX38oFYKoVwqRXdJNXAvSZrsNSulTKAUmrcTytEHiXkJQCHdARHywZe4dgse6BUgsVTumYCCURezFmcI0NvfqGgsrcByhs0xRUSpiXMhVXM+YXF1XmoEnUgKARFNoIZUm2Dv6IwEXTS0cVRCbDDqzNEYNMSQxxDDZY1Bp6h3xsRek91+TDyQHCGxPwaH9StGA3AGEPBLHxgM5mAASRkNwiCxHkc0h5dy0qyIyFyx5u8a6RAFYNWxTV27lE7ms74qAZSUF5M2E0uwUl3CuIYkhvgWRIGZeozROLQiivBFS04WBPwYDANKWgoIgHQtwT/WizD8aU3oZcRhdI+DX0uPwamyrpA9wwA4U2VCzWQKwM8BQ31Ig0DvpIhK9BZTQTho62Fvr2XwCIBhJxe4SBCIoCI6QdJhLXxtCa8sxjCrmMsSUluEiomOLrUzeJHiWLeuSak/xGSjCEnIOs/KQSvIaCjDGU5wbqQ+EoO6UZrd4CsnpX5BURpIqJkqORdYKTyAzp9mM7AQVcAhTChFKKPTpqJT5cso0zzsq5XytWr5ZkJK/PsozWqfwgWIEah4FqbUGmVIoGawa1TRq8IBrM+ZF6CZXtwMtVadF7gshoNtegu1YBDW8OIbgAoTo6KNJAimLcqYbDpkdGEfNwTiOauHNm6Lo5c2xamvBcLYQJWYW2XBos+4KTpIqdGzS964zYQTM+8J7TkyuvWFmwM0VR05lirBiHxbyGtjLQE8sNgpGYTnVTWtZEpFkcw2RCRZF61NrIu2JBDOO0gLIue6xTPMIEM7V2WAT5vmBGtHC3H/C+qY067MWceEFPkIDd+3dmbVHgUgiLNm0E2EwU1Z8XtXF3QfM8P4sobSoCoSHLA0mI7swxTHbmKAbFhTTlnJRhNew52M45izBdHMnzLszYVgmD5N1CLY6VndewJq3VrAC4aSLUHpdPc0Hh7ML1Fsp8j/NLzVY0L2WRjmla2YM6+deJBN7tZNYNdzD06F0AYRbdAV99zsBSxfEhiAyGUAoUa47FxxBnZsz60ITKln6mCwLPm+RBHCNESWuxZK2MyMJvKwyxTCKpcdr7amYoPpEk2ik+6ER04PauJQylzSaVjf8PI7BcIkYGtSRuzxfGPADamw3InpG1j6l4Pwy4uaUImI+TW8ysTbENocTE5xLa3EJM8R2nxfiPUBK/UEyAABZZKNT7BZoRHShi4U6l0C4E1bxaPJZWK0ehDAA9Kx1Pap1OUgHmmtK4M4KgshhmdKPhB89/SlmLVg2NNZo6WTjpXVOigO7fLujnQu/cvvJ1rop1ukggfcB+RefuiZx7pnO7hK7zh7ub3cEGtePIURmCYZ2Dh+0Z0CPgmI6bArtG5OYtjp/GFSN4VscUYZECHHF5uIUlEcNFaBEcjmSwaQz472bKHWAIwI6RexmXRH6ds752q+kOH1d7p12XWj+6HZez1BL6UObTD47zlL6ubam5X37nCqz28+9ZjH1lQfJVf5TNQXAp+C/gBkLcP+fTaEJvApEXvhWg2hV6yYcy16lY3QASCQuLDZ47n5pQKAYAco5pAI7j/QIAKKsYChdbMKfjGrKayyhAwLErxpg6iJVgja0r0qOTCbMpNRsp+xZpCo8rwGIACrMGTwdZioZASpEhSodynxQ5+pKpyj8AMB4QUCGSaobCrp8JZaM5k5aJUKMiAKESrovT7zkE2g07IDhoU4sRYDf5IwMx7DMJqgnYeoWy9irpfgGw3j7oqGkjkiRSQA05IxMzhr+AFpFpiKlq8g2isFVpmIWLc7OK86RL85s5xLC5traI65dqS49oGB9okAj5bLj4GCT4eLT4Tqrpz67oh6L5Lq5E+DuhdhGipSVAURBDDDBj4BqjOyHr7K75HIH5nL/bH7XJL6BGX4vLX6bIPqlQ/L0CP7VTvphLfqhJAof4Qhf44LMa+p/4eAAHIowIooyaRxgElbYqQE/DQFUYeDhqsGIHIEC4YBoHLCoBLFlbCa4FPizbLyEFAEUAkGkqjwJQUqHF46jaL40HwGsqZqcrcqTy8rQbsHAk7xcFWY8Etz8EypdxUT+rnB2EYDyDM7yHICKFPZzBEBOjE5sZ6GXQGFVhGF958BPhYSIGqFHhBFFQhFnGlJ87RJRFC7uKJJi667dqBIpEDqj4eS6TYJCQiRDHPr0BSScB+BoC2R/IORLCngbiuSaS8QClljqCVDnCICVBwRQh0CVArrRhaSGAGACnvCvBKAADsAArEkGAlcCkJaSkCkLQAACwABMSQzpCQtArwrp7wrp5pJArw5prwaAvptA5ptAKQ5pYIhpxp/EVoVwaQtADAtA7waQJEzpDAqQrwKQoZrpCQ5sJAlppp5pVwSQlpaQzpaACQrpeQaQaQ7wsZAppEvp7wDAVwAgtAiZAgrpAgdplpLplpJApZoZAgBZzplpVwCQ05lprwBZpETZ8ZKQ7w9pSQAgKQSQDA6QUZaASQrwZZaQuZJAaQx5lpDAlp65CQKQ65aQlpzpJAK5i5EAkASQtACQlprplps5lpCQOZrprpiZE57wSQaQW55EtAnZzpAgrwYF7waAzpKQCQjZyp8ZU5yZrpD5aAKQF0F0wZfZqgSQKgG5DAaQrpDAEZaAt57w5pCQ5EVwrwT5UA5paQaAVp7wJA/5tAk5KgoFfZ5phFHZZp55HF/p+ZaA1FqgDADFKFz5rpHwPpRSW5xZDZaAX5Ag7w0FCQNF5pvpQZh5nZ7wlp5paAoZd5jFrh5p7wCQJAHphFF5CQaQAgUlAgmZKQJA1lZpJEMF7w7Fa5vZ3pE55lqlXFGlVwtAAFlFtAh5aAogjlv5BZrw9lXZAgHpFZ9FVwn55lJERlVl4lGVAZFE6l75RSmZOlAgVpmZJFlprFJAfZvZWiMlUAml6l5pG5n5D5SQvpfcNZtVrF4hKQVwFZQZ1ZxlCQFEOZsZcZz5qpuA6pEKWpJAdoEoIqIE+gQAA=== -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=drevops/vortex&utm_content=1638):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE
user: login: skipper-vp
created_at: 2025-05-14T03:01:06Z
body: @coderabbitai full review

author_association: CONTRIBUTOR
user: login: coderabbitai[bot]
created_at: 2025-05-14T03:01:16Z
body: <!-- This is an auto-generated reply by CodeRabbit -->
<details>
<summary>✅ Actions performed</summary>

Full review triggered.

</details>
author_association: NONE
user: login: codecov[bot]
created_at: 2025-05-14T03:04:08Z
body: ## [Codecov](https://app.codecov.io/gh/drevops/vortex/pull/1638?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=drevops) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 71.56%. Comparing base [(`ff67855`)](https://app.codecov.io/gh/drevops/vortex/commit/ff67855a965ee7ad25127776e5d136286d62f3a3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=drevops) to head [(`b31b870`)](https://app.codecov.io/gh/drevops/vortex/commit/b31b870625e8628ff12eba7cc0f5937a17a1ac30?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=drevops).
> Report is 3 commits behind head on develop.

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff            @@
##           develop    #1638   +/-   ##
========================================
  Coverage    71.56%   71.56%           
========================================
  Files           76       76           
  Lines         4308     4308           
========================================
  Hits          3083     3083           
  Misses        1225     1225           
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/drevops/vortex/pull/1638?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=drevops).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=drevops).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE