Skip to content

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Nov 20, 2025

Closes #2044

image

installer

Summary by CodeRabbit

  • New Features

    • Configurable release versioning scheme (CalVer, SemVer, Other) selectable in the installer and via environment.
  • Documentation

    • Expanded release lifecycle docs with versioning guidance, examples, branch/release updates, and added variable documentation.
  • Tests

    • Added unit and functional tests for version-scheme selection.
  • Chores

    • CI updated to load .env and respect the configured scheme; spell-check dictionary expanded.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 20, 2025

Walkthrough

Adds a selectable release versioning scheme (CalVer, SemVer, Other) to the installer, persists the choice to .env, removes scheme-specific fenced tokens during install, updates CI to load .env and use a contains-check for CalVer, expands release docs, updates cspell, and adds handler/tests.

Changes

Cohort / File(s) Summary
Environment
.env
Inserted VORTEX_RELEASE_VERSION_SCHEME=calver in the PROVISION area.
CI Workflow
.github/workflows/draft-release-notes.yml
Load .env into Actions env before CalVer generation; change CalVer condition from equality to contains(env.VORTEX_RELEASE_VERSION_SCHEME, 'calver').
Docs — Release Guide
.vortex/docs/content/workflows/releasing.mdx, docs/releasing.md
Expanded releasing guide into a full release lifecycle, added/updated CalVer/SemVer sections, updated branch references (master→main), and adjusted CalVer examples.
Docs — Variables
.vortex/docs/content/workflows/variables.mdx
Added documentation entries for VORTEX_RELEASE_VERSION_SCHEME (allowed values, default, source).
Docs — Spelling
.vortex/docs/cspell.json
Added words: Runsheet, Runsheets, calver, hotfixes, runsheet, runsheets.
Installer — New Handler
.vortex/installer/src/Prompts/Handlers/VersionScheme.php
Added VersionScheme prompt handler with constants CALVER, SEMVER, OTHER; discover reads .env; default = CALVER; process persists choice to .env and removes scheme-specific fenced tokens as appropriate.
Installer — Integration
.vortex/installer/src/Prompts/PromptManager.php
Imported and wired VersionScheme into prompt sequence; incremented TOTAL_RESPONSES from 28→29; added to processors and response summary.
Installer — Tests
.vortex/installer/tests/Functional/Handlers/VersionSchemeInstallTest.php, .vortex/installer/tests/Unit/Handlers/VersionSchemePromptManagerTest.php, .vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php
Added functional and unit tests covering CALVER/SEMVER/OTHER and missing .env cases; updated test defaults to include CALVER.

Sequence Diagram(s)

sequenceDiagram
    participant User as Installer User
    participant PM as PromptManager
    participant VS as VersionScheme Handler
    participant ENV as .env
    participant FS as Filesystem

    User->>PM: runPrompts()
    PM->>VS: discover()
    VS->>ENV: read VORTEX_RELEASE_VERSION_SCHEME
    ENV-->>VS: current value / null
    VS-->>PM: discovered default
    PM->>User: present options (CalVer / SemVer / Other)
    User->>PM: selects scheme
    PM->>VS: process(selection)
    VS->>VS: determine token removals
    alt selection == SEMVER
        VS->>FS: remove CALVER fenced content
    else selection == CALVER
        VS->>FS: remove SEMVER fenced content
    else selection == OTHER
        VS->>FS: remove both CALVER & SEMVER fenced content
    end
    VS->>ENV: write VORTEX_RELEASE_VERSION_SCHEME
    ENV-->>VS: persisted
    VS-->>PM: complete
    PM-->>User: continue install flow
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to VersionScheme::process() token detection and safe file writes.
  • Verify PromptManager insertion point, TOTAL_RESPONSES update, and response summary.
  • Confirm CI .env loading step and contains() conditional behave as intended.
  • Validate tests cover discover/install and missing .env edge cases.

Possibly related PRs

Suggested labels

AUTOMERGE

Poem

🐰 I hopped into prompts to pick the scheme anew,
CalVer, SemVer, or Other — which one will you do?
I fenced and pruned content, wrote .env with care,
Releases now aligned — hop, build, and share! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 78.57% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: allowing selection of versioning schema in the installer, directly matching the PR's primary objective.
Linked Issues check ✅ Passed All coding requirements from issue #2044 are met: installer support for schema selection, VersionScheme handler with CalVer/SemVer/Other options, integration into PromptManager after CodeProvider, and documentation updates with versioning tokens.
Out of Scope Changes check ✅ Passed All changes directly support versioning schema selection: new VersionScheme handler, PromptManager integration, environment variable configuration, workflow updates, documentation expansion, and comprehensive test coverage remain in scope.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/2044-allow-versioning-schema

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

@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/2044-allow-versioning-schema branch from 680c034 to da77beb Compare November 20, 2025 05:07
@github-actions github-actions bot temporarily deployed to commit November 20, 2025 05:09 Inactive
@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 95.34884% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.59%. Comparing base (594b7d8) to head (37be979).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...ts/Unit/Handlers/AbstractPromptManagerTestCase.php 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2113      +/-   ##
===========================================
+ Coverage    70.38%   70.59%   +0.21%     
===========================================
  Files           98       99       +1     
  Lines         4980     5023      +43     
  Branches        44       44              
