feat(detector): 扩展空字段检测到 L2 event_description / L1 scene_summary
断点续跑判据需要 L2/L1 层的 empty_field 检测。零 LLM 成本。
This commit is contained in:
@@ -42,8 +42,10 @@ def detect_issues(
|
||||
检查项:
|
||||
- L3: card 必填字段为空(frame_summary / visible_entities / ongoing_actions / spatial_layout)
|
||||
- L3: frame_path 对应文件不存在(需提供 frames_dir)
|
||||
- L2: event_description 为空
|
||||
- L2/L1: children 列表为空
|
||||
- L2: 相邻 clips 时间范围不连续(gap > 1秒)
|
||||
- L1: scene_summary 为空
|
||||
|
||||
参数:
|
||||
index: 待检测的 TreeIndex。
|
||||
@@ -55,6 +57,17 @@ def detect_issues(
|
||||
issues: list[NodeIssue] = []
|
||||
|
||||
for l1 in index.roots:
|
||||
# L1: scene_summary 不为空
|
||||
if not l1.card.scene_summary:
|
||||
issues.append(
|
||||
NodeIssue(
|
||||
node_id=l1.id,
|
||||
level=1,
|
||||
issue_type="empty_field",
|
||||
details="L1 节点字段为空: scene_summary",
|
||||
)
|
||||
)
|
||||
|
||||
# L1: children 不为空
|
||||
if not l1.children:
|
||||
issues.append(
|
||||
@@ -71,6 +84,17 @@ def detect_issues(
|
||||
_check_time_gaps(l1.children, issues)
|
||||
|
||||
for l2 in l1.children:
|
||||
# L2: event_description 不为空
|
||||
if not l2.card.event_description:
|
||||
issues.append(
|
||||
NodeIssue(
|
||||
node_id=l2.id,
|
||||
level=2,
|
||||
issue_type="empty_field",
|
||||
details="L2 节点字段为空: event_description",
|
||||
)
|
||||
)
|
||||
|
||||
# L2: children 不为空
|
||||
if not l2.children:
|
||||
issues.append(
|
||||
|
||||
Reference in New Issue
Block a user