Fetching metadata from the HF Docker repository...
-
refactor(orchestrator): DRY synthesis + constants + clean imports
Addresses senior review feedback on P1 fix code quality:
Priority 1 - DRY Violation:
- Unified `_handle_timeout()` and `_force_synthesis()` into `_synthesize_fallback(iteration, reason)`
- Removed 40+ lines of duplicate code
- Single method handles timeout, no_reporter, and max_rounds scenarios
Priority 2 - Redundant Imports:
- Added `get_magentic_state` to module-level imports
- Removed duplicate imports from inside methods
Priority 3 - Magic Strings:
- Added constants: REPORTER_AGENT_ID, SEARCHER_AGENT_ID, JUDGE_AGENT_ID, HYPOTHESIZER_AGENT_ID
- Updated `_get_event_type_for_agent()` to use constants
- Updated reporter detection in run() to use constant
Also:
- Fixed test patch paths (must patch in module namespace, not source)
- Added SPEC_ARCHITECTURAL_DEBT.md documenting Phase 2 refactoring roadmap
All 318 tests pass.
-
fix(P0): Implement Accumulator Pattern to resolve Repr Bug (#117)
* docs: Add P1 bug doc for Simple Mode removal breaking Free Tier UX
SPEC-16 Unified Architecture removed Simple Mode, forcing all users
to Advanced Mode. When no API key is provided, Advanced Mode falls back
to HuggingFace Free Tier which triggers upstream agent-framework repr
bug (#2562).
Options documented:
A) Wait for upstream fix (PR #2566)
B) Restore Simple Mode for free tier
C) Current workaround in _extract_text()
* docs: Update P1 bug doc and SPEC-16 with rollback warning
CRITICAL: Simple Mode was deleted BEFORE verifying Advanced+HF worked.
Problem:
- Upstream agent-framework has repr bug (#2562)
- Advanced Mode + HuggingFace = garbage output
- Simple Mode (the working fallback) was deleted prematurely
Bug doc updates:
- Added "What Went Wrong" timeline
- Added Gradio UI confusion analysis (examples vs chat button)
- Recommendation: Restore Simple Mode as fallback
SPEC-16 updates:
- Status changed to "PARTIALLY IMPLEMENTED - ROLLBACK REQUIRED"
- Added critical warning …
-
fix: P0 Advanced Mode timeout synthesis + CodeRabbit recommendations
## P0 Bug Fix: Advanced Mode Timeout Yields No Synthesis
### Root Causes Fixed
1. **Timeout handler lie** (`advanced.py:254-261`): Now actually invokes
ReportAgent with gathered evidence instead of just emitting a
misleading message.
2. **Wrong max_rounds** (`factory.py`): Now uses `settings.advanced_max_rounds`
(5) instead of `max_iterations` (10).
3. **Missing method** (`research_memory.py`): Added `get_context_summary()`
to enable synthesis from raw evidence on timeout.
### Tests Added
- `tests/unit/orchestrators/test_advanced_timeout.py`: Verifies timeout
triggers actual synthesis and factory uses correct max_rounds.
## CodeRabbit Recommendations Implemented
### Critical Issues
1. **Type-safe tier detection** (`base.py`, `simple.py`):
- Added `SynthesizableJudge` Protocol with `@runtime_checkable`
- Replaced `hasattr(self.judge, "synthesize")` with `isinstance()`
- Enables compile-time type checking and IDE support
2. **SynthesisError with context** (`ex…