Repository navigation
feat: extract local runtime provider - #453
Conversation
📝 WalkthroughWalkthroughThis PR refactors local daemon runtime preparation from inline ChangesLocal Daemon Runtime Provider Extraction
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@coding-agent/src/coding_agent/executors/local_daemon.py`:
- Around line 160-163: The adapter returned by adapter_factory is being cached
to session.runtime_adapter without being initialized; call
adapter.initialize(...) (or the adapter's appropriate init method) immediately
after creating adapter = self.adapter_factory(pipeline, ctx) and before
assigning session.runtime_adapter (and before setting
session.runtime_pipeline/session.runtime_ctx) so the cached PipelineAdapter is
fully initialized like the direct builders used in SessionManager.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: bbe551a6-bf17-4501-b7cd-e6aa8df5119b
📒 Files selected for processing (6)
coding-agent/.opencode/prompts/tasks/local-daemon-pr30-local-runtime-provider.mdcoding-agent/docs/adr/0058-local-daemon-control-plane-executor-architecture.mdcoding-agent/src/coding_agent/executors/__init__.pycoding-agent/src/coding_agent/executors/local_daemon.pycoding-agent/src/coding_agent/server/session_manager.pycoding-agent/tests/coding_agent/test_local_daemon_executor.py
|
Retroactive review evidence: CodeRabbit completed this PR review with one actionable comment. The comment was verified against pre-refactor behavior and answered as intentionally unchanged for this behavior-preserving slice. Local fallback reviewer Darwin also inspected the PR for P1/P2 correctness/scope issues. Result: no P1/P2 findings; no fixes were required. |
Summary
LocalDaemonSessionRuntimeProviderto own normal local daemon runtime preparationSessionManager._prepare_local_daemon_runtime()to the provider while preserving the public run pathTests
uv run pytest tests/coding_agent/test_local_daemon_executor.py -vuv run pytest tests/ui/test_session_manager_runtime.py -k "local_daemon_executor or coordinator_integration or default_run_target_workspace or rebuilds_live_runtime_when_default_run_target_changes" -vuv run ruff check src/coding_agent/executors src/coding_agent/server/session_manager.py tests/ui/test_session_manager_runtime.py tests/coding_agent/test_local_daemon_executor.pyuv run ruff format --check src/coding_agent/executors src/coding_agent/server/session_manager.py tests/coding_agent/test_local_daemon_executor.pygit diff --checkSummary by CodeRabbit
Refactor
Tests
Documentation