check('失败验证阻止显示未生成导出链接', output['overall_state'] == 'failed' and output['export_link'] is None)
dashboard = '<!doctype html><meta charset="utf-8"><title>本地工作流检查</title><h1>工作流状态：failed</h1><table>' + ''.join('<tr><td>' + '</td><td>'.join(html.escape(str(row[key])) for key in ['step', 'state', 'artifact']) + '</td></tr>' for row in data['events']) + '</table><p>导出未执行，因此不提供下载链接。</p>'
(folder / 'workflow-dashboard.html').write_text(dashboard)
result = {'events': data['events'], 'overall_state': 'failed', 'export_link': None, 'model_notes': output}
