refactor(llmrails): extract runtime conversation flow (3/9)#2125
Draft
Pouyanpi wants to merge 1 commit into
Draft
refactor(llmrails): extract runtime conversation flow (3/9)#2125Pouyanpi wants to merge 1 commit into
Pouyanpi wants to merge 1 commit into
Conversation
This was referenced Jul 2, 2026
11 tasks
This was referenced Jul 2, 2026
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Moves message-to-event conversion and Colang event-processing wrappers out of
LLMRails.Why
Conversation conversion and Colang turn execution become independently owned and testable.
What Changed
LLMRailsmethods.Review Guidance
Use the LLMRails decomposition review matrix to validate the conversation, event, state, concurrency, and Colang-history scenarios against the recorded #2122 baseline.
Review event conversion, history-cache semantics, semaphore handling, and delegation fidelity. The temporary
rails.llm.runtimepackage name is intentionally replaced byrails.llm.colang_turnsin part 8 to avoid colliding conceptually with Colang runtime packages.This nine-part stack turns
LLMRailsinto a public compatibility shell while moving owned behavior into focused modules. Review each PR only against its parent. Parts 2-6 intentionally stage behavior-preserving extraction; part 7 consolidates shared type contracts and logger naming; part 8 establishes the final package ownership; part 9 contains the explicit semantic follow-ups.For parts 2-6, please distinguish stack-local correctness or compatibility problems from naming and placement concerns already resolved in parts 7-8. If an intermediate name or location is correct and mergeable at that point, prefer reviewing its final form in the resolving PR instead of requesting duplicate churn. Public API changes, behavior changes, import cycles, or an independently broken intermediate branch remain in scope wherever they appear. Much of the apparent added LOC is moved code plus focused tests; the corresponding implementation is removed or delegated from
llmrails.pyin the same PR.Stack Position
Part 3 of 9.
restack/llmrails-01-public-contract-testsdeveloprestack/llmrails-02-startuprestack/llmrails-01-public-contract-testsrestack/llmrails-03-runtime-conversationrestack/llmrails-02-startuprestack/llmrails-04-generationrestack/llmrails-03-runtime-conversationrestack/llmrails-05-streamingrestack/llmrails-04-generationrestack/llmrails-06-checks-finalrestack/llmrails-05-streamingrestack/llmrails-07-consistencyrestack/llmrails-06-checks-finalrestack/llmrails-08-boundary-ownershiprestack/llmrails-07-consistencyrestack/llmrails-09-followupsrestack/llmrails-08-boundary-ownershipVerification
AI Assistance
Checklist