|
19 | 19 | load_resolution_store, |
20 | 20 | resolve_one_concept, |
21 | 21 | ) |
| 22 | +from autoresearch.prefill.decomposition_exploration import ( |
| 23 | + gate_decomposition_exploration, |
| 24 | +) |
22 | 25 | from autoresearch.prefill.orchestration_state import ( |
23 | 26 | OrchestrationCheckpoint, |
24 | 27 | ProofState, |
@@ -646,6 +649,7 @@ def run_architecture_v7_entry( |
646 | 649 | "move_family": ( |
647 | 650 | "MOVE_DIRECT", "MOVE_FALSIFY", "MOVE_REDUCE", |
648 | 651 | "MOVE_REFRAME", "MOVE_REGISTRY_EXPANSION", |
| 652 | + "MOVE_EXPLORE_SUBPROBLEMS", |
649 | 653 | ), |
650 | 654 | "theorem_tag": theorem_tags, |
651 | 655 | "evidence_ref": evidence_ids, |
@@ -801,11 +805,16 @@ def run_architecture_v7_entry( |
801 | 805 | "RESEARCH_CONTRACT_GATE" |
802 | 806 | if plan.plan_class |
803 | 807 | == PlanClass.DEFINITION_RESOLUTION_PLAN.value |
| 808 | + else "DECOMPOSITION_EXPLORATION" |
| 809 | + if plan.plan_class |
| 810 | + == PlanClass.DECOMPOSE_TO_SUBPROBLEMS.value |
804 | 811 | else "PROOF_SEARCH" |
805 | 812 | ), |
806 | 813 | "proof_search_allowed": ( |
807 | | - plan.plan_class |
808 | | - != PlanClass.DEFINITION_RESOLUTION_PLAN.value |
| 814 | + plan.plan_class not in { |
| 815 | + PlanClass.DEFINITION_RESOLUTION_PLAN.value, |
| 816 | + PlanClass.DECOMPOSE_TO_SUBPROBLEMS.value, |
| 817 | + } |
809 | 818 | ), |
810 | 819 | } |
811 | 820 | for plan in plans |
@@ -840,6 +849,41 @@ def run_architecture_v7_entry( |
840 | 849 | # Memo metadata, constrained intent, compiled plans, feasibility, selection, |
841 | 850 | # and the reachable artifact pointer become visible in one checkpoint swap. |
842 | 851 | save_checkpoint(checkpoint_path, checkpoint) |
| 852 | + selected = next( |
| 853 | + (plan for plan in plans if plan.plan_id == tournament.selected_plan_id), |
| 854 | + None, |
| 855 | + ) |
| 856 | + if ( |
| 857 | + selected is not None |
| 858 | + and selected.plan_class == PlanClass.DECOMPOSE_TO_SUBPROBLEMS.value |
| 859 | + ): |
| 860 | + exploration = gate_decomposition_exploration( |
| 861 | + selected, |
| 862 | + target_obligation_id=target_ref, |
| 863 | + target_context_hash=checkpoint.target_context_hash, |
| 864 | + proposition_hash=proposition_hash, |
| 865 | + evidence_refs=selected.evidence_refs, |
| 866 | + no_go_refs=selected.known_no_go_refs, |
| 867 | + theorem_card_ids=selected.theorem_card_ids, |
| 868 | + candidate_budget=selected.candidate_budget, |
| 869 | + ) |
| 870 | + checkpoint.exploration_contract_id = exploration.contract_id |
| 871 | + checkpoint.exploration_contract_hash = exploration.content_hash |
| 872 | + persist_validated_artifact( |
| 873 | + checkpoint_path, |
| 874 | + checkpoint, |
| 875 | + role="decomposition_exploration_contract", |
| 876 | + payload=asdict(exploration), |
| 877 | + dependencies=[tournament_ref.sha256], |
| 878 | + source_run_id=f"host:{event_id}:exploration-contract", |
| 879 | + ) |
| 880 | + checkpoint.transition( |
| 881 | + ProofState.DECOMPOSITION_EXPLORATION, |
| 882 | + "decomposition-exploration-contract-accepted", |
| 883 | + strategy_reused=False, |
| 884 | + ) |
| 885 | + save_checkpoint(checkpoint_path, checkpoint) |
| 886 | + return checkpoint |
843 | 887 | precontract_reasons = [] |
844 | 888 | if unresolved_definitions: |
845 | 889 | precontract_reasons.append("MISSING_DEFINITION") |
@@ -872,10 +916,6 @@ def run_architecture_v7_entry( |
872 | 916 | ) |
873 | 917 | save_checkpoint(checkpoint_path, checkpoint) |
874 | 918 | return checkpoint |
875 | | - selected = next( |
876 | | - (plan for plan in plans if plan.plan_id == tournament.selected_plan_id), |
877 | | - None, |
878 | | - ) |
879 | 919 | if selected is None: |
880 | 920 | checkpoint.research_contract_rejection_codes = [] |
881 | 921 | checkpoint.transition( |
|
0 commit comments