-
Notifications
You must be signed in to change notification settings - Fork 101
LCORE-2343: implement behave step definitions for unified-mode feature files #2448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
max-svistunov
wants to merge
24
commits into
lightspeed-core:main
Choose a base branch
from
max-svistunov:lcore-2343-unified-mode-step-definitions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ebd7849
LCORE-2343: add unified-mode e2e configuration fixtures
max-svistunov cf637b8
LCORE-2343: restore legacy library-mode boot coverage with a dedicate…
max-svistunov 2ae2f71
LCORE-2343: implement unified-mode step definitions
max-svistunov e556cf3
LCORE-2343: gate unified-mode features for Prow and the providers matrix
max-svistunov 3609a1f
LCORE-2343: unskip the unified-mode feature files
max-svistunov 8970e07
LCORE-2343: close the health-vs-listen race in lightspeed restarts
max-svistunov 2ff346b
LCORE-2343: make the migrated e2e config readable by the container user
max-svistunov 7097491
LCORE-2343: migrate the legacy e2e fixture to the unified rag schema
max-svistunov d4255ed
LCORE-2343: assert the migrate-config 0600 mode instead of relaxing it
max-svistunov 5e8522f
LCORE-2343: match the synthesis log assertions to the OGX-renamed mes…
max-svistunov 5549a52
LCORE-2343: name the migration boot scenarios for what they assert
max-svistunov 7436370
LCORE-2343: drop the trailing blank line from the legacy e2e fixture
max-svistunov ca8be64
LCORE-2343: require a synthesized path in every accepted startup-log …
max-svistunov 3e38e71
LCORE-2343: bound the HTTP readiness wait with a single monotonic dea…
max-svistunov 5288e8c
LCORE-2343: write down the e2e/integration test-layer boundary
max-svistunov 5bb26fb
LCORE-2343: cover unified-mode validation, migration and synthesis in…
max-svistunov 9de142b
LCORE-2343: keep only deployed-stack scenarios in the unified-mode e2…
max-svistunov 21bbfec
LCORE-2343: scope the startup-log evidence to the current boot
max-svistunov af990c2
LCORE-2343: keep the fixture regeneration recipe within the line limit
max-svistunov adc041b
LCORE-2343: drop a stray blank line from .gitignore
max-svistunov 30e53ad
LCORE-2343: tag the synthesis scenarios @openai-only
max-svistunov ea3333b
LCORE-2343: keep the after_feature restore tolerant, and bound the wa…
max-svistunov d1742b0
LCORE-2343: make server-mode synthesis observable, and assert on it
max-svistunov 57e5410
LCORE-2343: follow the OGX runtime rename in the unified-mode fixture…
max-svistunov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
tests/configuration/unified-mode/lightspeed-stack-invalid-config-and-legacy.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: Lightspeed Core Service (LCS) | ||
| service: | ||
| host: 0.0.0.0 | ||
| port: 8080 | ||
| auth_enabled: false | ||
| workers: 1 | ||
| color_log: true | ||
| access_log: true | ||
| llama_stack: | ||
| # Library mode - embeds the stack in-process | ||
| use_as_library_client: true | ||
| config: | ||
| profile: tests/configuration/run.yaml | ||
| # INVALID: config block plus the legacy path (mutual exclusion, R3) | ||
| library_client_config_path: tests/configuration/run.yaml | ||
| user_data_collection: | ||
| feedback_enabled: true | ||
| feedback_storage: "/tmp/data/feedback" | ||
| transcripts_enabled: true | ||
| transcripts_storage: "/tmp/data/transcripts" | ||
| authentication: | ||
| module: "noop" | ||
| inference: | ||
| default_provider: openai | ||
| default_model: gpt-4o-mini |
31 changes: 31 additions & 0 deletions
31
tests/configuration/unified-mode/lightspeed-stack-invalid-providers-and-legacy.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Lightspeed Core Service (LCS) | ||
| service: | ||
| host: 0.0.0.0 | ||
| port: 8080 | ||
| auth_enabled: false | ||
| workers: 1 | ||
| color_log: true | ||
| access_log: true | ||
| llama_stack: | ||
| # Library mode - embeds the stack in-process | ||
| use_as_library_client: true | ||
| # INVALID: synthesis input plus the legacy path (mutual exclusion, R3) | ||
| library_client_config_path: tests/configuration/run.yaml | ||
| user_data_collection: | ||
| feedback_enabled: true | ||
| feedback_storage: "/tmp/data/feedback" | ||
| transcripts_enabled: true | ||
| transcripts_storage: "/tmp/data/transcripts" | ||
| authentication: | ||
| module: "noop" | ||
| inference: | ||
| default_provider: openai | ||
| default_model: gpt-4o-mini | ||
| # Unified synthesis input (Decision S5): the high-level provider entry | ||
| # replaces the default baseline's openai provider by id at synthesis time. | ||
| providers: | ||
| - type: openai | ||
| id: openai | ||
| api_key_env: OPENAI_API_KEY | ||
| allowed_models: | ||
| - ${env.E2E_OPENAI_MODEL:=gpt-4o-mini} |
31 changes: 31 additions & 0 deletions
31
tests/configuration/unified-mode/lightspeed-stack-invalid-version-legacy-unified-body.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Lightspeed Core Service (LCS) | ||
| service: | ||
| host: 0.0.0.0 | ||
| port: 8080 | ||
| auth_enabled: false | ||
| workers: 1 | ||
| color_log: true | ||
| access_log: true | ||
| llama_stack: | ||
| # Library mode - embeds the stack in-process | ||
| use_as_library_client: true | ||
| user_data_collection: | ||
| feedback_enabled: true | ||
| feedback_storage: "/tmp/data/feedback" | ||
| transcripts_enabled: true | ||
| transcripts_storage: "/tmp/data/transcripts" | ||
| authentication: | ||
| module: "noop" | ||
| inference: | ||
| default_provider: openai | ||
| default_model: gpt-4o-mini | ||
| # Unified synthesis input (Decision S5): the high-level provider entry | ||
| # replaces the default baseline's openai provider by id at synthesis time. | ||
| providers: | ||
| - type: openai | ||
| id: openai | ||
| api_key_env: OPENAI_API_KEY | ||
| allowed_models: | ||
| - ${env.E2E_OPENAI_MODEL:=gpt-4o-mini} | ||
| # INVALID: explicit legacy marker on a unified-shaped body (R11, LCORE-2872) | ||
| config_format_version: legacy |
23 changes: 23 additions & 0 deletions
23
tests/configuration/unified-mode/lightspeed-stack-legacy-for-migration.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: Lightspeed Core Service (LCS) | ||
| service: | ||
| host: 0.0.0.0 | ||
| port: 8080 | ||
| auth_enabled: false | ||
| workers: 1 | ||
| color_log: true | ||
| access_log: true | ||
| llama_stack: | ||
| # Library mode - embeds the stack in-process | ||
| use_as_library_client: true | ||
| # Legacy two-file shape: external run.yaml, no synthesis input | ||
| library_client_config_path: tests/e2e/configs/run-ci.yaml | ||
| user_data_collection: | ||
| feedback_enabled: true | ||
| feedback_storage: "/tmp/data/feedback" | ||
| transcripts_enabled: true | ||
| transcripts_storage: "/tmp/data/transcripts" | ||
| authentication: | ||
| module: "noop" | ||
| inference: | ||
| default_provider: openai | ||
| default_model: gpt-4o-mini |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
tests/e2e/configuration/library-mode/lightspeed-stack-legacy.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: Lightspeed Core Service (LCS) | ||
| service: | ||
| host: 0.0.0.0 | ||
| port: 8080 | ||
| auth_enabled: false | ||
| workers: 1 | ||
| color_log: true | ||
| access_log: true | ||
| llama_stack: | ||
| # Legacy two-file shape (R2 deprecation window): external run.yaml consumed | ||
| # via library_client_config_path; no unified synthesis input. Kept as a | ||
| # dedicated fixture because the standard library-mode baseline migrated to | ||
| # unified mode in LCORE-2342, which silently removed legacy boot coverage. | ||
| use_as_library_client: true | ||
| library_client_config_path: run.yaml | ||
| user_data_collection: | ||
| feedback_enabled: true | ||
| feedback_storage: "/tmp/data/feedback" | ||
| transcripts_enabled: true | ||
| transcripts_storage: "/tmp/data/transcripts" | ||
| authentication: | ||
| module: "noop" | ||
| inference: | ||
| default_provider: openai | ||
| default_model: gpt-4o-mini | ||
| rag: | ||
| byok: | ||
| stores: | ||
| - rag_id: e2e-test-docs | ||
| backend: faiss | ||
| embedding_model: sentence-transformers/all-mpnet-base-v2 | ||
| embedding_dimension: 768 | ||
| vector_db_id: ${env.FAISS_VECTOR_STORE_ID} | ||
| db_path: ${env.KV_RAG_PATH:=~/.llama/storage/rag/kv_store.db} | ||
| score_multiplier: 1.0 | ||
| retrieval: | ||
| tool: | ||
| sources: | ||
| - e2e-test-docs | ||
|
|
||
| shields: | ||
| - name: pii-redaction | ||
| provider_id: redaction | ||
| config: | ||
| rules: | ||
| - pattern: '\d+' | ||
| replacement: '[NUM]' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Unified-mode e2e configuration fixtures | ||
|
|
||
| Fixtures for the `unified-mode-*.feature` files (LCORE-2341/LCORE-2343). | ||
| Same layout as the parent directory: `library-mode/` and `server-mode/` | ||
| variants differing only in the `llama_stack` block; the harness resolves | ||
| `<dir>/<mode>/<file>` via the standard `configure_service` logic. | ||
|
|
||
| All profile-based fixtures reference `run.yaml` — the repo-root copy the CI | ||
| harness materializes from `tests/e2e/configs/run-<env>.yaml` — so they stay | ||
| provider-agnostic across the providers matrix. | ||
|
|
||
| Only bootable fixtures live here. The validation-only and synthesis-only | ||
| inputs (invalid configs, `native_override` shapes) belong to the integration | ||
| layer — `tests/configuration/unified-mode/` and | ||
| `tests/integration/test_unified_synthesis.py` — because e2e steps never run | ||
| `src/` CLIs (see `docs/testing/e2e_testing.md`, "Choosing the Test Layer"). | ||
|
|
||
| | Fixture | Purpose | | ||
| |---|---| | ||
| | `lightspeed-stack-unified-providers.yaml` | Minimal unified config driven only by top-level `inference.providers` (default baseline, R1/S5). openai-specific — used by `@openai-only` scenarios. | | ||
| | `lightspeed-stack-unified-config-only.yaml` | Unified config driven only by `llama_stack.config` (`profile: run.yaml`, R1). | | ||
| | `lightspeed-stack-unified-relative-profile.yaml` | Same shape as config-only; exists to pin R8 (relative `profile:` resolves against the config file's directory) as a distinct intent. | | ||
| | `lightspeed-stack-unified-absolute-profile.yaml` | `profile:` as a container-absolute path (differs per mode subdir). | | ||
| | `lightspeed-stack-legacy-for-migration.yaml` | Legacy half of the migration fixture pair; paired with `tests/e2e/configs/run-ci.yaml`. Deliberately free of enrichment sections so migrate→synthesize round-trips losslessly (see LCORE-3370). Input to the drift guard below; never booted. | | ||
| | `lightspeed-stack-unified-migrated.yaml` | **Committed** output of `--migrate-config` for the pair above. Booted by `unified-mode-migration.feature` (`@openai-only`: it inlines the openai run-ci.yaml). `tests/integration/test_unified_mode_cli.py::test_committed_migrated_fixture_matches_cli_output` fails when the CLI output drifts; its docstring has the regeneration command. | |
23 changes: 23 additions & 0 deletions
23
tests/e2e/configuration/unified-mode/library-mode/lightspeed-stack-legacy-for-migration.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: Lightspeed Core Service (LCS) | ||
| service: | ||
| host: 0.0.0.0 | ||
| port: 8080 | ||
| auth_enabled: false | ||
| workers: 1 | ||
| color_log: true | ||
| access_log: true | ||
| llama_stack: | ||
| # Library mode - embeds the stack in-process | ||
| use_as_library_client: true | ||
| # Legacy two-file shape: external run.yaml, no synthesis input | ||
| library_client_config_path: run.yaml | ||
| user_data_collection: | ||
| feedback_enabled: true | ||
| feedback_storage: "/tmp/data/feedback" | ||
| transcripts_enabled: true | ||
| transcripts_storage: "/tmp/data/transcripts" | ||
| authentication: | ||
| module: "noop" | ||
| inference: | ||
| default_provider: openai | ||
| default_model: gpt-4o-mini |
24 changes: 24 additions & 0 deletions
24
...2e/configuration/unified-mode/library-mode/lightspeed-stack-unified-absolute-profile.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Lightspeed Core Service (LCS) | ||
| service: | ||
| host: 0.0.0.0 | ||
| port: 8080 | ||
| auth_enabled: false | ||
|
max-svistunov marked this conversation as resolved.
|
||
| workers: 1 | ||
| color_log: true | ||
| access_log: true | ||
| llama_stack: | ||
| # Library mode - embeds the stack in-process | ||
| use_as_library_client: true | ||
| config: | ||
| # Absolute path as mounted in the library-mode container | ||
| profile: /app-root/run.yaml | ||
| user_data_collection: | ||
| feedback_enabled: true | ||
| feedback_storage: "/tmp/data/feedback" | ||
| transcripts_enabled: true | ||
| transcripts_storage: "/tmp/data/transcripts" | ||
| authentication: | ||
| module: "noop" | ||
| inference: | ||
| default_provider: openai | ||
| default_model: gpt-4o-mini | ||
24 changes: 24 additions & 0 deletions
24
tests/e2e/configuration/unified-mode/library-mode/lightspeed-stack-unified-config-only.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Lightspeed Core Service (LCS) | ||
| service: | ||
| host: 0.0.0.0 | ||
| port: 8080 | ||
| auth_enabled: false | ||
| workers: 1 | ||
| color_log: true | ||
| access_log: true | ||
| llama_stack: | ||
| # Library mode - embeds the stack in-process | ||
| use_as_library_client: true | ||
| config: | ||
| # Synthesis baseline: the CI-materialized run.yaml (provider-agnostic) | ||
| profile: run.yaml | ||
| user_data_collection: | ||
| feedback_enabled: true | ||
| feedback_storage: "/tmp/data/feedback" | ||
| transcripts_enabled: true | ||
| transcripts_storage: "/tmp/data/transcripts" | ||
| authentication: | ||
| module: "noop" | ||
| inference: | ||
| default_provider: openai | ||
| default_model: gpt-4o-mini |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add
---at the start oftests/e2e/configuration/library-mode/lightspeed-stack-legacy.yaml. The configuredyamllintreportsmissing document start "---" (document-start)at line 1. Adding the marker is the localized fix.🤖 Prompt for AI Agents