Skip to content

LCORE-2341-unified mode feature files#2020

Merged
radofuchs merged 4 commits into
lightspeed-core:mainfrom
radofuchs:LCORE_2341_unified_mode_e2e_features
Jun 30, 2026
Merged

LCORE-2341-unified mode feature files#2020
radofuchs merged 4 commits into
lightspeed-core:mainfrom
radofuchs:LCORE_2341_unified_mode_e2e_features

Conversation

@radofuchs

@radofuchs radofuchs commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Description

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: (e.g., Claude, CodeRabbit, Ollama, etc., N/A if not used)
  • Generated by: (e.g., tool name and version; N/A if not used)

Related Tickets & Documents

  • Related Issue #LCORE-2341
  • Closes #LCORE-2341

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Summary by CodeRabbit

  • Tests
    • Added new end-to-end coverage for unified-mode configuration across both library and server modes, including startup readiness checks and successful query execution.
    • Introduced additional E2E scenarios for unified-mode validation, legacy-to-unified config migration, and unified-mode synthesis (output location, file permissions, secret handling, and startup logging).
    • Included all new unified-mode feature specs in the main E2E test execution list.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 680d3c91-4996-46fc-95dd-ffee92bea1df

📥 Commits

Reviewing files that changed from the base of the PR and between da9416d and c319757.

📒 Files selected for processing (2)
  • tests/e2e/features/unified-mode-migration.feature
  • tests/e2e/features/unified-mode-validation.feature
📜 Recent review details
⏰ Context from checks skipped due to timeout. (19)
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: radon
  • GitHub Check: Pyright
  • GitHub Check: list_outdated_dependencies
  • GitHub Check: build-pr
  • GitHub Check: Pylinter
  • GitHub Check: spectral
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: mypy
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-6-on-pull-request
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: server mode / ci / group 2
🧰 Additional context used
📓 Path-based instructions (1)
tests/e2e/**/*.{py,feature}

📄 CodeRabbit inference engine (AGENTS.md)

Use behave (BDD) framework for end-to-end testing with Gherkin feature files

Files:

  • tests/e2e/features/unified-mode-validation.feature
  • tests/e2e/features/unified-mode-migration.feature
🔇 Additional comments (2)
tests/e2e/features/unified-mode-validation.feature (1)

1-1: Remove the feature-level @skip.

It still skips every validation scenario, including the new config_format_version mismatch case, so this coverage never runs. As per coding guidelines, tests/e2e/**/*.{py,feature}: Use behave (BDD) framework for end-to-end testing with Gherkin feature files.

Source: Coding guidelines

tests/e2e/features/unified-mode-migration.feature (1)

1-1: Remove the feature-level @skip.

This still disables the entire migration suite, so none of the registered migration scenarios execute in E2E. As per coding guidelines, tests/e2e/**/*.{py,feature}: Use behave (BDD) framework for end-to-end testing with Gherkin feature files.

Source: Coding guidelines


Walkthrough

Five new Gherkin E2E feature files are added for unified-mode boot, legacy configuration, migration, synthesis, and validation, and they are registered in tests/e2e/test_list.txt.

Changes

Unified mode E2E tests

