fix: skip git requirement for conversation/chat workflows#535
Merged
buger merged 1 commit intoMar 14, 2026
Merged
Conversation
`executeChecks()` unconditionally requires a git repository, returning an error result when `isGitRepository` is false. This prevents using the SDK for chat/assistant workflows (TUI, Telegram, web SDK) in environments without git (e.g., Docker containers, Cloud Run). When an `executionContext.conversation` is present, the workflow is a chat/assistant interaction — not a code review — and doesn't need git. Skip the git check in this case and proceed with an empty repository info. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
buger
added a commit
to buger/visor
that referenced
this pull request
Mar 15, 2026
The Telegram adapter's buildConversationContext() only included the current message in the messages array, causing every message to be processed in isolation without any conversation context. This meant the LLM couldn't reference previous messages in the chat. Changes: - Add in-memory chat history cache to TelegramAdapter (per thread ID) with LRU eviction (max 500 chats), TTL (2 hours), and per-chat message limit (50 messages) - buildConversationContext() now returns the full conversation history in the messages array, matching the Slack adapter pattern - Polling runner captures bot responses from engine results and adds them to the history, so the LLM sees both user and bot messages - Inject conversation context into execution context so the engine can use it for the git-check bypass (PR probelabs#535) This brings Telegram conversation handling in line with the Slack adapter, which already maintains thread history via ThreadCache. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4 tasks
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.
Problem
StateMachineExecutionEngine.executeChecks()unconditionally requires a git repository. WhenisGitRepositoryisfalse, it immediately returns an error result with message "Not a git repository or no changes found" — even for chat/assistant workflows that have nothing to do with code review.This prevents using the Visor SDK (
runChecks()) for conversation-based workflows in environments without git, such as:node:*-slimimages)Reproduction
Fix
When an
executionContext.conversationis present, the workflow is a chat/assistant interaction — not a code review — and doesn't need git. The fix adds a single condition to skip the git error when a conversation context exists:The git analysis still runs (providing empty repository info), but execution continues to the check workflows instead of short-circuiting.
Test plan
runChecks()with a conversation context succeeds in a non-git directoryrunChecks()without a conversation context still fails in a non-git directory (existing behavior preserved)🤖 Generated with Claude Code