===========================================
+ Hits          3505     3546      +41     
- Misses        1475     1477       +2     

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

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

Caution

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

⚠️ Outside diff range comments (1)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (1)

193-223: Add VersionScheme to defaultTuiAnswers() to keep TUI tests in sync

The new VersionScheme prompt is now part of runPrompts(), but defaultTuiAnswers() doesn’t provide a default answer for it. Any tests that rely solely on defaultTuiAnswers() + tuiKeystrokes() are likely to run out of keystrokes or behave unpredictably when the VersionScheme select is shown.

Recommend adding a default entry, positioned alongside the other Code repository prompts:

   public static function defaultTuiAnswers(): array {
     return [
@@
       Theme::id() => static::TUI_DEFAULT,
       ThemeCustom::id() => static::TUI_DEFAULT,
       CodeProvider::id() => static::TUI_DEFAULT,
+      VersionScheme::id() => static::TUI_DEFAULT,
       Timezone::id() => static::TUI_DEFAULT,
       Services::id() => static::TUI_DEFAULT,
       Tools::id() => static::TUI_DEFAULT,
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 594b7d8 and da77beb.

⛔ Files ignored due to path filters (36)
  • .vortex/docs/static/img/installer.svg is excluded by !**/*.svg
  • .vortex/installer/tests/Fixtures/install/_baseline/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/.github/workflows/draft-release-notes.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/docs/releasing.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/db_download_source_acquia/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/db_download_source_container_registry/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/db_download_source_ftp/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/db_download_source_lagoon/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_all_circleci/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_all_gha/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_artifact/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_container_image/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_lagoon/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_none_circleci/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_none_gha/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_project_name___acquia/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_project_name___lagoon/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_all/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_github_only/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_jira_only/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_newrelic_only/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_none/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_slack_only/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_webhook_only/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_profile/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/starter_drupal_cms_profile/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/starter_drupal_profile/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/version_scheme_calver/.ignorecontent is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/version_scheme_other/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/version_scheme_other/docs/releasing.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/version_scheme_semver/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/version_scheme_semver/docs/releasing.md is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (11)
  • .env (1 hunks)
  • .github/workflows/draft-release-notes.yml (1 hunks)
  • .vortex/docs/content/workflows/releasing.mdx (1 hunks)
  • .vortex/docs/content/workflows/variables.mdx (1 hunks)
  • .vortex/docs/cspell.json (3 hunks)
  • .vortex/installer/src/Prompts/Handlers/VersionScheme.php (1 hunks)
  • .vortex/installer/src/Prompts/PromptManager.php (5 hunks)
  • .vortex/installer/tests/Functional/Handlers/VersionSchemeInstallTest.php (1 hunks)
  • .vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (2 hunks)
  • .vortex/installer/tests/Unit/Handlers/VersionSchemePromptManagerTest.php (1 hunks)
  • docs/releasing.md (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-13T04:14:41.765Z
Learnt from: AlexSkrypnyk
Repo: drevops/vortex PR: 2011
File: .vortex/tests/phpunit/Traits/Steps/StepAhoyTrait.php:20-23
Timestamp: 2025-09-13T04:14:41.765Z
Learning: In .vortex/tests/phpunit PHPUnit tests using cmd/cmdFail helpers, patterns in the expected output arrays support '*' markers for positive assertions (text must be present) and '!' markers for negative assertions (text must NOT be present). The '*' markers are NOT literal text matches but rather indicate expected presence.

Applied to files:

  • .vortex/installer/tests/Unit/Handlers/VersionSchemePromptManagerTest.php
🧬 Code graph analysis (5)
.vortex/installer/tests/Unit/Handlers/VersionSchemePromptManagerTest.php (3)
.vortex/installer/src/Prompts/Handlers/VersionScheme.php (1)
  • VersionScheme (11-117)
.vortex/installer/src/Utils/Config.php (1)
  • Config (14-126)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (6)
  • AbstractPromptManagerTestCase (51-279)
  • dataProviderRunPrompts (116-116)
  • getExpectedDefaults (121-153)
  • getExpectedInstalled (158-169)
  • stubVortexProject (265-271)
  • stubDotenvValue (257-263)
.vortex/installer/src/Prompts/PromptManager.php (3)
.vortex/installer/src/Prompts/Handlers/VersionScheme.php (1)
  • VersionScheme (11-117)
.vortex/installer/src/Prompts/Handlers/HandlerInterface.php (1)
  • id (19-19)
.vortex/installer/src/Prompts/Handlers/AbstractHandler.php (1)
  • id (52-62)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (3)
.vortex/installer/src/Prompts/Handlers/VersionScheme.php (1)
  • VersionScheme (11-117)
.vortex/installer/src/Prompts/Handlers/HandlerInterface.php (1)
  • id (19-19)
.vortex/installer/src/Prompts/Handlers/AbstractHandler.php (1)
  • id (52-62)
.vortex/installer/tests/Functional/Handlers/VersionSchemeInstallTest.php (4)
.vortex/installer/src/Prompts/Handlers/VersionScheme.php (1)
  • VersionScheme (11-117)
.vortex/installer/src/Prompts/PromptManager.php (2)
  • PromptManager (62-638)
  • makeEnvName (456-458)
.vortex/installer/src/Utils/Env.php (2)
  • Env (7-247)
  • put (24-26)
.vortex/installer/tests/Functional/FunctionalTestCase.php (2)
  • assertSutContains (113-128)
  • assertSutNotContains (130-145)
.vortex/installer/src/Prompts/Handlers/VersionScheme.php (4)
.vortex/installer/src/Utils/Env.php (3)
  • Env (7-247)
  • getFromDotenv (28-43)
  • writeValueDotenv (142-202)
.vortex/installer/src/Utils/File.php (2)
  • File (10-121)
  • removeTokenAsync (93-100)
.vortex/installer/src/Utils/Tui.php (3)
  • Tui (15-259)
  • bold (81-83)
  • underscore (85-87)
.vortex/installer/src/Prompts/Handlers/AbstractHandler.php (2)
  • AbstractHandler (10-233)
  • getResponseAsString (191-197)
🪛 LanguageTool
.vortex/docs/content/workflows/releasing.mdx

[style] ~37-~37: To form a complete sentence, be sure to include a subject.
Context: ...est development code, not yet released. May be unstable, but CI tests should pass. ...

(MISSING_IT_THERE)

docs/releasing.md

[style] ~14-~14: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...release/X.Y.Zin GitHub repository. 2. Release tag exists asX.Y.Z` in GitHub reposit...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

.vortex/docs/content/workflows/variables.mdx

[style] ~1987-~1987: To form a complete sentence, be sure to include a subject or ‘there’.
Context: ... Versioning scheme used for releases. Can be one of: calver, semver, other
@s...

(MISSING_IT_THERE)

🪛 markdownlint-cli2 (0.18.1)
docs/releasing.md

9-9: Bare URL used

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: deploy
  • GitHub Check: vortex-test-workflow (4)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-common
  • GitHub Check: vortex-test-workflow (0)
  • GitHub Check: vortex-test-installer (8.3)
  • GitHub Check: vortex-test-installer (8.4)
🔇 Additional comments (5)
.env (1)

219-227: New RELEASE VERSIONING section is consistent and well-documented

The VORTEX_RELEASE_VERSION_SCHEME variable, its allowed values, and default calver align with the installer handler and releasing docs. The @see link ties configuration and documentation together cleanly.

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

178-244: Version Scheme and configuration docs align with installer and env changes

The “Version Scheme”, CalVer/SemVer/Other descriptions, and the .env example for VORTEX_RELEASE_VERSION_SCHEME are clear and consistent with the installer prompt and workflow behaviour. This gives users a good mental model of how their choice propagates through releases and CI.

.vortex/docs/cspell.json (1)

14-16: Dictionary updates correctly cover new release/versioning terminology

Adding “Runsheet(s)”, “calver”, “hotfixes”, and their lowercase variants matches the new releasing documentation and avoids spurious spell-check noise.

Also applies to: 22-22, 40-40, 66-67

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

36-37: Default expectation for VersionScheme matches installer behaviour

Importing VersionScheme and expecting VersionScheme::CALVER in getExpectedDefaults() keeps unit tests aligned with the installer’s default and the .env default.

Also applies to: 121-152

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

16-51: Functional coverage cleanly verifies tokenized content for each scheme

The three datasets nicely exercise CALVER, SEMVER, and OTHER selections via the prompt env var and assert the expected presence/absence of versioning text and links in the generated SUT. This should catch regressions in token handling or prompt wiring.

Comment on lines +22 to 27
- name: Load environment variables from .env
run: t=$(mktemp) && export -p >"${t}" && set -a && . ./.env && set +a && . "${t}" && env >> "$GITHUB_ENV"

- name: Generate CalVer version
if: vars.VORTEX_RELEASE_VERSION_SCHEME == 'calver'
if: ${{ contains(env.VORTEX_RELEASE_VERSION_SCHEME, 'calver') }}
id: calver
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Sourcing .env without checkout and exporting full env to GITHUB_ENV is risky

This step will likely fail and is broader than needed:

  • On GitHub-hosted runners the repo is not checked out by default. Without a preceding actions/checkout, . ./.env will fail because .env isn’t present.
  • env >> "$GITHUB_ENV" re-exports the entire process environment, which is unnecessary for this workflow and could have subtle side-effects (especially if any variable contains unexpected characters or newlines).

I’d recommend:

  1. Ensure the repository is checked out before sourcing .env.
  2. Limit what you write to $GITHUB_ENV to the specific variables you actually need (here, VORTEX_RELEASE_VERSION_SCHEME).

Example adjustment:

     steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+
       - name: Load environment variables from .env
-        run: t=$(mktemp) && export -p >"${t}" && set -a && . ./.env && set +a && . "${t}" && env >> "$GITHUB_ENV"
+        run: |
+          set -a
+          . ./.env
+          set +a
+          # Only export the variables this workflow cares about.
+          env | grep '^VORTEX_RELEASE_VERSION_SCHEME=' >> "$GITHUB_ENV"
@@
-      - name: Generate CalVer version
-        if: ${{ contains(env.VORTEX_RELEASE_VERSION_SCHEME, 'calver') }}
+      - name: Generate CalVer version
+        if: ${{ contains(env.VORTEX_RELEASE_VERSION_SCHEME, 'calver') }}

🏁 Script executed:

#!/bin/bash
# Examine the draft-release-notes.yml workflow file to verify step ordering
cat .github/workflows/draft-release-notes.yml

Length of output: 1077


🏁 Script executed:

#!/bin/bash
# Check if .env file exists in repo root
ls -la .env 2>&1 || echo "File not found at repo root"

Length of output: 54


🏁 Script executed:

#!/bin/bash
# Search for any checkout steps in the workflow
rg -n "checkout" .github/workflows/draft-release-notes.yml

Length of output: 0


Add actions/checkout before sourcing .env and export only needed variables

The step will fail because GitHub-hosted runners do not auto-checkout the repository. Without a preceding actions/checkout step, the working directory won't contain .env, and . ./.env will fail with "No such file or directory."

Additionally, env >> "$GITHUB_ENV" exports the entire process environment to the workflow, which is unnecessarily broad and could introduce unexpected side effects.

Recommended fix:

    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+
       - name: Load environment variables from .env
-        run: t=$(mktemp) && export -p >"${t}" && set -a && . ./.env && set +a && . "${t}" && env >> "$GITHUB_ENV"
+        run: |
+          set -a
+          . ./.env
+          set +a
+          env | grep '^VORTEX_RELEASE_VERSION_SCHEME=' >> "$GITHUB_ENV"

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
.github/workflows/draft-release-notes.yml around lines 22 to 27: the job
attempts to source ./.env before the repository is checked out and then dumps
the entire process environment into $GITHUB_ENV, which will fail and over-export
variables; add an actions/checkout step immediately before the "Load environment
variables from .env" step so .env exists, and change the export logic to only
append the specific variables you need from the .env file to $GITHUB_ENV (e.g.,
read or filter the .env entries and echo only the required keys) instead of
using env >> "$GITHUB_ENV".

Comment on lines +37 to +39
- **Development** - Latest development code, not yet released. May be unstable, but CI tests should pass.
- **Stage** - Pre-production environment. Mirrors production as closely as possible. Used for final release testing.
- **Production** - Live customer-facing application. Stable and reliable. Source of truth for data.
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Tighten environment bullet phrasing to avoid fragments

The “Development / Stage / Production” bullets read slightly fragmented (“May be unstable, but CI tests should pass.”, “Used for final release testing.”). Consider making them full sentences for readability and to satisfy style linters, e.g.:

- **Development** – Latest development code, not yet released. It may be unstable, but CI tests should still pass.
- **Stage** – Pre-production environment that mirrors production as closely as possible. It is used for final release testing.
- **Production** – Live customer-facing application that must remain stable and reliable. It is the primary source of truth for data.
🧰 Tools
🪛 LanguageTool

[style] ~37-~37: To form a complete sentence, be sure to include a subject.
Context: ...est development code, not yet released. May be unstable, but CI tests should pass. ...

(MISSING_IT_THERE)

🤖 Prompt for AI Agents
.vortex/docs/content/workflows/releasing.mdx around lines 37 to 39: the three
environment bullets are written as fragments; rewrite each bullet as a complete
sentence to improve readability and satisfy style linters by turning fragments
into full sentences (e.g., prepend subjects like "It" or "This environment" and
make explicit predicates so each line reads as a standalone sentence while
preserving meaning about Development, Stage, and Production).

Comment on lines +1984 to +1992
### `VORTEX_RELEASE_VERSION_SCHEME`

Versioning scheme used for releases.

Can be one of: calver, semver, other<br/>@see https://www.vortextemplate.com/docs/workflows/releasing

Default value: `calver`

Defined or used in: `.env`
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Clarify description sentence and include all usage locations for the variable

The description reads a bit fragmentary and the “Defined or used in” list appears incomplete given this variable also drives CI and installer behavior. Consider:

  • Rewording the description to a full sentence, e.g. “The versioning scheme used for releases.”
  • Updating the usage line to reflect all relevant locations, e.g. “.env, CI config, installer” (or whatever files actually read it) to stay consistent with how other variables are documented.
🧰 Tools
🪛 LanguageTool

[style] ~1987-~1987: To form a complete sentence, be sure to include a subject or ‘there’.
Context: ... Versioning scheme used for releases. Can be one of: calver, semver, other
@s...

(MISSING_IT_THERE)

🤖 Prompt for AI Agents
.vortex/docs/content/workflows/variables.mdx around lines 1984 to 1992: the
description for VORTEX_RELEASE_VERSION_SCHEME is fragmentary and the "Defined or
used in" list is incomplete; change the short fragment into a full sentence like
"The versioning scheme used for releases." and update the usage line to list all
places this variable is read (e.g., ".env, CI configuration, installer" —
replace with the exact file names/locations if different) so it matches the
style of other variables.

Comment on lines 19 to 24
/**
* {@inheritdoc}
*/
public function label(): string {
return 'Release versioning schema';
}
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Align terminology (“scheme” vs “schema”) and optionally sync CalVer example with docs

Implementation and wiring (constants, default CALVER, discovery from .env, token handling) look correct and consistent with the docs and tests.

Only minor UX/text nits:

  • The label/description use “versioning schema” while the hint and env var name use “version scheme”. It’d be cleaner to pick one term (probably “scheme”, to match VORTEX_RELEASE_VERSION_SCHEME) and use it consistently across label/description/hint.
  • The CalVer example in the prompt (24.1.0) differs from the 25.x examples in the updated releasing docs; consider updating to a 25.x value for consistency, unless 24.x is intentional.

Also applies to: 29-53, 59-61

🤖 Prompt for AI Agents
.vortex/installer/src/Prompts/Handlers/VersionScheme.php lines 19-24 (and also
check lines 29-53, 59-61): the prompt text mixes “schema” and “scheme” and uses
a CalVer example out of sync with docs; update all label/description/hint
strings and any inline references to consistently use “scheme” (to match
VORTEX_RELEASE_VERSION_SCHEME and related env var names), and change the CalVer
example from 24.x to a 25.x value (e.g. 25.1.0) everywhere in this file so
wording and examples are uniform.

Comment on lines +15 to +60
public static function dataProviderRunPrompts(): array {
$expected_defaults = static::getExpectedDefaults();
$expected_installed = static::getExpectedInstalled();

return [
'version scheme - prompt' => [
[VersionScheme::id() => Key::ENTER],
$expected_defaults,
],

'version scheme - discovery - calver' => [
[],
[VersionScheme::id() => VersionScheme::CALVER] + $expected_installed,
function (AbstractPromptManagerTestCase $test, Config $config): void {
$test->stubVortexProject($config);
$test->stubDotenvValue('VORTEX_RELEASE_VERSION_SCHEME', VersionScheme::CALVER);
},
],

'version scheme - discovery - semver' => [
[],
[VersionScheme::id() => VersionScheme::SEMVER] + $expected_installed,
function (AbstractPromptManagerTestCase $test, Config $config): void {
$test->stubVortexProject($config);
$test->stubDotenvValue('VORTEX_RELEASE_VERSION_SCHEME', VersionScheme::SEMVER);
},
],

'version scheme - discovery - other' => [
[],
[VersionScheme::id() => VersionScheme::OTHER] + $expected_installed,
function (AbstractPromptManagerTestCase $test, Config $config): void {
$test->stubVortexProject($config);
$test->stubDotenvValue('VORTEX_RELEASE_VERSION_SCHEME', VersionScheme::OTHER);
},
],

'version scheme - discovery - missing .env' => [
[],
$expected_installed,
function (AbstractPromptManagerTestCase $test, Config $config): void {
$test->stubVortexProject($config);
},
],
];
}
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Unit coverage for VersionScheme prompt behavior looks solid; consider adding an invalid‑value scenario

The datasets cover the direct prompt path, discovery for each valid value, and the missing‑.env case, all wired through existing helpers, which is good.

As an extra safeguard, you might add a scenario where .env contains an invalid VORTEX_RELEASE_VERSION_SCHEME value and assert that discover() falls back to the default (CALVER). That would lock in the guard in VersionScheme::discover().

🤖 Prompt for AI Agents
In .vortex/installer/tests/Unit/Handlers/VersionSchemePromptManagerTest.php
around lines 15 to 60, add a new data set in dataProviderRunPrompts to cover an
invalid .env value: create a case (e.g. 'version scheme - discovery - invalid
value') that passes an empty input array, expects [VersionScheme::id() =>
VersionScheme::CALVER] + $expected_installed, and in the closure call
$test->stubVortexProject($config) then
$test->stubDotenvValue('VORTEX_RELEASE_VERSION_SCHEME', 'INVALID') (or similar
invalid string) so the test asserts discover() falls back to CALVER.

Comment on lines +15 to 23
3. The `HEAD` of the `main` branch has `X.Y.Z` tag.
4. The hash of the `HEAD` of the `main` branch exists in the `develop` branch.
This is to ensure that everything pushed to `main` exists in `develop` (in
case if `main` had any hot-fixes that not yet have been merged
to `develop`).
5. There are no PRs in GitHub related to the release.
6. The hash of the `HEAD` of the `production` branch matches the hash of
the `HEAD` of `master` branch.
the `HEAD` of `main` branch.

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Tokenization matches installer logic; fix duplicate CalVer example and minor phrasing

The new VERSION_RELEASE_SCHEME_SEMVER / VERSION_RELEASE_SCHEME_CALVER markers line up with the handler logic in VersionScheme::process(), which is good.

Two small nits in the changed block:

  • The “Incorrect” CalVer examples list contains 25.0.0 twice; you can replace one with another invalid case (e.g. 25.13 or 25.13.00) to avoid duplication.
  • The sentence about hot‑fixes reads a bit awkwardly:
    “in case if main had any hot-fixes that not yet have been merged to develop
    Consider simplifying to something like “in case main had any hot‑fixes that have not yet been merged to develop.”

Also applies to: 24-26, 41-45, 55-60

@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/2044-allow-versioning-schema branch from da77beb to ce97f24 Compare November 20, 2025 06:33
@github-actions github-actions bot temporarily deployed to commit November 20, 2025 06:35 Inactive
@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/2044-allow-versioning-schema branch from ce97f24 to 37be979 Compare November 20, 2025 07:09
@github-actions github-actions bot temporarily deployed to commit November 20, 2025 07:11 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (4)
.github/workflows/draft-release-notes.yml (1)

22-23: Add actions/checkout before sourcing .env.

Without a checkout step, .env won't exist in the runner's working directory, causing this step to fail.

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

1984-1992: Consider expanding "Defined or used in" to include CI configuration.

The .github/workflows/draft-release-notes.yml workflow also reads this variable. For completeness, consider:

-Defined or used in: `.env`
+Defined or used in: `.env`, `CI config`

This matches the documentation pattern used for other variables that appear in both .env and CI workflows.

docs/releasing.md (1)

15-19: Clean up CalVer examples and release-outcome phrasing (tokens look correct)

The VERSION_RELEASE_SCHEME_* fences align with VersionScheme::process() token handling, so the conditional sections should behave as intended.

Two small doc issues remain here, both previously flagged:

  • The CalVer “Incorrect” list still contains 25.0.0 twice; consider replacing one with another invalid pattern (e.g. 25.13 or 25.13.00) to avoid duplication.
  • The explanation sentence under point 4 reads awkwardly:
    “This is to ensure that everything pushed to main exists in develop (in case if main had any hot-fixes that not yet have been merged to develop).”
    Something like “This ensures everything pushed to main also exists in develop, in case main has hot-fixes that have not yet been merged back.” would read more naturally.

Optionally, you could also wrap the bare URL on line 9 in Markdown link syntax to satisfy MD034 (e.g. <https://www.vortextemplate.com/docs/workflows/releasing>).

Also applies to: 55-59

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

37-39: Consider rewriting environment bullets as complete sentences for clarity

The Development/Stage/Production bullets read clearly, but they still contain short fragments (“May be unstable...”, “Used for final release testing.”, “Stable and reliable. Source of truth for data.”). To improve readability and satisfy style linters, you could roll each bullet into a single full sentence, e.g.:

  • “Latest development code, not yet released. It may be unstable, but CI tests should still pass.”
  • “Pre-production environment that mirrors production as closely as possible. It is used for final release testing.”
  • “Live customer-facing application that must remain stable and reliable. It is the primary source of truth for data.”

This is purely a style improvement; the technical content looks good.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ce97f24 and 37be979.

⛔ Files ignored due to path filters (36)
  • .vortex/docs/static/img/installer.svg is excluded by !**/*.svg
  • .vortex/installer/tests/Fixtures/install/_baseline/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/.github/workflows/draft-release-notes.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/docs/releasing.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/db_download_source_acquia/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/db_download_source_container_registry/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/db_download_source_ftp/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/db_download_source_lagoon/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_all_circleci/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_all_gha/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_artifact/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_container_image/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_lagoon/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_none_circleci/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_types_none_gha/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_project_name___acquia/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_project_name___lagoon/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_all/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_github_only/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_jira_only/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_newrelic_only/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_none/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_slack_only/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/notification_channels_webhook_only/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_profile/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/starter_drupal_cms_profile/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/starter_drupal_profile/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/version_scheme_calver/.ignorecontent is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/version_scheme_other/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/version_scheme_other/docs/releasing.md is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/version_scheme_semver/.env is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/version_scheme_semver/docs/releasing.md is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (11)
  • .env (1 hunks)
  • .github/workflows/draft-release-notes.yml (1 hunks)
  • .vortex/docs/content/workflows/releasing.mdx (1 hunks)
  • .vortex/docs/content/workflows/variables.mdx (1 hunks)
  • .vortex/docs/cspell.json (3 hunks)
  • .vortex/installer/src/Prompts/Handlers/VersionScheme.php (1 hunks)
  • .vortex/installer/src/Prompts/PromptManager.php (5 hunks)
  • .vortex/installer/tests/Functional/Handlers/VersionSchemeInstallTest.php (1 hunks)
  • .vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (3 hunks)
  • .vortex/installer/tests/Unit/Handlers/VersionSchemePromptManagerTest.php (1 hunks)
  • docs/releasing.md (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-13T04:14:41.765Z
Learnt from: AlexSkrypnyk
Repo: drevops/vortex PR: 2011
File: .vortex/tests/phpunit/Traits/Steps/StepAhoyTrait.php:20-23
Timestamp: 2025-09-13T04:14:41.765Z
Learning: In .vortex/tests/phpunit PHPUnit tests using cmd/cmdFail helpers, patterns in the expected output arrays support '*' markers for positive assertions (text must be present) and '!' markers for negative assertions (text must NOT be present). The '*' markers are NOT literal text matches but rather indicate expected presence.

Applied to files:

  • .vortex/installer/tests/Unit/Handlers/VersionSchemePromptManagerTest.php
📚 Learning: 2025-08-08T12:02:24.652Z
Learnt from: AlexSkrypnyk
Repo: drevops/vortex PR: 1896
File: .vortex/tests/bats/unit/download-db-lagoon.bats:24-25
Timestamp: 2025-08-08T12:02:24.652Z
Learning: In .vortex/tests/bats/unit Bats tests using ../_helper.bash (run_steps), prefixing a STEPS entry with "- " denotes a negative assertion (the substring must NOT appear in output). Unprefixed entries are positive assertions. Example: "- Database dump refresh requested. Will create a new dump." asserts absence; "Database dump refresh requested. Will create a new dump." asserts presence.

Applied to files:

  • .vortex/installer/tests/Unit/Handlers/VersionSchemePromptManagerTest.php
🧬 Code graph analysis (5)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (3)
.vortex/installer/src/Prompts/Handlers/VersionScheme.php (1)
  • VersionScheme (11-117)
.vortex/installer/src/Prompts/Handlers/AbstractHandler.php (1)
  • id (52-62)
.vortex/installer/src/Prompts/Handlers/HandlerInterface.php (1)
  • id (19-19)
.vortex/installer/tests/Functional/Handlers/VersionSchemeInstallTest.php (3)
.vortex/installer/src/Prompts/Handlers/VersionScheme.php (1)
  • VersionScheme (11-117)
.vortex/installer/src/Prompts/PromptManager.php (2)
  • PromptManager (62-638)
  • makeEnvName (456-458)
.vortex/installer/src/Utils/Env.php (2)
  • Env (7-247)
  • put (24-26)
.vortex/installer/tests/Unit/Handlers/VersionSchemePromptManagerTest.php (3)
.vortex/installer/src/Prompts/Handlers/VersionScheme.php (1)
  • VersionScheme (11-117)
.vortex/installer/src/Utils/Config.php (1)
  • Config (14-126)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (6)
  • AbstractPromptManagerTestCase (51-280)
  • dataProviderRunPrompts (116-116)
  • getExpectedDefaults (121-153)
  • getExpectedInstalled (158-169)
  • stubVortexProject (266-272)
  • stubDotenvValue (258-264)
.vortex/installer/src/Prompts/Handlers/VersionScheme.php (4)
.vortex/installer/src/Utils/Env.php (3)
  • Env (7-247)
  • getFromDotenv (28-43)
  • writeValueDotenv (142-202)
.vortex/installer/src/Utils/File.php (2)
  • File (10-121)
  • removeTokenAsync (93-100)
.vortex/installer/src/Utils/Tui.php (3)
  • Tui (15-259)
  • bold (81-83)
  • underscore (85-87)
.vortex/installer/src/Prompts/Handlers/AbstractHandler.php (2)
  • AbstractHandler (10-233)
  • getResponseAsString (191-197)
.vortex/installer/src/Prompts/PromptManager.php (3)
.vortex/installer/src/Prompts/Handlers/VersionScheme.php (1)
  • VersionScheme (11-117)
.vortex/installer/src/Prompts/Handlers/AbstractHandler.php (1)
  • id (52-62)
.vortex/installer/src/Prompts/Handlers/HandlerInterface.php (1)
  • id (19-19)
🪛 LanguageTool
.vortex/docs/content/workflows/variables.mdx

[style] ~1987-~1987: To form a complete sentence, be sure to include a subject or ‘there’.
Context: ... Versioning scheme used for releases. Can be one of: calver, semver, other
@s...

(MISSING_IT_THERE)

docs/releasing.md

[style] ~14-~14: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...release/X.Y.Zin GitHub repository. 2. Release tag exists asX.Y.Z` in GitHub reposit...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

.vortex/docs/content/workflows/releasing.mdx

[style] ~37-~37: To form a complete sentence, be sure to include a subject.
Context: ...est development code, not yet released. May be unstable, but CI tests should pass. ...

(MISSING_IT_THERE)

🪛 markdownlint-cli2 (0.18.1)
docs/releasing.md

9-9: Bare URL used

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: build (1)
  • GitHub Check: build (0)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-workflow (4)
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-workflow (0)
  • GitHub Check: vortex-test-common
  • GitHub Check: vortex-test-installer (8.3)
  • GitHub Check: vortex-test-installer (8.4)
🔇 Additional comments (13)
.vortex/installer/tests/Unit/Handlers/AbstractPromptManagerTestCase.php (1)

36-36: LGTM! VersionScheme integration in test base class is consistent.

The import, expected defaults (CALVER), and TUI answer mappings correctly integrate the new VersionScheme handler into the test infrastructure.

Also applies to: 134-134, 207-207

.env (1)

219-227: LGTM! Clean addition of VORTEX_RELEASE_VERSION_SCHEME variable.

The new section is well-documented with clear allowed values (calver, semver, other), a sensible default (calver), and a helpful reference link.

.vortex/docs/cspell.json (1)

14-15: LGTM! Spell-check dictionary appropriately expanded.

The additions (Runsheet/runsheet variants, calver, hotfixes) align with the versioning and release workflow terminology introduced in this PR.

Also applies to: 22-22, 40-40, 66-67

.vortex/installer/src/Prompts/Handlers/VersionScheme.php (4)

11-24: LGTM! Clean class structure with clear constants.

The handler constants (CALVER, SEMVER, OTHER) and label are well-defined and consistent.


29-54: LGTM! Clear and informative prompt description.

The description provides good context for each versioning option with examples and reference links. The CalVer example "24.1.0" could optionally be updated to "25.1.0" to reflect the current year, but this is purely cosmetic.


59-92: LGTM! Robust implementation of handler methods.

The discovery logic correctly validates against known values and safely falls back to NULL for invalid inputs. The default (CALVER) is sensible.


97-115: LGTM! Token removal logic is correct.

The process() method correctly:

  • Persists the selection to .env
  • Removes appropriate documentation tokens based on the chosen scheme
  • Handles the "Other" case by removing both CalVer and SemVer-specific content
.vortex/installer/src/Prompts/PromptManager.php (4)

40-40: LGTM! VersionScheme correctly imported and response count updated.

The import and TOTAL_RESPONSES increment (28→29) are consistent with adding a new top-level prompt.

Also applies to: 69-69


158-158: LGTM! VersionScheme prompt correctly integrated into prompt flow.

The placement in the "Code repository" section after CodeProvider is logical, and the select() prompt correctly uses the handler's configuration.


292-292: LGTM! VersionScheme processor correctly ordered.

Placing VersionScheme before CodeProvider in the processors list correctly follows the reverse-order processing pattern documented in the method.


394-394: LGTM! Version scheme added to response summary.

The summary entry correctly displays the selected version scheme value.

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

15-60: LGTM! Good test coverage with room for enhancement.

The test scenarios effectively cover the main paths: prompting, discovery of valid values, and missing configuration.

Consider adding a test case for invalid .env values to verify the guard in VersionScheme::discover():

'version scheme - discovery - invalid value' => [
  [],
  [VersionScheme::id() => VersionScheme::CALVER] + $expected_installed,
  function (AbstractPromptManagerTestCase $test, Config $config): void {
    $test->stubVortexProject($config);
    $test->stubDotenvValue('VORTEX_RELEASE_VERSION_SCHEME', 'invalid');
  },
],

This would verify that invalid values correctly fall back to the CALVER default.

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

7-52: Disregard the import concern; AbstractInstallTestCase is in the same namespace and resolves correctly.

Verification confirms that AbstractInstallTestCase is defined in .vortex/installer/tests/Functional/Handlers/AbstractInstallTestCase.php within the same namespace (DrevOps\VortexInstaller\Tests\Functional\Handlers) as VersionSchemeInstallTest. In PHP, when a class extends another class in the same namespace, an explicit use statement is not required—namespace resolution handles it automatically. This is the standard pattern used throughout the test suite; all other test files in that directory follow the same approach without issues.

The test logic itself is sound: the data provider correctly seeds environment variables and validates that VersionScheme produces expected output for each scheme option.

Likely an incorrect or invalid review comment.


- name: Generate CalVer version
if: vars.VORTEX_RELEASE_VERSION_SCHEME == 'calver'
if: ${{ contains(env.VORTEX_RELEASE_VERSION_SCHEME, 'calver') }}
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider using exact equality instead of contains for CalVer check.

The contains() check will match substrings like "notcalver" or "calver_test". Since the variable is controlled and has documented values (calver, semver, other), an exact equality check would be more precise:

if: ${{ env.VORTEX_RELEASE_VERSION_SCHEME == 'calver' }}
🤖 Prompt for AI Agents
.github/workflows/draft-release-notes.yml around line 26: the workflow uses
contains(env.VORTEX_RELEASE_VERSION_SCHEME, 'calver') which can match unintended
substrings; change the condition to use an exact equality comparison against the
variable (env.VORTEX_RELEASE_VERSION_SCHEME == 'calver') so the step only runs
when the value is exactly "calver".

@AlexSkrypnyk AlexSkrypnyk merged commit 6cac67a into develop Nov 20, 2025
28 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/2044-allow-versioning-schema branch November 20, 2025 07:58
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Released in 1.34.0

Development

Successfully merging this pull request may close these issues.

[INSTALLER] Allow to choose release version schema: CalVer, SemVer

2 participants