Layer / File(s) Summary
Unified-mode boot scenarios (library and server mode)
tests/e2e/features/unified-mode-boot.feature
Defines a shared background and eight scenarios verifying readiness and query HTTP 200 responses for four unified config variants in both library and server modes.
Legacy deprecation and validation scenarios
tests/e2e/features/unified-mode-legacy.feature, tests/e2e/features/unified-mode-validation.feature
Adds legacy two-file configuration boot scenarios and negative validation scenarios asserting --migrate-config error output.
Config migration scenarios
tests/e2e/features/unified-mode-migration.feature
Covers --migrate-config CLI behavior, generated YAML assertions, round-trip synthesis equality, and mode-specific readiness/query checks using migrated config.
Config synthesis behavior scenarios
tests/e2e/features/unified-mode-synthesis.feature
Covers native_override scalar and list replacement, secret environment reference preservation, 0600 file permissions, custom output path, and synthesized path in container logs for both modes.
Test list registration
tests/e2e/test_list.txt
Appends all five unified-mode feature files to the E2E test execution list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • tisnik
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the added unified mode feature test files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

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

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/e2e/features/unified-mode-boot.feature`:
- Around line 47-60: The profile-path boot scenarios only verify readiness and
never exercise query serving, so the relative and absolute variants can still
break inference without failing the test. Update the unified-mode boot scenarios
in unified-mode-boot.feature to include an actual inference/query request after
the service restarts and readiness passes, using the existing scenario patterns
for the relative and absolute profile-path cases so both boot and serve behavior
are covered.

In `@tests/e2e/features/unified-mode-migration.feature`:
- Around line 25-36: The migrated unified-mode scenarios have the action step
out of standard Given-When-Then order; in the affected feature cases, move the
service configuration precondition into the Given phase before the migration
action, or rewrite the migration step as part of the When/And action phase.
Update the affected scenarios in unified-mode-migration.feature so the step
sequence around lightspeed-stack --migrate-config, The service uses the
lightspeed-stack-unified-migrated.yaml configuration, and The service is
restarted reads clearly and follows BDD structure.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 43a48d62-94ab-4079-97fc-0bd6d5288518

📥 Commits

Reviewing files that changed from the base of the PR and between 7649229 and 8161786.

📒 Files selected for processing (6)
  • tests/e2e/features/unified-mode-boot.feature
  • tests/e2e/features/unified-mode-legacy.feature
  • tests/e2e/features/unified-mode-migration.feature
  • tests/e2e/features/unified-mode-synthesis.feature
  • tests/e2e/features/unified-mode-validation.feature
  • tests/e2e/test_list.txt
📜 Review details
⏰ Context from checks skipped due to timeout. (17)
  • GitHub Check: spectral
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: Pyright
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: build-pr
  • GitHub Check: Pylinter
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-6-on-pull-request
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
🧰 Additional context used
📓 Path-based instructions (1)
tests/e2e/**/*.{py,feature}

📄 CodeRabbit inference engine (AGENTS.md)

Use behave (BDD) framework for end-to-end testing with Gherkin feature files

Files:

  • tests/e2e/features/unified-mode-legacy.feature
  • tests/e2e/features/unified-mode-validation.feature
  • tests/e2e/features/unified-mode-migration.feature
  • tests/e2e/features/unified-mode-synthesis.feature
  • tests/e2e/features/unified-mode-boot.feature
🔇 Additional comments (6)
tests/e2e/features/unified-mode-synthesis.feature (1)

1-59: LGTM!

tests/e2e/features/unified-mode-legacy.feature (1)

1-40: LGTM!

tests/e2e/features/unified-mode-validation.feature (2)

16-19: LGTM!


10-13: 🎯 Functional Correctness

No change needed. The validator message for inference.providers + library_client_config_path already includes both mutually exclusive and --migrate-config, so the E2E assertion matches the implementation.

			> Likely an incorrect or invalid review comment.
tests/e2e/test_list.txt (2)

35-39: LGTM!


35-39: All referenced feature files exist. The five tests/e2e/features/unified-mode-*.feature paths are present at the expected locations.

Comment on lines +47 to +60
@skip-in-server-mode
Scenario: Unified config with relative profile path boots in library mode
Given The service uses the lightspeed-stack-unified-relative-profile.yaml configuration
And The service is restarted
When I access endpoint "readiness" using HTTP GET method
Then The status code of the response is 200


@skip-in-server-mode
Scenario: Unified config with absolute profile path boots in library mode
Given The service uses the lightspeed-stack-unified-absolute-profile.yaml configuration
And The service is restarted
When I access endpoint "readiness" using HTTP GET method
Then The status code of the response is 200

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Exercise query serving for the profile-path variants.

These four scenarios stop at /readiness, so they never verify that the relative/absolute profile configs can actually serve inference requests. That leaves the boot contract untested for those variants and would miss regressions where startup succeeds but profile resolution breaks query handling.

Also applies to: 101-116

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/e2e/features/unified-mode-boot.feature` around lines 47 - 60, The
profile-path boot scenarios only verify readiness and never exercise query
serving, so the relative and absolute variants can still break inference without
failing the test. Update the unified-mode boot scenarios in
unified-mode-boot.feature to include an actual inference/query request after the
service restarts and readiness passes, using the existing scenario patterns for
the relative and absolute profile-path cases so both boot and serve behavior are
covered.

