qwen-sci 0.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qwen_sci-0.2.2.dist-info/METADATA +492 -0
- qwen_sci-0.2.2.dist-info/RECORD +549 -0
- qwen_sci-0.2.2.dist-info/WHEEL +4 -0
- qwen_sci-0.2.2.dist-info/entry_points.txt +6 -0
- qwen_sci-0.2.2.dist-info/licenses/LICENSE +21 -0
- src/1.txt +1 -0
- src/__init__.py +1 -0
- src/__main__.py +5 -0
- src/agents/__init__.py +1 -0
- src/agents/experiment_design_agent/__init__.py +268 -0
- src/agents/experiment_design_agent/artifacts.py +747 -0
- src/agents/experiment_design_agent/cache.py +319 -0
- src/agents/experiment_design_agent/completeness.py +130 -0
- src/agents/experiment_design_agent/contracts.py +771 -0
- src/agents/experiment_design_agent/counterexample_analyzer.py +187 -0
- src/agents/experiment_design_agent/design_evidence_paper_screener.py +470 -0
- src/agents/experiment_design_agent/discipline_catalog.py +178 -0
- src/agents/experiment_design_agent/evidence_cards.py +338 -0
- src/agents/experiment_design_agent/evidence_planner.py +452 -0
- src/agents/experiment_design_agent/formal_reasoning_planner.py +884 -0
- src/agents/experiment_design_agent/fulltext_acquisition.py +863 -0
- src/agents/experiment_design_agent/idea_adapter.py +100 -0
- src/agents/experiment_design_agent/idea_intake.py +87 -0
- src/agents/experiment_design_agent/llm_json.py +328 -0
- src/agents/experiment_design_agent/orchestrator.py +1220 -0
- src/agents/experiment_design_agent/reasoning_context.py +183 -0
- src/agents/experiment_design_agent/reasoning_validation.py +546 -0
- src/agents/experiment_design_agent/run.py +481 -0
- src/agents/experiment_design_agent/run_logging.py +292 -0
- src/agents/experiment_design_agent/scope_gate.py +198 -0
- src/agents/experiment_design_agent/study_type_composer.py +1360 -0
- src/agents/experiment_design_agent/survey_evidence.py +1381 -0
- src/agents/experiment_design_agent/template_router.py +195 -0
- src/agents/experiment_design_agent/variable_claim_extractor.py +93 -0
- src/agents/idea_agent/__init__.py +1 -0
- src/agents/idea_agent/agent/__init__.py +6 -0
- src/agents/idea_agent/agent/artifacts.py +308 -0
- src/agents/idea_agent/agent/base.py +122 -0
- src/agents/idea_agent/agent/ligagent.py +488 -0
- src/agents/idea_agent/agent/mcts.py +2060 -0
- src/agents/idea_agent/agent/prompts/__init__.py +48 -0
- src/agents/idea_agent/agent/prompts/advanced_analysis.py +235 -0
- src/agents/idea_agent/agent/prompts/algorithm_alignment.py +55 -0
- src/agents/idea_agent/agent/prompts/algorithm_structuring.py +48 -0
- src/agents/idea_agent/agent/prompts/component_extraction.py +62 -0
- src/agents/idea_agent/agent/prompts/component_novelty_evaluation.py +54 -0
- src/agents/idea_agent/agent/prompts/experiment_findings_extraction.py +39 -0
- src/agents/idea_agent/agent/prompts/idea_fusion.py +295 -0
- src/agents/idea_agent/agent/prompts/idea_introduction.py +30 -0
- src/agents/idea_agent/agent/prompts/idea_result_alignment.py +39 -0
- src/agents/idea_agent/agent/prompts/input_interpreter.py +52 -0
- src/agents/idea_agent/agent/prompts/keynote_ops.py +78 -0
- src/agents/idea_agent/agent/prompts/mcts_evaluation.py +235 -0
- src/agents/idea_agent/agent/prompts/mcts_generation.py +140 -0
- src/agents/idea_agent/agent/prompts/mechanism_commit_query.py +99 -0
- src/agents/idea_agent/agent/prompts/memory_selection.py +0 -0
- src/agents/idea_agent/agent/prompts/prompt_modes.py +16 -0
- src/agents/idea_agent/agent/prompts/rag_query.py +34 -0
- src/agents/idea_agent/agent/prompts/re_analysis_replan.py +48 -0
- src/agents/idea_agent/agent/prompts/reference_grounding.py +34 -0
- src/agents/idea_agent/agent/prompts/root_domain_classification.py +32 -0
- src/agents/idea_agent/agent/prompts/scientific_debate.py +88 -0
- src/agents/idea_agent/agent/prompts/scientific_materialization.py +45 -0
- src/agents/idea_agent/agent/prompts/skill_instantiation.py +193 -0
- src/agents/idea_agent/agent/prompts/theory_transfer_query.py +93 -0
- src/agents/idea_agent/agent/prompts/topic_background.py +15 -0
- src/agents/idea_agent/agent/skills/DEFAULT_SKILL_TEMPLATES.json +263 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/alternative-path-contrast/SKILL.md +40 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/alternative-path-contrast/references/contrast_patterns.md +22 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/feedback-closed-loop/SKILL.md +40 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/feedback-closed-loop/references/mechanism_cards.md +24 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/hierarchical-decomposition/SKILL.md +39 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/hierarchical-decomposition/references/hierarchy_patterns.md +22 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/mechanism-commit-innovation/SKILL.md +39 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/mechanism-commit-innovation/references/mechanism_commit_patterns.md +24 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/multi-scale-coordinator/SKILL.md +39 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/multi-scale-coordinator/references/coordination_patterns.md +22 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/speculative-execution-with-repair/SKILL.md +41 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/speculative-execution-with-repair/references/speculation_patterns.md +22 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/surgical-modularity/SKILL.md +39 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/surgical-modularity/references/modularity_patterns.md +22 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/theory-transfer-injection/SKILL.md +40 -0
- src/agents/idea_agent/agent/skills/edit_operator_skills/theory-transfer-injection/references/transfer_patterns.md +24 -0
- src/agents/idea_agent/example/idea_result.json +900 -0
- src/agents/idea_agent/run.py +276 -0
- src/agents/idea_agent/tests/test_advanced_analysis_contract.py +90 -0
- src/agents/idea_agent/tests/test_gap_hypothesis_bridge.py +166 -0
- src/agents/idea_agent/tests/test_idea_debate.py +480 -0
- src/agents/idea_agent/tests/test_idea_result_v5.py +99 -0
- src/agents/idea_agent/tests/test_idea_synthesis.py +92 -0
- src/agents/idea_agent/tests/test_mature_idea_sources.py +27 -0
- src/agents/idea_agent/tests/test_multimodal_idea_integration.py +386 -0
- src/agents/idea_agent/tests/test_profile_materialization_and_scoring.py +219 -0
- src/agents/idea_agent/tests/test_profile_native_skill_rendering.py +122 -0
- src/agents/idea_agent/tests/test_result_persistence.py +183 -0
- src/agents/idea_agent/tests/test_scientific_intervention_profiles.py +241 -0
- src/agents/idea_agent/tests/test_scientific_rubric_and_prompts.py +559 -0
- src/agents/idea_agent/tests/test_strict_json_object_responses.py +48 -0
- src/agents/idea_agent/utils/core/__init__.py +1 -0
- src/agents/idea_agent/utils/core/ablation_inputs.py +60 -0
- src/agents/idea_agent/utils/core/chat_errors.py +95 -0
- src/agents/idea_agent/utils/core/chat_router.py +130 -0
- src/agents/idea_agent/utils/core/chat_transport.py +188 -0
- src/agents/idea_agent/utils/core/config_loader.py +166 -0
- src/agents/idea_agent/utils/core/json_utils.py +28 -0
- src/agents/idea_agent/utils/core/logger.py +287 -0
- src/agents/idea_agent/utils/core/progress.py +58 -0
- src/agents/idea_agent/utils/core/response_parsing.py +57 -0
- src/agents/idea_agent/utils/core/run_inputs.py +198 -0
- src/agents/idea_agent/utils/mcts/__init__.py +1 -0
- src/agents/idea_agent/utils/mcts/component_novelty.py +342 -0
- src/agents/idea_agent/utils/mcts/defect_registry.py +302 -0
- src/agents/idea_agent/utils/mcts/idea_routes.py +61 -0
- src/agents/idea_agent/utils/mcts/idea_taste_presets.py +312 -0
- src/agents/idea_agent/utils/mcts/mcts_helpers.py +738 -0
- src/agents/idea_agent/utils/mcts/mcts_runtime.py +3000 -0
- src/agents/idea_agent/utils/mcts/scientific_intervention_ontology.py +1561 -0
- src/agents/idea_agent/utils/mcts/scientific_rubric.py +211 -0
- src/agents/idea_agent/utils/mcts/skill_parsing.py +92 -0
- src/agents/idea_agent/utils/papers/__init__.py +1 -0
- src/agents/idea_agent/utils/papers/paper_graph_vector_store.py +499 -0
- src/agents/idea_agent/utils/papers/paper_repository.py +372 -0
- src/agents/idea_agent/utils/prompting/__init__.py +1 -0
- src/agents/idea_agent/utils/prompting/prompt_views.py +637 -0
- src/agents/idea_agent/utils/workflow/__init__.py +1 -0
- src/agents/idea_agent/utils/workflow/advanced_analysis_contract.py +244 -0
- src/agents/idea_agent/utils/workflow/gap_hypothesis_bridge.py +461 -0
- src/agents/idea_agent/utils/workflow/idea_contract.py +426 -0
- src/agents/idea_agent/utils/workflow/idea_debate.py +1238 -0
- src/agents/idea_agent/utils/workflow/idea_diversity.py +163 -0
- src/agents/idea_agent/utils/workflow/idea_fusion.py +889 -0
- src/agents/idea_agent/utils/workflow/idea_helpers.py +478 -0
- src/agents/idea_agent/utils/workflow/idea_portfolio.py +422 -0
- src/agents/idea_agent/utils/workflow/idea_synthesis.py +482 -0
- src/agents/idea_agent/utils/workflow/ligagent_flow.py +581 -0
- src/agents/idea_agent/utils/workflow/ligagent_handlers.py +1836 -0
- src/agents/idea_agent/utils/workflow/ligagent_helpers.py +1331 -0
- src/agents/idea_agent/utils/workflow/ligagent_utils.py +322 -0
- src/agents/idea_agent/utils/workflow/mature_idea_sources.py +648 -0
- src/agents/idea_agent/utils/workflow/multimodal_data_anchoring.py +578 -0
- src/agents/idea_agent/utils/workflow/result_persistence.py +774 -0
- src/agents/idea_agent/utils/workflow/stage_contract.py +76 -0
- src/agents/idea_agent/utils/workflow/workflow_runtime.py +288 -0
- src/agents/research_plan_author/__init__.py +50 -0
- src/agents/research_plan_author/artifacts.py +270 -0
- src/agents/research_plan_author/authoring_blueprint.py +1246 -0
- src/agents/research_plan_author/bibtex_renderer.py +252 -0
- src/agents/research_plan_author/contract_repair.py +131 -0
- src/agents/research_plan_author/contracts.py +745 -0
- src/agents/research_plan_author/cross_section_editor.py +232 -0
- src/agents/research_plan_author/document_quality.py +987 -0
- src/agents/research_plan_author/idea_evolution.py +223 -0
- src/agents/research_plan_author/input_loader.py +76 -0
- src/agents/research_plan_author/latex_compiler.py +260 -0
- src/agents/research_plan_author/latex_safety.py +159 -0
- src/agents/research_plan_author/llm_json.py +74 -0
- src/agents/research_plan_author/markdown_renderer.py +275 -0
- src/agents/research_plan_author/pdf_validator.py +149 -0
- src/agents/research_plan_author/render.py +166 -0
- src/agents/research_plan_author/render_artifacts.py +187 -0
- src/agents/research_plan_author/run.py +765 -0
- src/agents/research_plan_author/run_logging.py +209 -0
- src/agents/research_plan_author/section_cache.py +184 -0
- src/agents/research_plan_author/section_composer.py +1764 -0
- src/agents/research_plan_author/section_router.py +209 -0
- src/agents/research_plan_author/semantic_validator.py +254 -0
- src/agents/research_plan_author/source_bundle.py +46 -0
- src/agents/research_plan_author/source_registry.py +208 -0
- src/agents/research_plan_author/survey_source_loader.py +137 -0
- src/agents/research_plan_author/template_adapter.py +173 -0
- src/agents/research_plan_author/template_profile.py +204 -0
- src/agents/research_plan_author/tex_renderer.py +496 -0
- src/agents/research_plan_author/theory_presentation.py +134 -0
- src/agents/research_plan_author/theory_spine.py +703 -0
- src/agents/survey_agent/Dockerfile +54 -0
- src/agents/survey_agent/README.md +350 -0
- src/agents/survey_agent/config/deep_survey.yaml +217 -0
- src/agents/survey_agent/config/deep_survey_batch.yaml +176 -0
- src/agents/survey_agent/config/deep_survey_fast.yaml +183 -0
- src/agents/survey_agent/config/evaluate_baseline.yaml +197 -0
- src/agents/survey_agent/config/outcomeRAG.yaml +159 -0
- src/agents/survey_agent/env_report.md +348 -0
- src/agents/survey_agent/modules/__init__.py +0 -0
- src/agents/survey_agent/modules/code_collector.py +2194 -0
- src/agents/survey_agent/modules/code_report_generator.py +1282 -0
- src/agents/survey_agent/modules/data_manager.py +1713 -0
- src/agents/survey_agent/modules/database.py +167 -0
- src/agents/survey_agent/modules/fulltext_download_cache.py +462 -0
- src/agents/survey_agent/modules/fulltext_http.py +134 -0
- src/agents/survey_agent/modules/fulltext_resolution.py +749 -0
- src/agents/survey_agent/modules/judge.py +434 -0
- src/agents/survey_agent/modules/outcome_RAG.py +236 -0
- src/agents/survey_agent/modules/paper_graph_retriever.py +1075 -0
- src/agents/survey_agent/modules/pe.py +1729 -0
- src/agents/survey_agent/modules/pseudo_creator.py +782 -0
- src/agents/survey_agent/modules/pseudo_reviser.py +537 -0
- src/agents/survey_agent/modules/refine_agent.py +1952 -0
- src/agents/survey_agent/modules/survey_generator.py +5691 -0
- src/agents/survey_agent/modules/survey_visualizer.py +1817 -0
- src/agents/survey_agent/modules/visual_prompts.py +327 -0
- src/agents/survey_agent/modules/work_analyzer.py +2750 -0
- src/agents/survey_agent/modules/work_collector.py +5649 -0
- src/agents/survey_agent/scripts/baseline_evaluation.py +411 -0
- src/agents/survey_agent/scripts/run_deep_survey.py +224 -0
- src/agents/survey_agent/scripts/run_deep_survey_adapter.py +407 -0
- src/agents/survey_agent/scripts/run_deep_survey_adapter_with_input.py +409 -0
- src/agents/survey_agent/scripts/run_deep_survey_batch.py +228 -0
- src/agents/survey_agent/scripts/run_deep_survey_batch_arg.py +243 -0
- src/agents/survey_agent/scripts/run_deep_survey_batch_settings.py +218 -0
- src/agents/survey_agent/scripts/run_keynotes_gen.py +128 -0
- src/agents/survey_agent/scripts/run_work_clusters.py +140 -0
- src/agents/survey_agent/utils/__init__.py +0 -0
- src/agents/survey_agent/utils/ablation_utils.py +317 -0
- src/agents/survey_agent/utils/api_call.py +2518 -0
- src/agents/survey_agent/utils/chat_utils.py +82 -0
- src/agents/survey_agent/utils/config_utils.py +70 -0
- src/agents/survey_agent/utils/convert_to_md.py +29 -0
- src/agents/survey_agent/utils/err_info.py +24 -0
- src/agents/survey_agent/utils/file_utils.py +176 -0
- src/agents/survey_agent/utils/gpu_utils.py +145 -0
- src/agents/survey_agent/utils/graph_visualizer.py +279 -0
- src/agents/survey_agent/utils/html_utils.py +181 -0
- src/agents/survey_agent/utils/latex_generator_intra_cluster.py +529 -0
- src/agents/survey_agent/utils/latex_generator_relation_table.py +193 -0
- src/agents/survey_agent/utils/mineru_section_packer.py +334 -0
- src/agents/survey_agent/utils/mineru_utils.py +396 -0
- src/agents/survey_agent/utils/paper.py +144 -0
- src/agents/survey_agent/utils/read_yaml.py +15 -0
- src/agents/survey_agent/utils/repo_utils.py +167 -0
- src/agents/survey_agent/utils/rich_logger.py +77 -0
- src/agents/survey_agent/utils/step2v2.py +874 -0
- src/agents/survey_agent/utils/step2v2_extractor.py +856 -0
- src/agents/survey_agent/utils/topic_survey_storage.py +309 -0
- src/agents/survey_agent/utils/utils.py +118 -0
- src/agents/survey_agent/utils/work.py +2 -0
- src/cli.py +1611 -0
- src/config/__init__.py +213 -0
- src/config/default.yaml +1122 -0
- src/harness/LICENSE +21 -0
- src/harness/VENDORED.md +14 -0
- src/harness/src/__init__.py +0 -0
- src/harness/src/openharness/__init__.py +0 -0
- src/harness/src/openharness/__main__.py +6 -0
- src/harness/src/openharness/api/__init__.py +21 -0
- src/harness/src/openharness/api/client.py +281 -0
- src/harness/src/openharness/api/codex_client.py +407 -0
- src/harness/src/openharness/api/copilot_auth.py +240 -0
- src/harness/src/openharness/api/copilot_client.py +134 -0
- src/harness/src/openharness/api/errors.py +19 -0
- src/harness/src/openharness/api/openai_client.py +577 -0
- src/harness/src/openharness/api/provider.py +186 -0
- src/harness/src/openharness/api/registry.py +437 -0
- src/harness/src/openharness/api/usage.py +17 -0
- src/harness/src/openharness/auth/__init__.py +29 -0
- src/harness/src/openharness/auth/external.py +610 -0
- src/harness/src/openharness/auth/flows.py +189 -0
- src/harness/src/openharness/auth/manager.py +482 -0
- src/harness/src/openharness/auth/storage.py +269 -0
- src/harness/src/openharness/autopilot/__init__.py +23 -0
- src/harness/src/openharness/autopilot/service.py +2239 -0
- src/harness/src/openharness/autopilot/types.py +91 -0
- src/harness/src/openharness/bridge/__init__.py +20 -0
- src/harness/src/openharness/bridge/manager.py +106 -0
- src/harness/src/openharness/bridge/session_runner.py +46 -0
- src/harness/src/openharness/bridge/types.py +37 -0
- src/harness/src/openharness/bridge/work_secret.py +41 -0
- src/harness/src/openharness/channels/UPSTREAM +6 -0
- src/harness/src/openharness/channels/__init__.py +22 -0
- src/harness/src/openharness/channels/adapter.py +131 -0
- src/harness/src/openharness/channels/bus/__init__.py +6 -0
- src/harness/src/openharness/channels/bus/events.py +38 -0
- src/harness/src/openharness/channels/bus/queue.py +44 -0
- src/harness/src/openharness/channels/impl/__init__.py +6 -0
- src/harness/src/openharness/channels/impl/base.py +141 -0
- src/harness/src/openharness/channels/impl/dingtalk.py +445 -0
- src/harness/src/openharness/channels/impl/discord.py +311 -0
- src/harness/src/openharness/channels/impl/email.py +410 -0
- src/harness/src/openharness/channels/impl/feishu.py +1342 -0
- src/harness/src/openharness/channels/impl/manager.py +257 -0
- src/harness/src/openharness/channels/impl/matrix.py +700 -0
- src/harness/src/openharness/channels/impl/mochat.py +897 -0
- src/harness/src/openharness/channels/impl/qq.py +141 -0
- src/harness/src/openharness/channels/impl/slack.py +284 -0
- src/harness/src/openharness/channels/impl/telegram.py +525 -0
- src/harness/src/openharness/channels/impl/whatsapp.py +159 -0
- src/harness/src/openharness/cli.py +2551 -0
- src/harness/src/openharness/commands/__init__.py +21 -0
- src/harness/src/openharness/commands/registry.py +2783 -0
- src/harness/src/openharness/config/__init__.py +34 -0
- src/harness/src/openharness/config/paths.py +160 -0
- src/harness/src/openharness/config/schema.py +119 -0
- src/harness/src/openharness/config/settings.py +1104 -0
- src/harness/src/openharness/coordinator/__init__.py +12 -0
- src/harness/src/openharness/coordinator/agent_definitions.py +975 -0
- src/harness/src/openharness/coordinator/coordinator_mode.py +520 -0
- src/harness/src/openharness/engine/__init__.py +80 -0
- src/harness/src/openharness/engine/cost_tracker.py +24 -0
- src/harness/src/openharness/engine/messages.py +222 -0
- src/harness/src/openharness/engine/query.py +1188 -0
- src/harness/src/openharness/engine/query_engine.py +313 -0
- src/harness/src/openharness/engine/stream_events.py +90 -0
- src/harness/src/openharness/hooks/__init__.py +50 -0
- src/harness/src/openharness/hooks/events.py +20 -0
- src/harness/src/openharness/hooks/executor.py +242 -0
- src/harness/src/openharness/hooks/hot_reload.py +31 -0
- src/harness/src/openharness/hooks/loader.py +68 -0
- src/harness/src/openharness/hooks/schemas.py +66 -0
- src/harness/src/openharness/hooks/types.py +38 -0
- src/harness/src/openharness/keybindings/__init__.py +14 -0
- src/harness/src/openharness/keybindings/default_bindings.py +11 -0
- src/harness/src/openharness/keybindings/loader.py +22 -0
- src/harness/src/openharness/keybindings/parser.py +18 -0
- src/harness/src/openharness/keybindings/resolver.py +13 -0
- src/harness/src/openharness/mcp/__init__.py +79 -0
- src/harness/src/openharness/mcp/client.py +298 -0
- src/harness/src/openharness/mcp/config.py +16 -0
- src/harness/src/openharness/mcp/types.py +76 -0
- src/harness/src/openharness/memory/__init__.py +25 -0
- src/harness/src/openharness/memory/agent.py +91 -0
- src/harness/src/openharness/memory/manager.py +183 -0
- src/harness/src/openharness/memory/memdir.py +52 -0
- src/harness/src/openharness/memory/migrate.py +137 -0
- src/harness/src/openharness/memory/paths.py +22 -0
- src/harness/src/openharness/memory/relevance.py +145 -0
- src/harness/src/openharness/memory/scan.py +116 -0
- src/harness/src/openharness/memory/schema.py +443 -0
- src/harness/src/openharness/memory/search.py +71 -0
- src/harness/src/openharness/memory/team.py +90 -0
- src/harness/src/openharness/memory/types.py +33 -0
- src/harness/src/openharness/memory/usage.py +153 -0
- src/harness/src/openharness/output_styles/__init__.py +5 -0
- src/harness/src/openharness/output_styles/loader.py +42 -0
- src/harness/src/openharness/permissions/__init__.py +26 -0
- src/harness/src/openharness/permissions/checker.py +200 -0
- src/harness/src/openharness/permissions/modes.py +13 -0
- src/harness/src/openharness/personalization/__init__.py +6 -0
- src/harness/src/openharness/personalization/extractor.py +138 -0
- src/harness/src/openharness/personalization/rules.py +64 -0
- src/harness/src/openharness/personalization/session_hook.py +65 -0
- src/harness/src/openharness/platforms.py +86 -0
- src/harness/src/openharness/plugins/__init__.py +53 -0
- src/harness/src/openharness/plugins/bundled/__init__.py +0 -0
- src/harness/src/openharness/plugins/installer.py +39 -0
- src/harness/src/openharness/plugins/loader.py +730 -0
- src/harness/src/openharness/plugins/schemas.py +24 -0
- src/harness/src/openharness/plugins/types.py +59 -0
- src/harness/src/openharness/prompts/__init__.py +14 -0
- src/harness/src/openharness/prompts/claudemd.py +48 -0
- src/harness/src/openharness/prompts/context.py +187 -0
- src/harness/src/openharness/prompts/environment.py +135 -0
- src/harness/src/openharness/prompts/system_prompt.py +109 -0
- src/harness/src/openharness/sandbox/Dockerfile +6 -0
- src/harness/src/openharness/sandbox/__init__.py +33 -0
- src/harness/src/openharness/sandbox/adapter.py +148 -0
- src/harness/src/openharness/sandbox/docker_backend.py +232 -0
- src/harness/src/openharness/sandbox/docker_image.py +103 -0
- src/harness/src/openharness/sandbox/path_validator.py +37 -0
- src/harness/src/openharness/sandbox/session.py +63 -0
- src/harness/src/openharness/services/__init__.py +30 -0
- src/harness/src/openharness/services/autodream/__init__.py +34 -0
- src/harness/src/openharness/services/autodream/backup.py +104 -0
- src/harness/src/openharness/services/autodream/lock.py +138 -0
- src/harness/src/openharness/services/autodream/prompt.py +128 -0
- src/harness/src/openharness/services/autodream/service.py +313 -0
- src/harness/src/openharness/services/compact/__init__.py +1725 -0
- src/harness/src/openharness/services/cron.py +137 -0
- src/harness/src/openharness/services/cron_scheduler.py +595 -0
- src/harness/src/openharness/services/lsp/__init__.py +216 -0
- src/harness/src/openharness/services/memory_extract/__init__.py +261 -0
- src/harness/src/openharness/services/oauth/__init__.py +0 -0
- src/harness/src/openharness/services/session_backend.py +97 -0
- src/harness/src/openharness/services/session_memory/__init__.py +139 -0
- src/harness/src/openharness/services/session_storage.py +230 -0
- src/harness/src/openharness/services/token_estimation.py +15 -0
- src/harness/src/openharness/services/tool_outputs.py +55 -0
- src/harness/src/openharness/skills/__init__.py +44 -0
- src/harness/src/openharness/skills/_frontmatter.py +97 -0
- src/harness/src/openharness/skills/bundled/__init__.py +75 -0
- src/harness/src/openharness/skills/bundled/content/commit.md +25 -0
- src/harness/src/openharness/skills/bundled/content/debug.md +25 -0
- src/harness/src/openharness/skills/bundled/content/diagnose.md +35 -0
- src/harness/src/openharness/skills/bundled/content/plan.md +39 -0
- src/harness/src/openharness/skills/bundled/content/review.md +33 -0
- src/harness/src/openharness/skills/bundled/content/simplify.md +26 -0
- src/harness/src/openharness/skills/bundled/content/skill-creator.md +175 -0
- src/harness/src/openharness/skills/bundled/content/test.md +38 -0
- src/harness/src/openharness/skills/loader.py +229 -0
- src/harness/src/openharness/skills/registry.py +29 -0
- src/harness/src/openharness/skills/types.py +24 -0
- src/harness/src/openharness/state/__init__.py +6 -0
- src/harness/src/openharness/state/app_state.py +30 -0
- src/harness/src/openharness/state/store.py +40 -0
- src/harness/src/openharness/swarm/__init__.py +70 -0
- src/harness/src/openharness/swarm/in_process.py +693 -0
- src/harness/src/openharness/swarm/lockfile.py +24 -0
- src/harness/src/openharness/swarm/mailbox.py +522 -0
- src/harness/src/openharness/swarm/permission_sync.py +1168 -0
- src/harness/src/openharness/swarm/registry.py +410 -0
- src/harness/src/openharness/swarm/spawn_utils.py +229 -0
- src/harness/src/openharness/swarm/subprocess_backend.py +171 -0
- src/harness/src/openharness/swarm/team_lifecycle.py +910 -0
- src/harness/src/openharness/swarm/types.py +398 -0
- src/harness/src/openharness/swarm/worktree.py +315 -0
- src/harness/src/openharness/tasks/__init__.py +18 -0
- src/harness/src/openharness/tasks/local_agent_task.py +28 -0
- src/harness/src/openharness/tasks/local_shell_task.py +17 -0
- src/harness/src/openharness/tasks/manager.py +475 -0
- src/harness/src/openharness/tasks/stop_task.py +11 -0
- src/harness/src/openharness/tasks/types.py +32 -0
- src/harness/src/openharness/themes/__init__.py +21 -0
- src/harness/src/openharness/themes/builtin.py +89 -0
- src/harness/src/openharness/themes/loader.py +55 -0
- src/harness/src/openharness/themes/schema.py +54 -0
- src/harness/src/openharness/tools/__init__.py +107 -0
- src/harness/src/openharness/tools/agent_tool.py +141 -0
- src/harness/src/openharness/tools/ask_user_question_tool.py +46 -0
- src/harness/src/openharness/tools/base.py +80 -0
- src/harness/src/openharness/tools/bash_tool.py +259 -0
- src/harness/src/openharness/tools/brief_tool.py +33 -0
- src/harness/src/openharness/tools/config_tool.py +54 -0
- src/harness/src/openharness/tools/cron_create_tool.py +105 -0
- src/harness/src/openharness/tools/cron_delete_tool.py +32 -0
- src/harness/src/openharness/tools/cron_list_tool.py +69 -0
- src/harness/src/openharness/tools/cron_toggle_tool.py +37 -0
- src/harness/src/openharness/tools/enter_plan_mode_tool.py +28 -0
- src/harness/src/openharness/tools/enter_worktree_tool.py +80 -0
- src/harness/src/openharness/tools/exit_plan_mode_tool.py +28 -0
- src/harness/src/openharness/tools/exit_worktree_tool.py +42 -0
- src/harness/src/openharness/tools/file_edit_tool.py +95 -0
- src/harness/src/openharness/tools/file_read_tool.py +72 -0
- src/harness/src/openharness/tools/file_write_tool.py +87 -0
- src/harness/src/openharness/tools/glob_tool.py +175 -0
- src/harness/src/openharness/tools/grep_tool.py +374 -0
- src/harness/src/openharness/tools/image_generation_tool.py +447 -0
- src/harness/src/openharness/tools/image_to_text_tool.py +237 -0
- src/harness/src/openharness/tools/list_mcp_resources_tool.py +36 -0
- src/harness/src/openharness/tools/lsp_tool.py +154 -0
- src/harness/src/openharness/tools/mcp_auth_tool.py +71 -0
- src/harness/src/openharness/tools/mcp_tool.py +72 -0
- src/harness/src/openharness/tools/notebook_edit_tool.py +97 -0
- src/harness/src/openharness/tools/read_mcp_resource_tool.py +38 -0
- src/harness/src/openharness/tools/remote_trigger_tool.py +74 -0
- src/harness/src/openharness/tools/send_message_tool.py +58 -0
- src/harness/src/openharness/tools/skill_tool.py +43 -0
- src/harness/src/openharness/tools/sleep_tool.py +32 -0
- src/harness/src/openharness/tools/task_create_tool.py +56 -0
- src/harness/src/openharness/tools/task_get_tool.py +33 -0
- src/harness/src/openharness/tools/task_list_tool.py +35 -0
- src/harness/src/openharness/tools/task_output_tool.py +35 -0
- src/harness/src/openharness/tools/task_stop_tool.py +30 -0
- src/harness/src/openharness/tools/task_update_tool.py +50 -0
- src/harness/src/openharness/tools/team_create_tool.py +31 -0
- src/harness/src/openharness/tools/team_delete_tool.py +30 -0
- src/harness/src/openharness/tools/todo_write_tool.py +46 -0
- src/harness/src/openharness/tools/tool_search_tool.py +38 -0
- src/harness/src/openharness/tools/web_fetch_tool.py +117 -0
- src/harness/src/openharness/tools/web_search_tool.py +119 -0
- src/harness/src/openharness/ui/__init__.py +5 -0
- src/harness/src/openharness/ui/app.py +320 -0
- src/harness/src/openharness/ui/backend_host.py +941 -0
- src/harness/src/openharness/ui/coordinator_drain.py +198 -0
- src/harness/src/openharness/ui/input.py +32 -0
- src/harness/src/openharness/ui/output.py +265 -0
- src/harness/src/openharness/ui/permission_dialog.py +14 -0
- src/harness/src/openharness/ui/protocol.py +247 -0
- src/harness/src/openharness/ui/react_launcher.py +179 -0
- src/harness/src/openharness/ui/runtime.py +799 -0
- src/harness/src/openharness/ui/textual_app.py +495 -0
- src/harness/src/openharness/utils/__init__.py +0 -0
- src/harness/src/openharness/utils/file_lock.py +86 -0
- src/harness/src/openharness/utils/fs.py +98 -0
- src/harness/src/openharness/utils/helpers.py +77 -0
- src/harness/src/openharness/utils/network_guard.py +340 -0
- src/harness/src/openharness/utils/shell.py +147 -0
- src/harness/src/openharness/vim/__init__.py +5 -0
- src/harness/src/openharness/vim/transitions.py +8 -0
- src/harness/src/openharness/voice/__init__.py +7 -0
- src/harness/src/openharness/voice/keyterms.py +10 -0
- src/harness/src/openharness/voice/stream_stt.py +8 -0
- src/harness/src/openharness/voice/voice_mode.py +44 -0
- src/llm/__init__.py +29 -0
- src/llm/image_generation.py +402 -0
- src/llm/provider_registry.py +419 -0
- src/llm/runtime_env.py +64 -0
- src/llm/structured_output.py +131 -0
- src/llm/vision.py +198 -0
- src/memory/__init__.py +2 -0
- src/memory/api/__init__.py +1 -0
- src/memory/api/base_memory_system_api.py +98 -0
- src/memory/api/base_symbolic_memory_system_api.py +190 -0
- src/memory/api/base_vector_memory_system_api.py +116 -0
- src/memory/api/faiss_memory_system_api.py +228 -0
- src/memory/api/slot_process_api.py +827 -0
- src/memory/api/symbolic_memory_system_api.py +572 -0
- src/memory/memory_system/__init__.py +48 -0
- src/memory/memory_system/component_taxonomy.py +430 -0
- src/memory/memory_system/llm.py +437 -0
- src/memory/memory_system/models.py +168 -0
- src/memory/memory_system/user_prompt.py +418 -0
- src/memory/memory_system/utils.py +282 -0
- src/memory/memory_system/vectorstore.py +311 -0
- src/memory/memory_system/working_slot.py +99 -0
- src/pipeline/__init__.py +129 -0
- src/pipeline/contracts.py +531 -0
- src/pipeline/discipline_taxonomy.py +916 -0
- src/pipeline/evidence_coverage_ledger.py +1150 -0
- src/pipeline/evidence_refinement.py +620 -0
- src/pipeline/experiment_to_symbolic.py +137 -0
- src/pipeline/multimodal_evidence/__init__.py +28 -0
- src/pipeline/multimodal_evidence/capabilities.py +107 -0
- src/pipeline/multimodal_evidence/claims.py +135 -0
- src/pipeline/multimodal_evidence/contract.py +291 -0
- src/pipeline/multimodal_evidence/data_sh_compiler.py +505 -0
- src/pipeline/multimodal_evidence/handoff_binding.py +135 -0
- src/pipeline/multimodal_evidence/manifest.py +254 -0
- src/pipeline/multimodal_evidence/native_analysis.py +479 -0
- src/pipeline/multimodal_evidence/perception.py +277 -0
- src/pipeline/multimodal_evidence/query_binding.py +65 -0
- src/pipeline/multimodal_evidence/rendering.py +120 -0
- src/pipeline/multimodal_evidence/safety.py +42 -0
- src/pipeline/multimodal_evidence/sampling.py +69 -0
- src/pipeline/multimodal_evidence/service.py +148 -0
- src/pipeline/multimodal_evidence/survey_integration.py +460 -0
- src/pipeline/paper_identity.py +52 -0
- src/pipeline/research_design_inventory.py +338 -0
- src/pipeline/research_domain_resolution.py +669 -0
- src/pipeline/research_identity.py +548 -0
- src/pipeline/research_question_contract.py +646 -0
- src/pipeline/retrieval_lanes.py +889 -0
- src/pipeline/run_loop.py +862 -0
- src/pipeline/science_events.py +30 -0
- src/pipeline/science_manifests.py +602 -0
- src/pipeline/science_run.py +918 -0
- src/pipeline/science_stages.py +709 -0
- src/pipeline/science_workflow.py +807 -0
- src/pipeline/sh_cluster_projection.py +306 -0
- src/pipeline/sh_graph_provenance.py +648 -0
- src/pipeline/subhypothesis_decomposition.py +392 -0
- src/pipeline/subhypothesis_evidence.py +856 -0
- src/pipeline/survey_evidence_plan.py +858 -0
- src/pipeline/survey_gap_adjudication.py +647 -0
- src/pipeline/survey_gap_candidates.py +840 -0
- src/pipeline/survey_gap_ledger.py +683 -0
- src/pipeline/survey_gap_triage.py +401 -0
- src/pipeline/survey_handoff_persistence.py +481 -0
- src/pipeline/survey_handoff_projection.py +457 -0
- src/pipeline/survey_idea_handoff.py +1112 -0
- src/pipeline/survey_idea_loader.py +289 -0
- src/research_run_ids.py +11 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from src.agents.idea_agent.utils.workflow.mature_idea_sources import _survey_gap_ideas
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_survey_gap_sources_use_four_atomic_gaps_and_three_leading_pair_combinations() -> None:
|
|
7
|
+
handoff = {
|
|
8
|
+
"gaps": [
|
|
9
|
+
{
|
|
10
|
+
"gap_id": f"gap-{index}",
|
|
11
|
+
"statement": f"Gap statement {index}",
|
|
12
|
+
"target_slot": "mechanism",
|
|
13
|
+
}
|
|
14
|
+
for index in range(1, 6)
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
ideas = _survey_gap_ideas(handoff)
|
|
19
|
+
atomic_ideas = [idea for idea in ideas if not idea["idea_id"].startswith("survey-gap-combination-")]
|
|
20
|
+
combination_ideas = [idea for idea in ideas if idea["idea_id"].startswith("survey-gap-combination-")]
|
|
21
|
+
|
|
22
|
+
assert [idea["target_gap_ids"] for idea in atomic_ideas] == [["gap-1"], ["gap-2"], ["gap-3"], ["gap-4"]]
|
|
23
|
+
assert [idea["target_gap_ids"] for idea in combination_ideas] == [
|
|
24
|
+
["gap-1", "gap-2"],
|
|
25
|
+
["gap-1", "gap-3"],
|
|
26
|
+
["gap-2", "gap-3"],
|
|
27
|
+
]
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
from src.agents.idea_agent.agent.artifacts import artifact_init, artifact_set
|
|
6
|
+
from src.agents.idea_agent.utils.workflow.gap_hypothesis_bridge import (
|
|
7
|
+
build_gap_hypothesis_seeds,
|
|
8
|
+
)
|
|
9
|
+
from src.agents.idea_agent.utils.workflow.idea_helpers import build_direction_result_document
|
|
10
|
+
from src.agents.idea_agent.utils.workflow.mature_idea_sources import (
|
|
11
|
+
build_mature_idea_evidence_context,
|
|
12
|
+
collect_mature_idea_sources,
|
|
13
|
+
)
|
|
14
|
+
from src.agents.idea_agent.utils.workflow.idea_portfolio import build_idea_portfolio
|
|
15
|
+
from src.agents.idea_agent.utils.workflow.multimodal_data_anchoring import (
|
|
16
|
+
DATA_ANCHORED_CLAIM_SCOPE,
|
|
17
|
+
DATA_ANCHORED_PRIORITY,
|
|
18
|
+
apply_data_anchored_idea_constraints,
|
|
19
|
+
build_data_anchored_coverage_schedule,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _projection(*, status: str = "unresolved") -> dict:
|
|
24
|
+
return {
|
|
25
|
+
"schema_version": "multimodal_survey_projection_v1",
|
|
26
|
+
"data_anchored_subhypotheses": [
|
|
27
|
+
{
|
|
28
|
+
"sub_hypothesis_id": "MM_SH_01",
|
|
29
|
+
"analysis_priority": DATA_ANCHORED_PRIORITY,
|
|
30
|
+
"must_cover": True,
|
|
31
|
+
"question_kind": "MEASUREMENT_VALIDITY",
|
|
32
|
+
"claim_ids": ["mme:claim:001"],
|
|
33
|
+
"observation_ids": ["mme:obs:001"],
|
|
34
|
+
"observations": [
|
|
35
|
+
{
|
|
36
|
+
"observation_id": "mme:obs:001",
|
|
37
|
+
"finding": "A bounded early pattern is visible in the supplied sample.",
|
|
38
|
+
"candidate_explanation": "a tentative interface mechanism",
|
|
39
|
+
"alternative_explanations": ["a preparation artifact"],
|
|
40
|
+
"claim_limits": "Only the supplied sampled records are covered.",
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"claims": [
|
|
44
|
+
{
|
|
45
|
+
"claim_id": "mme:claim:001",
|
|
46
|
+
"observation_id": "mme:obs:001",
|
|
47
|
+
"local_data_statement": "The supplied sample contains a bounded early pattern.",
|
|
48
|
+
"candidate_explanation": "a tentative interface mechanism",
|
|
49
|
+
"alternative_explanations": ["a preparation artifact"],
|
|
50
|
+
"discriminating_prediction": "A calibrated independent readout separates the explanations.",
|
|
51
|
+
"falsifier": "The pattern vanishes in a calibrated comparison.",
|
|
52
|
+
"claim_limits": "Only the supplied sampled records are covered.",
|
|
53
|
+
"literature_reconciliation": {
|
|
54
|
+
"status": status,
|
|
55
|
+
"search_coverage": {},
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _handoff() -> dict:
|
|
65
|
+
return {
|
|
66
|
+
"topic": "Bounded interface process",
|
|
67
|
+
"profile_resolution": {"profile_id": "generic_scientific"},
|
|
68
|
+
"gaps": [
|
|
69
|
+
{
|
|
70
|
+
"gap_id": "gap-data",
|
|
71
|
+
"subhypothesis_id": "MM_SH_01",
|
|
72
|
+
"gap_kind": "mechanism_gap",
|
|
73
|
+
"target_slot": "mechanism",
|
|
74
|
+
"statement": "The observed early pattern has no settled explanation.",
|
|
75
|
+
"target_object": "the supplied interface sample",
|
|
76
|
+
"priority": "medium",
|
|
77
|
+
"status": "open",
|
|
78
|
+
"anchor_ids": ["gap-anchor"],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"gap_id": "gap-literature",
|
|
82
|
+
"subhypothesis_id": "SH_02",
|
|
83
|
+
"gap_kind": "boundary_gap",
|
|
84
|
+
"target_slot": "boundary",
|
|
85
|
+
"statement": "A literature boundary remains open.",
|
|
86
|
+
"target_object": "reference system",
|
|
87
|
+
"priority": "high",
|
|
88
|
+
"status": "open",
|
|
89
|
+
"anchor_ids": ["paper-anchor"],
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
"anchors": [
|
|
93
|
+
{
|
|
94
|
+
"anchor_id": "gap-anchor",
|
|
95
|
+
"anchor_type": "gap_ledger",
|
|
96
|
+
"subhypothesis_id": "MM_SH_01",
|
|
97
|
+
"target_slot": "mechanism",
|
|
98
|
+
"text_excerpt": "The observed early pattern has no settled explanation.",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"anchor_id": "mm-anchor",
|
|
102
|
+
"anchor_type": "multimodal_observation",
|
|
103
|
+
"subhypothesis_id": "MM_SH_01",
|
|
104
|
+
"target_slot": "multimodal_observation",
|
|
105
|
+
"supports_gap_ids": ["gap-data"],
|
|
106
|
+
"source_id": "mme:obs:001",
|
|
107
|
+
"text_excerpt": "A bounded early pattern is visible in the supplied sample.",
|
|
108
|
+
"source_pointer": {
|
|
109
|
+
"artifact": "multimodal_evidence.json",
|
|
110
|
+
"json_pointer": "/observations/0",
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"anchor_id": "paper-anchor",
|
|
115
|
+
"anchor_type": "paper_excerpt",
|
|
116
|
+
"subhypothesis_id": "SH_02",
|
|
117
|
+
"target_slot": "boundary",
|
|
118
|
+
"source_pointer": {"artifact": "survey.md", "json_pointer": "/references/0", "paper_id": "W1"},
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"anchor_id": "unrelated-mm-anchor",
|
|
122
|
+
"anchor_type": "multimodal_observation",
|
|
123
|
+
"subhypothesis_id": "MM_SH_99",
|
|
124
|
+
"target_slot": "multimodal_observation",
|
|
125
|
+
"source_id": "mme:obs:999",
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
"evidence_roles": [
|
|
129
|
+
{
|
|
130
|
+
"evidence_role_id": "role-direct-data",
|
|
131
|
+
"subhypothesis_id": "MM_SH_01",
|
|
132
|
+
"target_slot": "multimodal_observation",
|
|
133
|
+
"expected_role": "DIRECT_OBSERVATION",
|
|
134
|
+
"anchor_ids": ["mm-anchor"],
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"evidence_role_id": "role-counter-data",
|
|
138
|
+
"subhypothesis_id": "MM_SH_01",
|
|
139
|
+
"target_slot": "multimodal_native_measurement",
|
|
140
|
+
"expected_role": "METHOD_OR_MEASUREMENT",
|
|
141
|
+
"anchor_ids": ["mm-anchor"],
|
|
142
|
+
"paper_ids": ["W2"],
|
|
143
|
+
"qualified_paper_ids": ["W3"],
|
|
144
|
+
"background_paper_ids": ["W4"],
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"evidence_role_id": "role-unrelated",
|
|
148
|
+
"subhypothesis_id": "MM_SH_99",
|
|
149
|
+
"target_slot": "multimodal_observation",
|
|
150
|
+
"expected_role": "DIRECT_OBSERVATION",
|
|
151
|
+
"anchor_ids": ["unrelated-mm-anchor"],
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def test_gap_bridge_prioritizes_data_anchor_and_limits_measurement_risk() -> None:
|
|
158
|
+
handoff = _handoff()
|
|
159
|
+
seeds = build_gap_hypothesis_seeds(
|
|
160
|
+
handoff,
|
|
161
|
+
multimodal_evidence_projection=_projection(status="measurement_at_risk"),
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
assert seeds[0]["gap_id"] == "gap-data"
|
|
165
|
+
data_seed = next(seed for seed in seeds if seed["gap_id"] == "gap-data")
|
|
166
|
+
assert data_seed["analysis_priority"] == DATA_ANCHORED_PRIORITY
|
|
167
|
+
assert data_seed["data_anchor_refs"] == ["mme:obs:001"]
|
|
168
|
+
assert data_seed["literature_reconciliation_status"] == "measurement_at_risk"
|
|
169
|
+
assert data_seed["gap_kind"] == "measurement_validity_gap"
|
|
170
|
+
assert data_seed["target_slot"] == "multimodal_native_measurement"
|
|
171
|
+
assert "calibration" in data_seed["gap_statement"]
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def test_unresolved_data_seed_does_not_become_a_first_discovery_claim() -> None:
|
|
175
|
+
handoff = _handoff()
|
|
176
|
+
handoff["gaps"][0]["statement"] = "This is the first discovery in the supplied sample."
|
|
177
|
+
data_seed = next(
|
|
178
|
+
seed
|
|
179
|
+
for seed in build_gap_hypothesis_seeds(
|
|
180
|
+
handoff,
|
|
181
|
+
multimodal_evidence_projection=_projection(status="unresolved"),
|
|
182
|
+
)
|
|
183
|
+
if seed["gap_id"] == "gap-data"
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
assert any("first discovery" in item for item in data_seed["unknown_or_unverified"])
|
|
187
|
+
assert data_seed["literature_reconciliation_status"] == "unresolved"
|
|
188
|
+
assert "first discovery" not in data_seed["gap_statement"].casefold()
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
def test_data_coverage_schedule_reserves_all_three_branches_within_cap() -> None:
|
|
192
|
+
data_seed = next(
|
|
193
|
+
seed
|
|
194
|
+
for seed in build_gap_hypothesis_seeds(
|
|
195
|
+
_handoff(),
|
|
196
|
+
multimodal_evidence_projection=_projection(),
|
|
197
|
+
)
|
|
198
|
+
if seed["gap_id"] == "gap-data"
|
|
199
|
+
)
|
|
200
|
+
schedule = build_data_anchored_coverage_schedule(
|
|
201
|
+
[data_seed],
|
|
202
|
+
ordinary_task_count=2,
|
|
203
|
+
iterations_per_search=12,
|
|
204
|
+
budget_cap=0.50,
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
assert schedule["coverage_pass_order"] == "before_ordinary_mcts"
|
|
208
|
+
assert schedule["allocated_data_expansion_budget"] <= schedule["data_expansion_budget_cap"]
|
|
209
|
+
actual_total = (
|
|
210
|
+
schedule["ordinary_expansion_budget"]
|
|
211
|
+
+ schedule["allocated_data_expansion_budget"]
|
|
212
|
+
)
|
|
213
|
+
assert schedule["allocated_data_expansion_budget"] <= 0.50 * actual_total
|
|
214
|
+
assert [branch["branch_id"] for branch in schedule["assignments"][0]["coverage_branches"]] == [
|
|
215
|
+
"candidate_mechanism",
|
|
216
|
+
"alternative_explanation",
|
|
217
|
+
"measurement_artifact",
|
|
218
|
+
]
|
|
219
|
+
assert schedule["assignments"][0]["mcts_depth_multiplier"] == 1.75
|
|
220
|
+
|
|
221
|
+
maximum_cap_schedule = build_data_anchored_coverage_schedule(
|
|
222
|
+
[data_seed],
|
|
223
|
+
ordinary_task_count=1,
|
|
224
|
+
iterations_per_search=12,
|
|
225
|
+
budget_cap=1.0,
|
|
226
|
+
)
|
|
227
|
+
assert maximum_cap_schedule["data_expansion_budget_share_cap"] == 0.50
|
|
228
|
+
assert maximum_cap_schedule["allocated_data_expansion_budget"] <= 0.50 * (
|
|
229
|
+
maximum_cap_schedule["ordinary_expansion_budget"]
|
|
230
|
+
+ maximum_cap_schedule["allocated_data_expansion_budget"]
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
deferred_schedule = build_data_anchored_coverage_schedule(
|
|
234
|
+
[data_seed],
|
|
235
|
+
ordinary_task_count=0,
|
|
236
|
+
iterations_per_search=12,
|
|
237
|
+
)
|
|
238
|
+
assert deferred_schedule["enabled"] is False
|
|
239
|
+
assert deferred_schedule["assignments"] == []
|
|
240
|
+
assert deferred_schedule["deferred_subhypothesis_ids"] == ["MM_SH_01"]
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def test_data_anchor_requires_explicit_gap_binding() -> None:
|
|
244
|
+
handoff = _handoff()
|
|
245
|
+
handoff["gaps"].append(
|
|
246
|
+
{
|
|
247
|
+
**handoff["gaps"][0],
|
|
248
|
+
"gap_id": "gap-same-sh-unbound",
|
|
249
|
+
"anchor_ids": ["gap-anchor"],
|
|
250
|
+
}
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
seeds = build_gap_hypothesis_seeds(
|
|
254
|
+
handoff,
|
|
255
|
+
multimodal_evidence_projection=_projection(),
|
|
256
|
+
)
|
|
257
|
+
by_gap = {seed["gap_id"]: seed for seed in seeds}
|
|
258
|
+
|
|
259
|
+
assert by_gap["gap-data"]["analysis_priority"] == DATA_ANCHORED_PRIORITY
|
|
260
|
+
assert "analysis_priority" not in by_gap["gap-same-sh-unbound"]
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def test_mature_context_scopes_data_anchor_and_related_papers_to_target_gap() -> None:
|
|
264
|
+
handoff = _handoff()
|
|
265
|
+
ideas = collect_mature_idea_sources(
|
|
266
|
+
survey_handoff=handoff,
|
|
267
|
+
multimodal_evidence_projection=_projection(),
|
|
268
|
+
)
|
|
269
|
+
idea = next(item for item in ideas if item.get("target_gap_ids") == ["gap-data"])
|
|
270
|
+
context = build_mature_idea_evidence_context(
|
|
271
|
+
idea,
|
|
272
|
+
survey_handoff=handoff,
|
|
273
|
+
multimodal_evidence_projection=_projection(),
|
|
274
|
+
references=[
|
|
275
|
+
{"paper_id": "W1", "title": "Unrelated boundary study"},
|
|
276
|
+
{"paper_id": "W2", "title": "Calibration counterexample"},
|
|
277
|
+
{"paper_id": "W3", "title": "Qualified measurement support"},
|
|
278
|
+
{"paper_id": "W4", "title": "Background measurement context"},
|
|
279
|
+
],
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
assert context["multimodal_evidence_context"]["data_anchor_refs"] == ["mme:obs:001"]
|
|
283
|
+
scoped_anchor_ids = {anchor["anchor_id"] for anchor in context["survey_handoff"]["anchors"]}
|
|
284
|
+
assert {"gap-anchor", "mm-anchor"}.issubset(scoped_anchor_ids)
|
|
285
|
+
assert "unrelated-mm-anchor" not in scoped_anchor_ids
|
|
286
|
+
assert [item["paper_id"] for item in context["evidence_subset"]] == ["W2", "W3", "W4"]
|
|
287
|
+
assert "a preparation artifact" in context["counterexamples"]
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
def test_data_anchored_final_candidate_requires_bounded_evidence_contract() -> None:
|
|
291
|
+
data_seed = next(
|
|
292
|
+
seed
|
|
293
|
+
for seed in build_gap_hypothesis_seeds(
|
|
294
|
+
_handoff(),
|
|
295
|
+
multimodal_evidence_projection=_projection(),
|
|
296
|
+
)
|
|
297
|
+
if seed["gap_id"] == "gap-data"
|
|
298
|
+
)
|
|
299
|
+
completed = apply_data_anchored_idea_constraints(
|
|
300
|
+
{
|
|
301
|
+
"title": "Calibrated data hypothesis",
|
|
302
|
+
"abstract": "A bounded candidate.",
|
|
303
|
+
"core_contribution": "A discriminating mechanism test.",
|
|
304
|
+
"method": "Contrast the candidate with a calibrated alternative.",
|
|
305
|
+
"expected_mechanism": "The local pattern follows the candidate interface mechanism.",
|
|
306
|
+
"discriminating_observation": "A calibrated contrast separates the alternatives.",
|
|
307
|
+
"target_gap_ids": ["gap-data"],
|
|
308
|
+
},
|
|
309
|
+
seed=data_seed,
|
|
310
|
+
)
|
|
311
|
+
incomplete = apply_data_anchored_idea_constraints(
|
|
312
|
+
{
|
|
313
|
+
"title": "Unspecified data hypothesis",
|
|
314
|
+
"abstract": "A bounded candidate.",
|
|
315
|
+
"core_contribution": "A claim without a mechanism.",
|
|
316
|
+
"method": "Inspect the supplied observation.",
|
|
317
|
+
"target_gap_ids": ["gap-data"],
|
|
318
|
+
},
|
|
319
|
+
seed=data_seed,
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
assert completed["data_anchored_contract_status"] == "complete"
|
|
323
|
+
assert completed["claim_scope"] == DATA_ANCHORED_CLAIM_SCOPE
|
|
324
|
+
assert completed["data_anchor_refs"] == ["mme:obs:001"]
|
|
325
|
+
assert completed["competing_explanations"] == ["a preparation artifact"]
|
|
326
|
+
assert completed["falsifier"]
|
|
327
|
+
assert incomplete["data_anchored_contract_status"] == "incomplete"
|
|
328
|
+
assert incomplete["invariant_status"] == "violated"
|
|
329
|
+
assert "missing_data_anchored_candidate_mechanism" in incomplete["invariant_violations"]
|
|
330
|
+
|
|
331
|
+
incomplete_portfolio = build_idea_portfolio(
|
|
332
|
+
[incomplete],
|
|
333
|
+
has_survey_handoff=True,
|
|
334
|
+
)
|
|
335
|
+
complete_portfolio = build_idea_portfolio(
|
|
336
|
+
[completed],
|
|
337
|
+
has_survey_handoff=True,
|
|
338
|
+
)
|
|
339
|
+
assert incomplete_portfolio["selected_primary_idea"] == {}
|
|
340
|
+
assert incomplete_portfolio["diversity_report"]["invariant_violation_count"] == 1
|
|
341
|
+
assert complete_portfolio["selected_primary_idea"]["idea_id"] == "Calibrated data hypothesis"
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
def test_public_idea_result_exposes_required_bounded_data_fields(tmp_path: Path) -> None:
|
|
345
|
+
data_seed = next(
|
|
346
|
+
seed
|
|
347
|
+
for seed in build_gap_hypothesis_seeds(
|
|
348
|
+
_handoff(),
|
|
349
|
+
multimodal_evidence_projection=_projection(),
|
|
350
|
+
)
|
|
351
|
+
if seed["gap_id"] == "gap-data"
|
|
352
|
+
)
|
|
353
|
+
candidate = apply_data_anchored_idea_constraints(
|
|
354
|
+
{
|
|
355
|
+
"title": "Calibrated data hypothesis",
|
|
356
|
+
"abstract": "A bounded candidate.",
|
|
357
|
+
"core_contribution": "A discriminating mechanism test.",
|
|
358
|
+
"method": "Contrast the candidate with a calibrated alternative.",
|
|
359
|
+
"expected_mechanism": "The local pattern follows the candidate interface mechanism.",
|
|
360
|
+
"discriminating_observation": "A calibrated contrast separates the alternatives.",
|
|
361
|
+
"target_gap_ids": ["gap-data"],
|
|
362
|
+
},
|
|
363
|
+
seed=data_seed,
|
|
364
|
+
)
|
|
365
|
+
manifest = tmp_path / "survey_manifest.json"
|
|
366
|
+
manifest.write_text("{}", encoding="utf-8")
|
|
367
|
+
artifact = artifact_init()
|
|
368
|
+
artifact_set(
|
|
369
|
+
artifact,
|
|
370
|
+
"survey_idea_context",
|
|
371
|
+
{
|
|
372
|
+
"manifest_path": str(manifest),
|
|
373
|
+
"handoff": _handoff(),
|
|
374
|
+
"survey_run_id": "survey-data",
|
|
375
|
+
},
|
|
376
|
+
)
|
|
377
|
+
|
|
378
|
+
document = build_direction_result_document("Bounded interface process", candidate, artifact)
|
|
379
|
+
direction = document["directions"][0]
|
|
380
|
+
|
|
381
|
+
assert direction["data_anchor_refs"] == ["mme:obs:001"]
|
|
382
|
+
assert direction["literature_reconciliation_status"] == "unresolved"
|
|
383
|
+
assert direction["candidate_mechanism"]
|
|
384
|
+
assert direction["discriminating_measurement_plan"]
|
|
385
|
+
assert direction["falsifier"]
|
|
386
|
+
assert direction["claim_scope"] == DATA_ANCHORED_CLAIM_SCOPE
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
pytest.importorskip("faiss")
|
|
6
|
+
|
|
7
|
+
from src.agents.idea_agent.agent.mcts import IdeaEvaluation
|
|
8
|
+
from src.agents.idea_agent.agent.prompts.mcts_generation import MCTS_IDEA_GENERATION_PROMPT
|
|
9
|
+
from src.agents.idea_agent.agent.prompts.skill_instantiation import SKILL_INSTANTIATION_PROMPT
|
|
10
|
+
from src.agents.idea_agent.utils.mcts.component_novelty import (
|
|
11
|
+
ComponentNoveltyScorer,
|
|
12
|
+
PROFILE_NOVELTY_AXES,
|
|
13
|
+
)
|
|
14
|
+
from src.agents.idea_agent.utils.mcts.scientific_intervention_ontology import (
|
|
15
|
+
get_scientific_intervention_profile,
|
|
16
|
+
)
|
|
17
|
+
from src.agents.idea_agent.utils.workflow.ligagent_helpers import (
|
|
18
|
+
build_replanned_idea_entry,
|
|
19
|
+
build_profile_aware_materialization,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _idea(profile_id: str) -> dict[str, object]:
|
|
24
|
+
profile = get_scientific_intervention_profile(profile_id)
|
|
25
|
+
assert profile is not None
|
|
26
|
+
return {
|
|
27
|
+
"title": "Causal intervention",
|
|
28
|
+
"abstract": "A profile-native research idea.",
|
|
29
|
+
"core_contribution": "The intervention changes a mediator and outcome relation.",
|
|
30
|
+
"method": "Measure the mediator before the endpoint; compare against control.",
|
|
31
|
+
"risks": "Confounding and boundary failure.",
|
|
32
|
+
"components": profile.default_component_names(),
|
|
33
|
+
"scientific_intervention": profile.to_payload(),
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def test_generation_and_instantiation_prompts_require_scientific_contract() -> None:
|
|
38
|
+
assert "central_hypothesis" in MCTS_IDEA_GENERATION_PROMPT
|
|
39
|
+
assert "discriminating_observation" in MCTS_IDEA_GENERATION_PROMPT
|
|
40
|
+
assert "evidence_requirement" in SKILL_INSTANTIATION_PROMPT
|
|
41
|
+
assert "scientific_object" in SKILL_INSTANTIATION_PROMPT
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def test_non_cs_materialization_uses_native_spec_and_no_legacy_algorithm() -> None:
|
|
45
|
+
result = build_profile_aware_materialization(
|
|
46
|
+
_idea("clinical_health"),
|
|
47
|
+
"clinical intervention",
|
|
48
|
+
prompts={},
|
|
49
|
+
chat_fn=lambda *args, **kwargs: (_ for _ in ()).throw(RuntimeError("mock failure")),
|
|
50
|
+
model="mock",
|
|
51
|
+
logger=type("Logger", (), {"warning": lambda self, *args: None})(),
|
|
52
|
+
)
|
|
53
|
+
assert result["profile_id"] == "clinical_health"
|
|
54
|
+
assert result["spec_type"] == "intervention_measurement_spec"
|
|
55
|
+
assert result["legacy_algorithm"] == []
|
|
56
|
+
assert result["scientific_spec"]["boundary_condition"]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def test_replan_preserves_profile_and_discipline_context() -> None:
|
|
60
|
+
source = _idea("clinical_health")
|
|
61
|
+
source.update(
|
|
62
|
+
{
|
|
63
|
+
"root_domains": ["medicine"],
|
|
64
|
+
"discipline_resolution": {
|
|
65
|
+
"primary_discipline": "medicine",
|
|
66
|
+
"discipline_ids": ["medicine"],
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
replanned = build_replanned_idea_entry(
|
|
71
|
+
latest_candidate=source,
|
|
72
|
+
root_idea=source,
|
|
73
|
+
mature_idea="A revised causal intervention.",
|
|
74
|
+
component_decisions=[],
|
|
75
|
+
)
|
|
76
|
+
assert replanned["root_domains"] == ["medicine"]
|
|
77
|
+
assert replanned["discipline_resolution"]["primary_discipline"] == "medicine"
|
|
78
|
+
assert replanned["scientific_intervention"]["profile_id"] == "clinical_health"
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def test_materialization_normalizes_values_to_profile_schema() -> None:
|
|
82
|
+
def mock_chat(*args, **kwargs):
|
|
83
|
+
return (
|
|
84
|
+
'{"scientific_spec": {'
|
|
85
|
+
'"object_type": "neural_network", '
|
|
86
|
+
'"evidence_obligation": "benchmark_score", '
|
|
87
|
+
'"boundary_condition": "training_loss", '
|
|
88
|
+
'"measurement_or_observation": "accuracy"'
|
|
89
|
+
'}}'
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
result = build_profile_aware_materialization(
|
|
93
|
+
_idea("clinical_health"),
|
|
94
|
+
"clinical intervention",
|
|
95
|
+
prompts={},
|
|
96
|
+
chat_fn=mock_chat,
|
|
97
|
+
model="mock",
|
|
98
|
+
logger=type("Logger", (), {"warning": lambda self, *args: None})(),
|
|
99
|
+
)
|
|
100
|
+
schema = result["scientific_spec"]
|
|
101
|
+
assert schema["object_type"] == "target_population_or_cohort"
|
|
102
|
+
assert schema["evidence_obligation"] == "comparator_or_counterfactual"
|
|
103
|
+
assert schema["boundary_condition"] == "safety_or_external_validity_boundary"
|
|
104
|
+
assert schema["measurement_or_observation"] == "clinical_endpoint"
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def test_cs_materialization_preserves_legacy_algorithm_contract() -> None:
|
|
108
|
+
def mock_chat(*args, **kwargs):
|
|
109
|
+
return '{"algorithms": [{"name": "Method", "input": ["x"], "output": ["y"], "pipeline": ["Step 1: use backbone_model"]}]}'
|
|
110
|
+
|
|
111
|
+
result = build_profile_aware_materialization(
|
|
112
|
+
_idea("computational_algorithmic"),
|
|
113
|
+
"algorithmic topic",
|
|
114
|
+
prompts={},
|
|
115
|
+
chat_fn=mock_chat,
|
|
116
|
+
model="mock",
|
|
117
|
+
logger=type("Logger", (), {"warning": lambda self, *args: None})(),
|
|
118
|
+
)
|
|
119
|
+
assert result["profile_id"] == "computational_algorithmic"
|
|
120
|
+
assert result["legacy_algorithm"]
|
|
121
|
+
assert result["scientific_spec"]["spec_type"] == "algorithm_spec"
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def test_novelty_queries_include_claim_and_mechanism_context() -> None:
|
|
125
|
+
scorer = ComponentNoveltyScorer(vector_store=object())
|
|
126
|
+
queries = scorer._prepare_component_queries(
|
|
127
|
+
[{"component": "mediator", "explanation": "biological mediator"}],
|
|
128
|
+
{"core_contribution": "central causal hypothesis", "method": "measure endpoint"},
|
|
129
|
+
)
|
|
130
|
+
labels = {item["component"] for item in queries}
|
|
131
|
+
assert {"mediator", "central_hypothesis", "mechanism_or_relation"} <= labels
|
|
132
|
+
assert "causal_intervention_or_mediation" in PROFILE_NOVELTY_AXES["clinical_health"]
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def test_novelty_axes_are_restricted_to_current_profile() -> None:
|
|
136
|
+
scorer = ComponentNoveltyScorer(
|
|
137
|
+
vector_store=object(),
|
|
138
|
+
chat_fn=lambda *args, **kwargs: (
|
|
139
|
+
'{"rubric_score": 4, "novelty_axes": {'
|
|
140
|
+
'"causal_intervention_or_mediation": 4, '
|
|
141
|
+
'"unrelated_algorithm_axis": 5}}'
|
|
142
|
+
),
|
|
143
|
+
)
|
|
144
|
+
scorer._evaluate_with_llm(
|
|
145
|
+
topic="clinical topic",
|
|
146
|
+
idea_payload={
|
|
147
|
+
"scientific_intervention": {"profile_id": "clinical_health"},
|
|
148
|
+
},
|
|
149
|
+
components_with_explanations=[],
|
|
150
|
+
evidence_nodes=[],
|
|
151
|
+
)
|
|
152
|
+
assert scorer.last_novelty_axes == {"causal_intervention_or_mediation": 4.0}
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def test_main_evaluation_axes_are_restricted_to_current_profile() -> None:
|
|
156
|
+
payload = {
|
|
157
|
+
"novelty": 4,
|
|
158
|
+
"novelty_axes": {
|
|
159
|
+
"causal_intervention_or_mediation": 4,
|
|
160
|
+
"unrelated_algorithm_axis": 5,
|
|
161
|
+
},
|
|
162
|
+
}
|
|
163
|
+
evaluation = IdeaEvaluation.from_payload(payload, profile_id="clinical_health")
|
|
164
|
+
assert evaluation.novelty_axes == {
|
|
165
|
+
"causal_intervention_or_mediation": 4.0,
|
|
166
|
+
"scientific_novelty": 4.0,
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def test_profile_composite_uses_scientific_novelty_axes() -> None:
|
|
171
|
+
common = {
|
|
172
|
+
"novelty": 5,
|
|
173
|
+
"novelty_axes": {
|
|
174
|
+
"scientific_novelty": 2,
|
|
175
|
+
"relation_or_claim": 5,
|
|
176
|
+
"boundary_or_regime": 5,
|
|
177
|
+
},
|
|
178
|
+
"surprise": 3,
|
|
179
|
+
"feasibility": 4,
|
|
180
|
+
"clarity": 4,
|
|
181
|
+
"impact": 4,
|
|
182
|
+
"risk": 1,
|
|
183
|
+
"conciseness": 3,
|
|
184
|
+
"alignment_score": 4,
|
|
185
|
+
"complexity_penalty": 1,
|
|
186
|
+
"protocol_score": 4,
|
|
187
|
+
"explanatory_power": 5,
|
|
188
|
+
"identifiability": 5,
|
|
189
|
+
"boundary_calibration": 5,
|
|
190
|
+
"claim_overreach_penalty": 0,
|
|
191
|
+
}
|
|
192
|
+
clinical_payload = {
|
|
193
|
+
**common,
|
|
194
|
+
"novelty_axes": {
|
|
195
|
+
"causal_intervention_or_mediation": 2,
|
|
196
|
+
"population_or_endpoint_relation": 5,
|
|
197
|
+
"comparator_or_measurement_design": 5,
|
|
198
|
+
"safety_or_external_validity_boundary": 5,
|
|
199
|
+
},
|
|
200
|
+
}
|
|
201
|
+
cs_payload = {
|
|
202
|
+
**common,
|
|
203
|
+
"novelty_axes": {
|
|
204
|
+
"algorithmic_mechanism": 2,
|
|
205
|
+
"representation_or_inference": 5,
|
|
206
|
+
"training_or_execution_strategy": 5,
|
|
207
|
+
"protocol_or_resource_boundary": 5,
|
|
208
|
+
},
|
|
209
|
+
}
|
|
210
|
+
clinical = IdeaEvaluation.from_payload(
|
|
211
|
+
clinical_payload,
|
|
212
|
+
profile_id="clinical_health",
|
|
213
|
+
)
|
|
214
|
+
cs = IdeaEvaluation.from_payload(
|
|
215
|
+
cs_payload,
|
|
216
|
+
profile_id="computational_algorithmic",
|
|
217
|
+
)
|
|
218
|
+
assert clinical.composite != cs.composite
|
|
219
|
+
assert clinical.novelty_axes["population_or_endpoint_relation"] == 5
|