| 2559 | |
| 2560 | |
| 2561 | def test_reading_report_creation_passes_response_language_to_heuristics(tmp_path, monkeypatch: pytest.MonkeyPatch) -> None: |
| 2562 | captured: dict[str, object] = {} |
| 2563 | paper = {"id": 1, "title": "English Creation Paper", "abstract": "", "authors": ["Alice"]} |
| 2564 | |
| 2565 | monkeypatch.setattr(agents.reading_agent, "get_profile", lambda _user_id: {"core_directions": {}}) |
| 2566 | monkeypatch.setattr(agents.reading_agent, "ensure_profile_schema", lambda profile: profile) |
| 2567 | monkeypatch.setattr(agents.reading_agent, "get_existing_reading_reports_for_papers", lambda _user_id, _paper_ids: {}) |
| 2568 | monkeypatch.setattr(agents.reading_agent, "_enrich_paper_for_reading_report_compat", lambda item, user_id=None: (item, None, None)) |
| 2569 | monkeypatch.setattr(agents.reading_agent, "_synthesize_report_with_llm", lambda *_args, **_kwargs: {}) |
| 2570 | monkeypatch.setattr(agents.reading_agent, "_save_reading_report_markdown", lambda **_kwargs: str(tmp_path / "report.md")) |
| 2571 | monkeypatch.setattr(agents.reading_agent, "ingest_reading_report_to_wiki", lambda **_kwargs: {}) |
| 2572 | monkeypatch.setattr(agents.reading_agent, "log_behavior", lambda **_kwargs: None) |
| 2573 | monkeypatch.setattr(agents.reading_agent, "_annotate_tracking_links", lambda _docs, _user_id: None) |