You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds remote scratchpad execution support via a MindsDB-provisioned AWS Lightsail instance, with dynamic runtime selection, a new /remote provisioning command, and aiohttp as a required dependency.
anton/core/backends/remote.py: New RemoteScratchpadRuntime implementing ScratchpadRuntime ABC; delegates all scratchpad ops (start, reset, execute, install, cancel, cleanup) over HTTP/SSE; includes Cloudflare-to-direct-IP resolution with caching; exposes remote_scratchpad_runtime_factory
anton/chat.py: New _handle_remote async function handles API key acquisition, GET status check, POST provisioning, and up to 3-minute polling loop with /resolve and /health validation; persists URL to secrets and env; /remote command added to chat loop
anton/chat_session.py: New get_runtime_factory dynamically selects remote or local runtime factory; wired into ChatSessionConfig via rebuild_session
anton/core/settings.py: New optional remote_scratchpad_url field in CoreSettings from ANTON_REMOTE_SCRATCHPAD_URL
anton/chat_ui.py: _print_done_line labels elapsed time as 'Remote work' when remote URL env var is set
anton/commands/ui.py: /remote help entry added to print_slash_help under 'Chat Tools'
pyproject.toml / uv.lock: aiohttp>=3.9 and dill==0.3.8 added as core dependencies with all transitive packages pinned
Confidence Score: 3/5 - Review Recommended
Likely safe but review recommended — this PR introduces a substantial new RemoteScratchpadRuntime in anton/core/backends/remote.py that delegates scratchpad operations over HTTP/SSE to a MindsDB-provisioned AWS Lightsail instance, which is a meaningful surface area addition that warrants human review even in the absence of automated findings. The Cloudflare-to-direct-IP resolution with caching, the new /remote provisioning command, and the addition of aiohttp as a required dependency all represent non-trivial infrastructure changes that could have runtime, security, or reliability implications not captured by static analysis alone. Only 6 of 8 changed files were reviewed by automated tooling, leaving two files unexamined.
Key Findings:
The RemoteScratchpadRuntime in remote.py communicates over HTTP/SSE with a remote instance, introducing network-dependent behavior (timeouts, retries, partial SSE reads) that is difficult to validate without integration tests — failure modes here could silently corrupt scratchpad state.
Cloudflare-to-direct-IP resolution with caching in remote.py is a bespoke DNS/routing mechanism; if the cache is not invalidated correctly or if IP rotation occurs on the Lightsail side, requests could be routed to stale or incorrect endpoints without obvious error surfacing.
Adding aiohttp as a hard dependency (rather than optional) increases the package's install footprint and async event-loop assumptions; callers using synchronous runtimes may encounter unexpected loop conflicts if not properly isolated.
Two of the eight changed files were not covered by the automated review, meaning portions of the provisioning logic or command routing may not have been assessed for correctness or security.
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
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.
No description provided.