-
Notifications
You must be signed in to change notification settings - Fork 55
LCORE-298: updated configuration diagram #565
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
LCORE-298: updated configuration diagram #565
Conversation
WalkthroughThe configuration model and docs were updated to introduce conversation cache support (memory/sqlite/postgres), a custom profile facility with prompts loading, and an in-memory cache configuration. The UML diagram was refreshed to reflect new classes and fields added to Configuration and Customization. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant App
participant Configuration
participant ConversationCache
participant CacheBackend as Cache Backend
participant Customization
participant CustomProfile
App->>Configuration: load()
alt conversation_cache present
Configuration->>ConversationCache: check_cache_configuration()
ConversationCache-->>Configuration: validated type (memory/sqlite/postgres)
opt type = memory
Configuration->>CacheBackend: init InMemory(max_entries)
end
opt type = sqlite/postgres
Configuration->>CacheBackend: init SQL(ds config)
end
else no conversation_cache
Note over Configuration: Proceed without cache
end
alt custom_profile present
Configuration->>Customization: get custom_profile
Customization->>CustomProfile: get_prompts()
CustomProfile-->>Customization: prompts dict
else no custom_profile
Note over Customization: Use defaults
end
Configuration-->>App: ready(configured services)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
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. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (5)
docs/config.puml (5)
32-32: Add a composition edge for conversation_cache for consistency.Configuration embeds ConversationCache but there’s no composition arrow like the ones for service and user_data_collection.
Apply this diff near the relations section:
+src.models.config.ConversationCache --* src.models.config.Configuration : conversation_cache
46-52: Document one-of constraint and add backend composition edges.Make it explicit that exactly one backend is configured and show the owned parts.
Apply:
class "ConversationCache" as src.models.config.ConversationCache { memory : Optional[InMemoryCacheConfig] postgres : Optional[PostgreSQLDatabaseConfiguration] sqlite : Optional[SQLiteDatabaseConfiguration] type : Literal['memory', 'sqlite', 'postgres'] | None check_cache_configuration() -> Self } +note right of src.models.config.ConversationCache +Exactly one backend must be configured (memory | sqlite | postgres). +`type` must match the configured backend. +end noteAnd in the relations block:
+src.models.config.InMemoryCacheConfig --* src.models.config.ConversationCache : memory +src.models.config.PostgreSQLDatabaseConfiguration --* src.models.config.ConversationCache : postgres +src.models.config.SQLiteDatabaseConfiguration --* src.models.config.ConversationCache : sqlite
53-57: Missing inheritance arrow for CustomProfile (verify the base class).Per our config conventions, config models extend ConfigurationBase. If CustomProfile does, add the inheritance arrow; if it’s a plain data model (BaseModel), leave as-is.
Proposed relation (only if it extends ConfigurationBase):
+src.models.config.CustomProfile --|> src.models.config.ConfigurationBase
59-62: Clarify overlap between custom_profile.path and profile_path.Two fields appear to represent the profile path. If both must exist for backward compatibility, add a note or mark profile_path as legacy; otherwise, remove one to avoid ambiguity.
Optional note:
+note right of src.models.config.Customization +`profile_path` is legacy; prefer `custom_profile.path`. +end note
73-75: Consider making base type explicit for Annotated.To reduce ambiguity, show the base type: Annotated[int, …]. If you keep “Annotated” elsewhere (e.g., port, workers), you can defer for consistency.
Possible tweak:
-class "InMemoryCacheConfig" as src.models.config.InMemoryCacheConfig { - max_entries : Annotated -} +class "InMemoryCacheConfig" as src.models.config.InMemoryCacheConfig { + max_entries : Annotated[int] +}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
docs/config.pngis excluded by!**/*.pngdocs/config.svgis excluded by!**/*.svg
📒 Files selected for processing (1)
docs/config.puml(5 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-09-18T16:46:33.353Z
Learnt from: CR
PR: lightspeed-core/lightspeed-stack#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:46:33.353Z
Learning: Applies to src/{models/config.py,configuration.py} : All configuration uses Pydantic models extending ConfigurationBase
Applied to files:
docs/config.puml
📚 Learning: 2025-09-18T16:46:33.353Z
Learnt from: CR
PR: lightspeed-core/lightspeed-stack#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:46:33.353Z
Learning: Applies to src/models/**/*.py : Pydantic models: use BaseModel for data models and extend ConfigurationBase for configuration
Applied to files:
docs/config.puml
📚 Learning: 2025-09-18T16:46:33.353Z
Learnt from: CR
PR: lightspeed-core/lightspeed-stack#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:46:33.353Z
Learning: Applies to src/{models/config.py,configuration.py} : Configuration base models must set model_config with extra="forbid" to reject unknown fields
Applied to files:
docs/config.puml
⏰ 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). (2)
- GitHub Check: build-pr
- GitHub Check: e2e_tests
🔇 Additional comments (3)
docs/config.puml (3)
160-160: LGTM: ConversationCache inherits ConfigurationBase.
163-163: LGTM: InMemoryCacheConfig inherits ConfigurationBase.
175-175: LGTM: Composition link from Customization to CustomProfile is correct.
Description
LCORE-298: updated configuration diagram
Type of change
Related Tickets & Documents
Summary by CodeRabbit
New Features
Documentation