refactor(llmrails): extract rail checks (6/9)#2128
Draft
Pouyanpi wants to merge 1 commit into
Draft
Conversation
This was referenced Jul 2, 2026
This was referenced Jul 2, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 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
checkandcheck_asyncplanning and result mapping into checks helpers, completing the thinLLMRailscompatibility shell.Why
Rail checking gains a clear owner while the public class remains responsible for compatibility and delegation.
What Changed
check_asyncto the checks package.Review Guidance
Use the LLMRails decomposition review matrix to validate input, output, retrieval, and tool rail scenarios against the recorded #2122 baseline.
Focus on public check semantics and the final
LLMRailscompatibility surface. This extraction intentionally does not add a Colang 2.x check implementation. Contract naming and final package ownership are addressed in parts 7-8.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 6 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