feat: auto-verify, ToolInputDelta preview, fallback provider#40
Merged
kienbui1995 merged 1 commit intomainfrom Apr 12, 2026
Merged
feat: auto-verify, ToolInputDelta preview, fallback provider#40kienbui1995 merged 1 commit intomainfrom
kienbui1995 merged 1 commit intomainfrom
Conversation
1. Auto-verify: syntax check py/json files after write tools - Errors injected into context for self-healing - Runs before auto_test_cmd (lightweight, always on) 2. ToolInputDelta: forward to TUI for real-time write preview - Was swallowed in runtime, now forwarded via on_event - TUI already handles it (shows streaming edit content) 3. FallbackProvider: wrap primary+fallback providers - Config: fallback_provider + fallback_model - Wired in main.rs provider creation - Struct ready for full stream-level failover 192 tests pass.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe pull request introduces a fallback provider infrastructure in the CLI that wraps a primary provider with an optional fallback, along with an auto-verification step in the runtime that runs syntax checks on Python and JSON files after write operations. Event handling is updated to forward Changes
Sequence DiagramsequenceDiagram
participant Provider as LLM Provider
participant Runtime as Runtime
participant Tools as Tool Executor
participant Shell as Shell/Syntax Checker
participant Events as Event System
Provider->>Runtime: Stream write tool response
Runtime->>Tools: Execute write_file/edit_file/batch_edit/apply_patch
Tools->>Tools: Collect target file paths from tool_use blocks
Runtime->>Shell: Run syntax check (ast.parse for .py, json.load for .json)
alt Syntax Valid
Shell-->>Runtime: Exit code 0
else Syntax Error
Shell-->>Runtime: Exit code non-zero + stderr
Runtime->>Events: Push user message with error details
Runtime->>Events: Emit ToolOutputDelta warning
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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.
3 agentic gaps closed:
fallback_provider/fallback_modelnow wired192 tests pass.
Summary by CodeRabbit