Conversation
… auto-selection AgentEngine._resolve_loop() was calling build_execution_loop() without passing compaction_callback or plan_execute_config. Loops created via the auto-selection path never got compaction or custom plan-execute config, even though the factory already supported them. - Add compaction_callback and plan_execute_config params to AgentEngine - Pass both through _resolve_loop() to build_execution_loop() - Wire compaction_callback in _make_default_loop() for consistency - Remove stale docstring caveat about missing config in auto-selection - Add 7 unit tests covering wiring for all loop types Closes #577 Closes #578 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move inline MagicMock import to module level in test_loop_selector.py - Use MagicMock instead of AsyncMock in sync test - Add None-default-path test for compaction_callback - Add hybrid_loop_config wiring test at AgentEngine level - Add task_id param to _make_task_with_complexity for ID consistency - Add has_compaction_callback/has_plan_execute_config/has_hybrid_loop_config to EXECUTION_ENGINE_CREATED debug log Pre-reviewed by 12 agents, 7 findings addressed Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
Walkthrough
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the configurability of the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request successfully wires compaction_callback and plan_execute_config through the AgentEngine's auto-selection and default loop paths. The changes include necessary imports, updates to __init__ parameters and assignments, and modifications to the _make_default_loop and _resolve_loop methods to pass these configurations. The removal of the stale docstring caveat is a good cleanup. Comprehensive unit tests have been added to cover the new wiring for all relevant loop types, default paths, and None defaults, ensuring the functionality works as expected. No critical, high, or medium severity issues were identified in the provided changes.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/unit/engine/test_agent_engine_auto_loop.py`:
- Around line 515-545: Move the local import of HybridLoopConfig out of the test
body to the module-level imports for consistency: remove the inline "from
synthorg.engine.hybrid_models import HybridLoopConfig" inside
test_hybrid_loop_config_wired_via_auto_selection and add the same import
alongside the other top-level imports (where PlanExecuteConfig is imported);
keep the test name test_hybrid_loop_config_wired_via_auto_selection, the
HybridLoopConfig symbol, and the rest of the test logic unchanged.
🪄 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: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: e7a7e96d-6c2b-4b91-be67-96ead75f08ee
📒 Files selected for processing (3)
src/synthorg/engine/agent_engine.pytests/unit/engine/test_agent_engine_auto_loop.pytests/unit/engine/test_loop_selector.py
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #601 +/- ##
==========================================
- Coverage 92.46% 92.45% -0.01%
==========================================
Files 551 551
Lines 27681 27686 +5
Branches 2678 2679 +1
==========================================
+ Hits 25595 25598 +3
- Misses 1634 1635 +1
- Partials 452 453 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…bit, and Gemini - Expand warning when execution_loop provided externally to include compaction_callback alongside approval_gate and stagnation_detector - Add 5 missing __init__ params to AgentEngine class docstring (parked_context_repo, checkpoint_repo, heartbeat_repo, checkpoint_config, stagnation_detector) - Add externally-provided-loop caveat to compaction_callback docstring - Add HybridLoop branch to make_loop_with_callback in checkpoint/resume so checkpoint callback is no longer silently dropped for hybrid loops - Update design spec step 8 to document callback/config wiring through auto-selection, mention plan_execute_config/hybrid_loop_config/ compaction_callback as AgentEngine parameters - Add Hybrid to README execution loops list - Move HybridLoopConfig import to module level in test file (CodeRabbit) - Remove empty lines left after inline import removal in test_loop_selector - Add docstrings to 2 new build_execution_loop test methods - Add agent_id/task_id assertions to resume path test - Add test for plan_execute_config=None default fallback via auto-selection - Add test for both compaction_callback and plan_execute_config wired simultaneously - Extract _make_plan_exec_responses/_make_hybrid_responses test helpers to reduce response-building duplication across budget-aware tests - Create GitHub issues #614 and #615 for deferred security findings Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mypy strict requires generic list type parameters. Import CompletionResponse and annotate _make_plan_exec_responses and _make_hybrid_responses return types as list[CompletionResponse]. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🤖 I have created a release *beep* *boop* --- ## [0.3.8](v0.3.7...v0.3.8) (2026-03-19) ### Features * dynamic settings UI with auto-discovery and basic/advanced toggle ([#600](#600)) ([11b32b7](11b32b7)) ### Bug Fixes * **ci:** remove dst: . from GoReleaser archive config ([#598](#598)) ([c8bf862](c8bf862)) * **engine:** wire compaction_callback and plan_execute_config through auto-selection ([#601](#601)) ([795327f](795327f)) * harden setup wizard completion and status checks ([#616](#616)) ([d99d7b7](d99d7b7)) ### Maintenance * add /codebase-audit skill for deep parallel codebase auditing ([#613](#613)) ([db02320](db02320)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Summary
compaction_callbackthroughAgentEngine._resolve_loop()and_make_default_loop()so auto-selected and default loops receive context compactionplan_execute_configthroughAgentEngine._resolve_loop()so auto-selectedPlanExecuteLoopinstances receive custom configAgentEngine.__init__parameters with proper type imports and docstringshas_compaction_callback,has_plan_execute_config,has_hybrid_loop_configtoEXECUTION_ENGINE_CREATEDdebug logCloses #577
Closes #578
Test plan
pytest tests/ -n auto --cov=synthorg --cov-fail-under=80)Review coverage
Pre-reviewed by 12 agents: docs-consistency, code-reviewer, python-reviewer, pr-test-analyzer, conventions-enforcer, logging-audit, resilience-audit, test-quality-reviewer, async-concurrency-reviewer, issue-resolution-verifier, comment-analyzer, security-reviewer. 7 findings addressed, 1 deferred (pre-existing 800-line file limit on agent_engine.py).
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Tests