Comment thread tests/e2e/features/unified-mode-migration.feature

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/e2e/features/unified-mode-boot.feature`:
- Line 1: The feature is currently tagged with `@skip`, which prevents every
scenario in unified-mode-boot from running because environment.py skips any
scenario carrying that tag. Remove the feature-level `@skip` from
unified-mode-boot.feature unless this suite is intentionally disabled, and keep
the existing e2e_group_2 tag so the scenarios can execute normally.

In `@tests/e2e/features/unified-mode-legacy.feature`:
- Line 1: Remove the feature-level `@skip` tag from the unified-mode-legacy
feature so the scenarios are no longer skipped entirely; keep the existing
scenario-level mode tags to control which legacy cases run. Update the feature
header in tests/e2e/features/unified-mode-legacy.feature so only the intended
scenario gating remains.

In `@tests/e2e/features/unified-mode-migration.feature`:
- Line 1: The feature is currently marked with a file-level `@skip`, which
prevents all unified mode migration scenarios from running in E2E. Remove the
`@skip` from the feature header in unified-mode-migration.feature so behave
executes the registered migration coverage, while keeping any narrower
scenario-level tags only if needed.

In `@tests/e2e/features/unified-mode-synthesis.feature`:
- Line 1: Remove the feature-level `@skip` tag from unified-mode-synthesis.feature
so the six synthesis scenarios are no longer disabled. Update the feature header
in tests/e2e/features/unified-mode-synthesis.feature to keep the existing
`@e2e_group_2` tag but drop `@skip`, ensuring the scenarios run normally.

In `@tests/e2e/features/unified-mode-validation.feature`:
- Line 1: The feature-level `@skip` tag on unified-mode-validation.feature is
preventing both scenarios from running, including the new --migrate-config error
path. Remove the top-level `@skip` from the feature declaration so the validation
scenarios execute normally, while keeping the existing scenario-level tags or
any selective skips only where explicitly needed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3b3a2ebc-72c5-48aa-8f43-3ff13b1d42ec

📥 Commits

Reviewing files that changed from the base of the PR and between 8161786 and da9416d.

📒 Files selected for processing (5)
  • tests/e2e/features/unified-mode-boot.feature
  • tests/e2e/features/unified-mode-legacy.feature
  • tests/e2e/features/unified-mode-migration.feature
  • tests/e2e/features/unified-mode-synthesis.feature
  • tests/e2e/features/unified-mode-validation.feature
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-6-on-pull-request
🧰 Additional context used
📓 Path-based instructions (1)
tests/e2e/**/*.{py,feature}

📄 CodeRabbit inference engine (AGENTS.md)

Use behave (BDD) framework for end-to-end testing with Gherkin feature files

Files:

  • tests/e2e/features/unified-mode-validation.feature
  • tests/e2e/features/unified-mode-legacy.feature
  • tests/e2e/features/unified-mode-migration.feature
  • tests/e2e/features/unified-mode-boot.feature
  • tests/e2e/features/unified-mode-synthesis.feature
🔇 Additional comments (3)
tests/e2e/features/unified-mode-boot.feature (2)

47-60: Still missing query coverage for the profile-path variants.

This is the same gap already flagged earlier: both relative and absolute profile-path scenarios stop at readiness, so they still won't catch regressions where startup succeeds but request serving fails.

Also applies to: 101-116


13-44: LGTM!

Also applies to: 65-98

tests/e2e/features/unified-mode-migration.feature (1)

27-29: The Given/When ordering is still inverted in these scenarios.

This is the same BDD step-ordering issue already called out in the earlier review and it still applies here.

Also applies to: 43-45

@@ -0,0 +1,116 @@
@e2e_group_2 @skip

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Feature files carrying a top-level skip tag:"
rg -n '^@.*\bskip\b' tests/e2e/features

echo
echo "Behave hook handling for skip-related tags:"
fd -HI 'environment.py' tests/e2e . -x sh -c '
  echo "--- $1 ---"
  rg -n -C3 "skip|skip-in-server-mode|skip-in-library-mode" "$1" || true
' sh {}

Repository: lightspeed-core/lightspeed-stack

Length of output: 8141


Remove the feature-level @skip unless this suite is meant to stay disabled. tests/e2e/features/environment.py skips any scenario tagged @skip, so this feature will never execute as written.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/e2e/features/unified-mode-boot.feature` at line 1, The feature is
currently tagged with `@skip`, which prevents every scenario in unified-mode-boot
from running because environment.py skips any scenario carrying that tag. Remove
the feature-level `@skip` from unified-mode-boot.feature unless this suite is
intentionally disabled, and keep the existing e2e_group_2 tag so the scenarios
can execute normally.

@@ -0,0 +1,39 @@
@e2e_group_2 @skip

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check how `@skip` is handled in the E2E harness and where it is used.
fd -i 'environment.py' tests/e2e .
rg -n -C2 --glob 'tests/e2e/**' '`@skip`\b|`@skip-in-server-mode`|`@skip-in-library-mode`'
rg -n -C2 --glob '*' 'behave|--tags|`@skip`|skip-in-server-mode|skip-in-library-mode'

Repository: lightspeed-core/lightspeed-stack

