|
|
@@ -35,9 +35,15 @@ from script_build_host.domain.artifacts import (
|
|
|
)
|
|
|
from script_build_host.domain.errors import PhaseTwoBoundaryNotReady
|
|
|
from script_build_host.domain.phase_two_artifacts import (
|
|
|
+ CandidateLineageV1,
|
|
|
CandidatePortfolioArtifactV1,
|
|
|
+ ElementSetArtifactV1,
|
|
|
GoalCoverage,
|
|
|
+ ParagraphArtifactV1,
|
|
|
+ ScriptElementV1,
|
|
|
+ ScriptParagraphElementLinkV1,
|
|
|
ScriptParagraphV1,
|
|
|
+ StructureArtifactV1,
|
|
|
StructuredScriptArtifactV1,
|
|
|
)
|
|
|
from script_build_host.domain.records import MissionBinding
|
|
|
@@ -58,6 +64,28 @@ SCOPE = "script-build://scopes/full"
|
|
|
WRITE = "script-build://writes/full"
|
|
|
|
|
|
|
|
|
+def _complete_paragraph() -> ScriptParagraphV1:
|
|
|
+ atom = ({"原子点": "反转", "维度": "开场", "维度类型": "主维度"},)
|
|
|
+ return ScriptParagraphV1(
|
|
|
+ 1,
|
|
|
+ 1,
|
|
|
+ 1,
|
|
|
+ None,
|
|
|
+ "opening",
|
|
|
+ {"scope": "opening"},
|
|
|
+ theme="具体反转",
|
|
|
+ form="对比",
|
|
|
+ function="吸引注意",
|
|
|
+ feeling="好奇",
|
|
|
+ theme_elements=atom,
|
|
|
+ form_elements=atom,
|
|
|
+ function_elements=atom,
|
|
|
+ feeling_elements=atom,
|
|
|
+ description="用可观察的细节推翻初始判断。",
|
|
|
+ full_description="大家以为问题来自天赋。但一个真实行动已经改变了结果。",
|
|
|
+ )
|
|
|
+
|
|
|
+
|
|
|
def _task(task_id: str, parent: str | None, kind: str, status: TaskStatus) -> TaskRecord:
|
|
|
return TaskRecord(
|
|
|
task_id=task_id,
|
|
|
@@ -276,15 +304,36 @@ async def _fixture() -> tuple[ScriptPhaseTwoBoundaryVerifier, TaskLedger]:
|
|
|
[],
|
|
|
)
|
|
|
}
|
|
|
- paragraph = ScriptParagraphV1(1, 1, 1, None, "opening", {}, description="done")
|
|
|
+ paragraph = _complete_paragraph()
|
|
|
+ element = ScriptElementV1(1, "可观察反转", "实质", "叙事证据")
|
|
|
+ link = ScriptParagraphElementLinkV1(1, 1)
|
|
|
+ lineage = CandidateLineageV1(
|
|
|
+ scope_ref=SCOPE,
|
|
|
+ input_snapshot_ref=f"script-build://inputs/{SNAPSHOT_ID}",
|
|
|
+ input_closure_digest=INPUT_DIGEST,
|
|
|
+ write_scope=("script-build://writes/paragraphs",),
|
|
|
+ goal_ids=("goal-1",),
|
|
|
+ )
|
|
|
structured = StructuredScriptArtifactV1(
|
|
|
"script-build://artifact-versions/9",
|
|
|
INPUT_DIGEST,
|
|
|
(paragraph,),
|
|
|
- (),
|
|
|
- (),
|
|
|
- ("script-build://artifact-versions/8",),
|
|
|
- (GoalCoverage("goal-1", ("script-build://artifact-versions/8",)),),
|
|
|
+ (element,),
|
|
|
+ (link,),
|
|
|
+ (
|
|
|
+ "script-build://artifact-versions/6",
|
|
|
+ "script-build://artifact-versions/7",
|
|
|
+ "script-build://artifact-versions/8",
|
|
|
+ ),
|
|
|
+ (
|
|
|
+ GoalCoverage(
|
|
|
+ "goal-1",
|
|
|
+ (
|
|
|
+ "script-build://artifact-versions/7",
|
|
|
+ "script-build://artifact-versions/8",
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
(),
|
|
|
(),
|
|
|
SCRIPT_DIGEST,
|
|
|
@@ -317,6 +366,42 @@ async def _fixture() -> tuple[ScriptPhaseTwoBoundaryVerifier, TaskLedger]:
|
|
|
evidence_refs=("script-build://artifact-versions/99",),
|
|
|
),
|
|
|
),
|
|
|
+ 6: _version(
|
|
|
+ 6,
|
|
|
+ "structure",
|
|
|
+ "attempt-structure",
|
|
|
+ ArtifactKind.STRUCTURE,
|
|
|
+ INPUT_DIGEST,
|
|
|
+ StructureArtifactV1(lineage, (paragraph,)),
|
|
|
+ ),
|
|
|
+ 7: _version(
|
|
|
+ 7,
|
|
|
+ "paragraph",
|
|
|
+ "attempt-paragraph",
|
|
|
+ ArtifactKind.PARAGRAPH,
|
|
|
+ INPUT_DIGEST,
|
|
|
+ ParagraphArtifactV1(
|
|
|
+ lineage,
|
|
|
+ (paragraph,),
|
|
|
+ (element,),
|
|
|
+ (link,),
|
|
|
+ {"created": {"paragraph_ids": [1]}},
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ 8: _version(
|
|
|
+ 8,
|
|
|
+ "elements",
|
|
|
+ "attempt-elements",
|
|
|
+ ArtifactKind.ELEMENT_SET,
|
|
|
+ INPUT_DIGEST,
|
|
|
+ ElementSetArtifactV1(
|
|
|
+ replace(lineage, write_scope=("script-build://writes/elements",)),
|
|
|
+ (element,),
|
|
|
+ (link,),
|
|
|
+ (paragraph,),
|
|
|
+ {"created": {"element_ids": [1]}},
|
|
|
+ ),
|
|
|
+ ),
|
|
|
}
|
|
|
)
|
|
|
contracts = _Contracts(
|