|
@@ -78,20 +78,22 @@ def test_factory_reads_nested_real_topic_and_does_not_double_prefix_digest() ->
|
|
|
assert config.enable_research_flow is False
|
|
assert config.enable_research_flow is False
|
|
|
|
|
|
|
|
|
|
|
|
|
-def test_common_planner_prompt_does_not_leak_phase_two_boundary() -> None:
|
|
|
|
|
|
|
+def test_phase_prompts_isolate_boundaries_and_expose_dynamic_phase_two_invariants() -> None:
|
|
|
factory = ScriptMissionFactory()
|
|
factory = ScriptMissionFactory()
|
|
|
assert "PHASE_TWO_CANDIDATE_PORTFOLIO_READY" not in PLANNER_PROMPT
|
|
assert "PHASE_TWO_CANDIDATE_PORTFOLIO_READY" not in PLANNER_PROMPT
|
|
|
assert "using the returned Direction Task ID as `parent_task_id`" in PLANNER_PROMPT
|
|
assert "using the returned Direction Task ID as `parent_task_id`" in PLANNER_PROMPT
|
|
|
assert "`PHASE_ONE_CAPABILITY_BOUNDARY` with no additional text" in PLANNER_PROMPT
|
|
assert "`PHASE_ONE_CAPABILITY_BOUNDARY` with no additional text" in PLANNER_PROMPT
|
|
|
phase_two = factory.build_phase_two_policy(_snapshot())
|
|
phase_two = factory.build_phase_two_policy(_snapshot())
|
|
|
assert "PHASE_TWO_CANDIDATE_PORTFOLIO_READY" in phase_two
|
|
assert "PHASE_TWO_CANDIDATE_PORTFOLIO_READY" in phase_two
|
|
|
- assert "CandidatePortfolio and Compose must use the exact parent" in phase_two
|
|
|
|
|
- assert "script-build://writes/paragraphs/<stable-selector>" in phase_two
|
|
|
|
|
- assert "script-build://writes/elements/<stable-selector>" in phase_two
|
|
|
|
|
- assert "Never copy scope_ref into write_scope" in phase_two
|
|
|
|
|
- assert "whole Structure accepted_decision_ref" in phase_two
|
|
|
|
|
- assert "whole artifact_ref unchanged into base_artifact_ref" in phase_two
|
|
|
|
|
- assert "must also include and adopt its covering" in phase_two
|
|
|
|
|
- assert "must partition that complete candidate list" in phase_two
|
|
|
|
|
- assert "candidate_decision_ids, adopted_decision_ids, and compose_order" in phase_two
|
|
|
|
|
|
|
+ assert "Create exactly one CandidatePortfolio as Root's Phase2 child" in phase_two
|
|
|
|
|
+ assert "Plan any number and order" in phase_two
|
|
|
|
|
+ assert "Every Phase2 contract has nonempty goal_ids" in phase_two
|
|
|
|
|
+ assert "pins the exact accepted Direction DecisionRef" in phase_two
|
|
|
|
|
+ assert "carry all Direction Goal IDs" in phase_two
|
|
|
|
|
+ assert "Paragraph-first exploration may use a null base" in phase_two
|
|
|
|
|
+ assert "only with a Structure covering its scope" in phase_two
|
|
|
|
|
+ assert "partitions their complete accepted candidate closure" in phase_two
|
|
|
|
|
+ assert "CandidatePortfolio and Compose write only script-build://writes" in phase_two
|
|
|
|
|
+ assert "paragraph writers stay below script-build://writes/paragraphs" in phase_two
|
|
|
|
|
+ assert "element writers below script-build://writes/elements" in phase_two
|
|
|
assert "derive a strategy reference" in PARAGRAPH_WORKER_PROMPT
|
|
assert "derive a strategy reference" in PARAGRAPH_WORKER_PROMPT
|