Length of output: 326


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== feature file ==\n'
cat -n tests/e2e/features/unified-mode-legacy.feature

printf '\n== environment.py ==\n'
cat -n tests/e2e/features/environment.py

printf '\n== tag references in e2e ==\n'
rg -n -C2 '`@skip`\b|`@skip-in-server-mode`|`@skip-in-library-mode`|before_tag|after_tag|active_tags|tag_expression|behave' tests/e2e

Repository: lightspeed-core/lightspeed-stack

Length of output: 50388


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
p = Path('tests/e2e/features/unified-mode-legacy.feature')
text = p.read_text()
print('top tags:', text.splitlines()[:5])
print('has scenario tags:', '`@skip-in-server-mode`' in text, '`@skip-in-library-mode`' in text)
PY

Repository: lightspeed-core/lightspeed-stack

Length of output: 365


Remove the feature-level @skip tag. tests/e2e/features/unified-mode-legacy.feature:1 skips both scenarios, so this legacy coverage never runs; the scenario-level mode tags already gate the two cases.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/e2e/features/unified-mode-legacy.feature` at line 1, Remove the
feature-level `@skip` tag from the unified-mode-legacy feature so the scenarios
are no longer skipped entirely; keep the existing scenario-level mode tags to
control which legacy cases run. Update the feature header in
tests/e2e/features/unified-mode-legacy.feature so only the intended scenario
gating remains.

@@ -0,0 +1,53 @@
@e2e_group_2 @skip

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Remove the file-level @skip.

Line 1 skips the entire feature, so none of these newly added migration scenarios will execute even though this PR registers them as E2E coverage. That leaves the migration path untested in CI. As per coding guidelines, tests/e2e/**/*.{py,feature} should be used for behave-based end-to-end testing, and a file-level skip prevents that coverage from running.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/e2e/features/unified-mode-migration.feature` at line 1, The feature is
currently marked with a file-level `@skip`, which prevents all unified mode
migration scenarios from running in E2E. Remove the `@skip` from the feature
header in unified-mode-migration.feature so behave executes the registered
migration coverage, while keeping any narrower scenario-level tags only if
needed.

Source: Coding guidelines

@@ -0,0 +1,59 @@
@e2e_group_2 @skip

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify how `@skip` is handled in this repo's behave setup and where else it is used.
fd -i 'environment.py' tests . -x sh -c 'echo "=== $1 ==="; sed -n "1,220p" "$1"' sh {}
echo
rg -n -C2 '`@skip`\b|skip-in-server-mode|skip-in-library-mode' tests/e2e

Repository: lightspeed-core/lightspeed-stack

Length of output: 32630


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== tests/e2e/features/unified-mode-synthesis.feature ==="
sed -n '1,120p' tests/e2e/features/unified-mode-synthesis.feature

echo
echo "=== Behave availability ==="
python3 - <<'PY'
try:
    import behave
    print("behave:", behave.__version__)
except Exception as e:
    print("behave_import_error:", type(e).__name__, e)
PY

Repository: lightspeed-core/lightspeed-stack

Length of output: 3113


Remove the feature-level @skip tag. This disables all six scenarios in tests/e2e/features/unified-mode-synthesis.feature, so the new synthesis coverage never runs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/e2e/features/unified-mode-synthesis.feature` at line 1, Remove the
feature-level `@skip` tag from unified-mode-synthesis.feature so the six synthesis
scenarios are no longer disabled. Update the feature header in
tests/e2e/features/unified-mode-synthesis.feature to keep the existing
`@e2e_group_2` tag but drop `@skip`, ensuring the scenarios run normally.

@@ -0,0 +1,19 @@
@e2e_group_2 @skip

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check how `@skip` is handled in the E2E harness and where it is used.
fd -i 'environment.py' tests/e2e .
rg -n -C2 --glob 'tests/e2e/**' '`@skip`\b|`@skip-in-server-mode`|`@skip-in-library-mode`'
rg -n -C2 --glob '*' 'behave|--tags|`@skip`|skip-in-server-mode|skip-in-library-mode'

Repository: lightspeed-core/lightspeed-stack

Length of output: 326


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== feature file ==\n'
cat -n tests/e2e/features/unified-mode-validation.feature

printf '\n== environment.py outline ==\n'
ast-grep outline tests/e2e/features/environment.py --view expanded || true

printf '\n== environment.py ==\n'
cat -n tests/e2e/features/environment.py

printf '\n== skip tag usage ==\n'
rg -n -C2 '`@skip`\b|skip-in-server-mode|skip-in-library-mode|--tags|behave' tests/e2e . --glob '!**/.git/**'

Repository: lightspeed-core/lightspeed-stack

Length of output: 50390


Remove the feature-level @skip tag.
That tag skips both validation scenarios, so the new --migrate-config error path never runs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/e2e/features/unified-mode-validation.feature` at line 1, The
feature-level `@skip` tag on unified-mode-validation.feature is preventing both
scenarios from running, including the new --migrate-config error path. Remove
the top-level `@skip` from the feature declaration so the validation scenarios
execute normally, while keeping the existing scenario-level tags or any
selective skips only where explicitly needed.

