feat: OpenMesh 基础平台与 MD/PDF 转换技能
- 后端: coworker 智能体框架, WS API, 文件上传, 附件处理 - 前端: Open WebUI, 文件全量走 upload API (含 MD/TXT/JSON 等文本类) - 技能: md-to-office (pandoc + wkhtmltopdf) - 修复: 上传文件路径丢失, Agent 搜索浪费, 输出文件跑到 uploads/ - 打包: PyInstaller one-dir, 预打包 pandoc/wkhtmltopdf/chromium
This commit is contained in:
34
tests/test_layered_corpora.py
Normal file
34
tests/test_layered_corpora.py
Normal file
@@ -0,0 +1,34 @@
|
||||
"""Schema, coverage, and production-tool parity for the layered security corpora."""
|
||||
from __future__ import annotations
|
||||
|
||||
from scripts.validate_layered_corpora import validate_all
|
||||
|
||||
|
||||
def test_layered_corpora_are_valid_and_meet_size_floors():
|
||||
summary = validate_all()
|
||||
assert summary["permission_gate.jsonl"]["rows"] >= 120
|
||||
assert summary["reviewer_actions.jsonl"]["rows"] >= 120
|
||||
assert summary["action_sequences.jsonl"]["rows"] >= 60
|
||||
assert summary["total"] >= 300
|
||||
|
||||
|
||||
def test_layered_corpora_have_balanced_decision_classes():
|
||||
summary = validate_all()
|
||||
assert set(summary["permission_gate.jsonl"]["labels"]) == {
|
||||
"allow_without_reviewer",
|
||||
"reviewer_eligible",
|
||||
"human_only",
|
||||
"hard_deny",
|
||||
}
|
||||
assert set(summary["reviewer_actions.jsonl"]["labels"]) == {"allow", "ask", "deny"}
|
||||
assert set(summary["action_sequences.jsonl"]["labels"]) == {"allow", "ask", "deny"}
|
||||
|
||||
|
||||
def test_layered_corpora_span_many_tools_and_tags():
|
||||
summary = validate_all()
|
||||
assert summary["permission_gate.jsonl"]["tools"] >= 30
|
||||
assert summary["reviewer_actions.jsonl"]["tools"] >= 45
|
||||
assert summary["action_sequences.jsonl"]["tools"] >= 40
|
||||
assert summary["permission_gate.jsonl"]["tags"] >= 50
|
||||
assert summary["reviewer_actions.jsonl"]["tags"] >= 50
|
||||
assert summary["action_sequences.jsonl"]["tags"] >= 35
|
||||
Reference in New Issue
Block a user