refactor: simplify distillation data layout

This commit is contained in:
Jerry
2026-07-27 17:40:16 +08:00
parent 8895178844
commit c8dbc51549
34 changed files with 132 additions and 7791 deletions
+7 -11
View File
@@ -241,15 +241,13 @@ def default_experience_library() -> Path | None:
configured = os.environ.get("CAD_EXPERIENCE_LIBRARY", "").strip()
if configured:
return Path(configured).expanduser()
workspace_candidate = (
published_candidate = (
SKILL_ROOT.parents[2]
/ "designir-pipeline"
/ "workspace"
/ "promotion"
/ "promoted"
/ "output"
/ "library.json"
)
return workspace_candidate if workspace_candidate.is_file() else None
return published_candidate if published_candidate.is_file() else None
def classify_edit_context(
@@ -265,20 +263,18 @@ def classify_edit_context(
(
SKILL_ROOT.parents[2]
/ "designir-pipeline"
/ "workspace"
/ "teacher"
/ "input"
).resolve(),
(
SKILL_ROOT.parents[2]
/ "designir-pipeline"
/ "workspace"
/ "acceptance"
/ "runs"
).resolve(),
]
if any(source == root or root in source.parents for root in protected_roots):
raise ValueError(
"cad-router reconstruction cannot read the teacher or acceptance "
"vault; pass the ingestion job reference or an editable DesignIR"
"cad-router reconstruction cannot read distillation input or run "
"artifacts; pass an editable DesignIR outside the private pipeline"
)
suffix = source.suffix.lower() if source else ""
text = request.lower()