@tisnik tisnik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. The When/Given steps switch looked weird at 1st glance, but seems to be ok.

@max-svistunov max-svistunov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work -- these track the spec's acceptance surface closely and reuse the existing steps well. A few things before merge: two I'd want addressed (the byte-identical assertion on the round-trip, and the missing deprecation-WARN coverage for R2), one optional (the R11 version-mismatch case), and a Gherkin nit.

Btw, reviewing surfaced a couple of step-implementation notes for 2343 -- captured on LCORE-2343, nothing blocking here.

Scenario: migrate then synthesize round-trips to the original run.yaml
When lightspeed-stack --migrate-config is run for the legacy migration fixture pair
And the active unified configuration is synthesized to run.yaml
Then the synthesized run.yaml is byte-identical to the legacy migration fixture run.yaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This asserts byte-identical, but the spec's round-trip test (see R4 in the design doc) is dict-equality, not byte-equality. Byte-identical YAML is fragile (things like key ordering, quote style, comment loss, anchor expansion all break it), and the synthesizer has no reason to preserve any of them.

How about:

Then the synthesized run.yaml parses to the same data as the legacy migration fixture run.yaml

(The scenario titles on L26/L42 saying "byte-identical behavior" are fine -- behavior is byte-identical per the spec, it's just the file itself that isn't.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

agreed, will fix

# --- library mode (@skip-in-server-mode) ---

@skip-in-server-mode
Scenario: Legacy two-file configuration still boots and serves requests in library mode

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

R2 has two halves -- still boots and serves AND one startup deprecation WARN in 0.6; no WARN in unified mode. This covers the boot half but not the WARN, and the WARN is really the point of R2 (it's how we prove the deprecation is actually live).

The log-assertion plumbing already exists -- synthesis.feature does Then the lightspeed-stack container logs contain synthesized run.yaml, so a Then the lightspeed-stack container logs contain a legacy-config deprecation warning here would mirror it (that exact string is just illustrative -- the real WARN wording is 2339's). Could you add a WARN-present scenario in legacy mode, and ideally a WARN-absent one in unified mode over in boot.feature?

Scenario: llama_stack.config together with library_client_config_path fails at load
Given The service uses the lightspeed-stack-invalid-config-and-legacy.yaml configuration
When configuration validation is attempted for the active configuration
Then the validation error contains --migrate-config

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

R11 in the spec is verified by both unit and e2e tests. The e2e part covers this case: a config declares a config_format_version, but that version does not match the config's actual shape, so loading must fail. This case is not tested anywhere yet -- the boot scenarios exercise shape auto-detection, but not the version mismatch.

Could you add one more scenario here, like the two above? For example, a config whose config_format_version says legacy while its body is unified, asserting that loading fails.

Lower priority than the deprecation-WARN gap; fine to move to a follow-up PR if you would rather keep this one small. I am flagging it because R11 lists e2e.

@skip-in-server-mode
Scenario: Migrated unified configuration drives byte-identical Llama Stack behavior in library mode
When lightspeed-stack --migrate-config is run for the legacy migration fixture pair
Given The service uses the lightspeed-stack-unified-migrated.yaml configuration

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Given after When reads backwards here -- the migrate is logically the precondition for "The service uses ...migrated.yaml". Behave parses it fine, so it is only cosmetic, but reversing the two reads more naturally:

Given lightspeed-stack --migrate-config has been run for the legacy migration fixture pair
And The service uses the lightspeed-stack-unified-migrated.yaml configuration

Same on L44.

@radofuchs radofuchs Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this was copy paste error, but completely agree that it reads weirdly. To keep the look unified across all scenarios, I will fix add the given step

When implementing, create this step as a step, this allows it to serve as both Given or When step

@max-svistunov max-svistunov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

EDIT: Waiting on tests, then will re-approve.

@max-svistunov max-svistunov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thank you.

@radofuchs radofuchs merged commit 513df21 into lightspeed-core:main Jun 30, 2026
30 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants