feat(harness): validate.py — async 块序贯验证编排 + Probation 统一定义

This commit is contained in:
2026-07-07 13:20:43 -04:00
parent a6b816db94
commit 7bc6fc752c
3 changed files with 1220 additions and 25 deletions
+1 -25
View File
@@ -30,31 +30,7 @@ if TYPE_CHECKING:
CHECKPOINT_SCHEMA_VERSION = 1
# ---------------------------------------------------------------------------
# Probation 类型(Task 10 validate.py 尚未就绪,暂定义在此供 checkpoint 使用)
# Task 10 完成后迁移至 app/harness/validate.py 并改为 re-export。
# ---------------------------------------------------------------------------
@dataclass
class Probation:
"""一个题型的在途试用账本(每题型至多一个)。
属性:
task_type: 题型。
anchor_skills_version: 锚版本名(最近一个 CONFIRMED 的 skills 版本)。
target_file: 该题型解析后的 skill 文件名。
correctness_snapshot: 开账时该题型 val 题的对错快照(回滚时恢复)。
opened_step: 开账时的 global_step(观测用)。
pending_edits: 试用链上全部候选 edit 的黑名单素材(回滚时整链入黑名单)。
"""
task_type: str
anchor_skills_version: str
target_file: str
correctness_snapshot: dict[str, bool]
opened_step: int
pending_edits: list[RejectedEdit] = field(default_factory=list)
from app.harness.validate import Probation # noqa: E402
# ---------------------------------------------------------------------------