Skip to content

LCORE-2395: remove read-only mount for llama-stack config#1815

Merged
tisnik merged 3 commits into
lightspeed-core:mainfrom
are-ces:lcore-2395-enrichment-readonly-fix
Jun 1, 2026
Merged

LCORE-2395: remove read-only mount for llama-stack config#1815
tisnik merged 3 commits into
lightspeed-core:mainfrom
are-ces:lcore-2395-enrichment-readonly-fix

Conversation

@are-ces

@are-ces are-ces commented May 29, 2026

Copy link
Copy Markdown
Contributor

Description

Two Makefile fixes for make run:

  1. Remove ro from run.yaml mount — the enrichment script writes the enriched config back to run.yaml at startup, so the volume mount must be writable. The ro flag was causing enrichment to fail with a read-only filesystem error.

  2. Add make run-local target — restores the pre-LCORE-1872 behaviour as a dedicated target: starts only the lightspeed-stack service, assuming llama-stack is already running externally (e.g. via docker compose or a separate process). Useful for local development iteration without rebuilding the container image.

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

  • Assisted-by: Claude
  • Generated by: Claude Sonnet 4.6 (1M context)

Related Tickets & Documents

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

  1. Run make run — verify enrichment completes without read-only filesystem errors and llama-stack starts correctly.
  2. With llama-stack already running separately, run make run-local — verify lightspeed-stack starts without attempting to build/start any container.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Refactored application launch process to automatically initialize and start required containers before execution, reducing manual setup steps and improving user experience.
    • Modified container configuration to enable write access to system directories, enhancing application state management and runtime flexibility.

The enrichment script writes the enriched config back to run.yaml,
so the volume mount must be writable.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 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: ddd235ed-ac4f-4449-befe-5c40ef399864

📥 Commits

Reviewing files that changed from the base of the PR and between a7ba02a and 81342f3.

📒 Files selected for processing (1)
  • Makefile
📜 Recent review details
⏰ 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). (7)
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: Pyright
  • GitHub Check: build-pr
  • GitHub Check: radon
  • GitHub Check: Pylinter
🧰 Additional context used
🪛 checkmake (0.3.2)
Makefile

[warning] 21-21: Required target "all" is missing from the Makefile.

(minphony)


[warning] 21-21: Required target "clean" is missing from the Makefile.

(minphony)


[warning] 21-21: Required target "test" is missing from the Makefile.

(minphony)

🔇 Additional comments (5)
Makefile (5)

20-20: LGTM!


22-23: LGTM!


25-27: LGTM!


53-53: LGTM!


114-114: LGTM!


Walkthrough

Makefile: adds a run-stack target and changes run to start the llama-stack container then call run-stack; the start-llama-stack-container mount for $(LLAMA_STACK_CONFIG) is changed from :ro,z to :z so /opt/app-root/run.yaml is writable.

Changes

Run targets and container mount

Layer / File(s) Summary
Run targets and whitespace
Makefile
Adds .PHONY for run-stack, adds run-stack target to run uv run src/lightspeed_stack.py -c $(CONFIG), changes run to depend on start-llama-stack-container and invoke $(MAKE) run-stack, and inserts an extra blank line before run-llama-stack.
Container config mount permission
Makefile
Updates start-llama-stack-container bind mount for $(LLAMA_STACK_CONFIG) mapping to /opt/app-root/run.yaml from read-only (:ro,z) to writable (:z).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • radofuchs
  • 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 PR title clearly identifies the main change: removing the read-only mount restriction from the llama-stack config, which directly addresses the primary bug fix described in the PR objectives.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

…tration

Restores the pre-LCORE-1872 behaviour as a separate target: run-local
starts only the lightspeed-stack service, assuming llama-stack is already
running externally (e.g. via docker compose or a separate process).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@are-ces are-ces requested review from anik120 and tisnik and removed request for tisnik June 1, 2026 07:04

@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

Comment thread Makefile
--health-retries 3 \
--health-start-period 15s \
-v $(PWD)/$(LLAMA_STACK_CONFIG):/opt/app-root/run.yaml:ro,z \
-v $(PWD)/$(LLAMA_STACK_CONFIG):/opt/app-root/run.yaml:z \

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, great catch.

Comment thread Makefile Outdated
Comment on lines +111 to +113
run-local: ## Run the service locally, assuming llama-stack is already running externally
uv run src/lightspeed_stack.py -c $(CONFIG)

@anik120 anik120 Jun 1, 2026

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.

I'm a bit hesitant about putting "llama-stack is running externally" assumptions back in explicitly. The purpose of make run now is "Run lightspeed-stack service, without exposing implementation details to the user".

Having said that, I understand the need to be able to run the stack without needing to build llama-stack container image every time. I realize that can be a frustratingly time consuming activity when you're trying to iterate quickly.

What do you think about this following re-shuffle:

  1. run-local -> run-stack (rename)
  2. run uses run-stack.

ie:

run-stack: ## Run lightspeed-stack directly, without building dependent service/s 
           uv run src/ligthspeed_stack.py -c $(config) 

run: ## Run the service locally with dependent services 
	start-llama-stack-container
    @echo "Starting Lightspeed Core Stack..."
	run-stack

?

@anik120 anik120 Jun 1, 2026

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 way, someone can run once, or start-llama-stack-container once + run-stack in a loop while iterating - but the comments don't bubble up llama-stack, and both run and run-stack will be backward compatible in the long run.

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.

Yeah exactly, can be frustrating to re-build the container. SGTM, will update the PR thanks!

- run-stack: runs lightspeed-stack directly, no dependent services
- run: starts llama-stack container then delegates to run-stack

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

@anik120 anik120 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

@tisnik tisnik merged commit 4410134 into lightspeed-core:main Jun 1, 2026
20 of 31 checks passed
@are-ces are-ces deleted the lcore-2395-enrichment-readonly-fix branch June 9, 2026 08:07
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