fix: preserve world-class submission directory context
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import argparse
|
||||
import html
|
||||
import json
|
||||
import shlex
|
||||
import shutil
|
||||
from datetime import date
|
||||
from pathlib import Path
|
||||
@@ -22,6 +23,10 @@ def rel_path(path: Path, root: Path) -> str:
|
||||
return str(path.resolve())
|
||||
|
||||
|
||||
def shell_path(path: Path, root: Path) -> str:
|
||||
return shlex.quote(rel_path(path, root))
|
||||
|
||||
|
||||
def write_json(path: Path, payload: dict[str, Any]) -> None:
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_text(json.dumps(payload, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
|
||||
@@ -338,8 +343,8 @@ def build_submission_kit(
|
||||
"files": files,
|
||||
"evidence_items": items,
|
||||
"commands": {
|
||||
"validate_intake": f"python3 scripts/yao.py world-class-intake . --submissions-dir {rel_path(output_dir, skill_dir)}",
|
||||
"refresh_ledger": f"python3 scripts/yao.py world-class-ledger . --submissions-dir {rel_path(output_dir, skill_dir)}",
|
||||
"validate_intake": f"python3 scripts/yao.py world-class-intake . --submissions-dir {shell_path(output_dir, skill_dir)}",
|
||||
"refresh_ledger": f"python3 scripts/yao.py world-class-ledger . --submissions-dir {shell_path(output_dir, skill_dir)}",
|
||||
"guard_claim": "python3 scripts/yao.py world-class-claim-guard .",
|
||||
},
|
||||
"safety": {
|
||||
|
||||
@@ -101,7 +101,10 @@ def build_operator_checklist(
|
||||
f"--evidence-key {shlex.quote(key)} --output-dir {shell_path(submission_path.parent, skill_dir)}"
|
||||
),
|
||||
"validate_intake": f"python3 scripts/yao.py world-class-intake . --submissions-dir {submissions_dir_arg}",
|
||||
"refresh_ledger": "python3 scripts/yao.py world-class-ledger .",
|
||||
"submission_review": (
|
||||
f"python3 scripts/yao.py world-class-submission-review . --submissions-dir {submissions_dir_arg}"
|
||||
),
|
||||
"refresh_ledger": f"python3 scripts/yao.py world-class-ledger . --submissions-dir {submissions_dir_arg}",
|
||||
"guard_claim": "python3 scripts/yao.py world-class-claim-guard .",
|
||||
},
|
||||
"must_collect": {
|
||||
@@ -255,7 +258,7 @@ def render_operator_checklist(items: list[dict[str, Any]]) -> list[str]:
|
||||
lines.append(f"- submission: `{item['submission_path']}`")
|
||||
lines.extend(["", "#### Commands", ""])
|
||||
commands = item.get("commands", {})
|
||||
for label in ["prepare_submission", "validate_intake", "refresh_ledger", "guard_claim"]:
|
||||
for label in ["prepare_submission", "validate_intake", "submission_review", "refresh_ledger", "guard_claim"]:
|
||||
if commands.get(label):
|
||||
lines.append(f"- {label}: `{commands[label]}`")
|
||||
must_collect = item.get("must_collect", {})
|
||||
|
||||
@@ -62,7 +62,7 @@ def build_runbook_item(
|
||||
"commands": {
|
||||
"prepare_submission": commands.get("prepare_submission", ""),
|
||||
"validate_intake": commands.get("validate_intake", ""),
|
||||
"review_queue": "python3 scripts/yao.py world-class-submission-review . --submissions-dir evidence/world_class/submissions",
|
||||
"review_queue": commands.get("submission_review", ""),
|
||||
"refresh_ledger": commands.get("refresh_ledger", "python3 scripts/yao.py world-class-ledger ."),
|
||||
"guard_claim": commands.get("guard_claim", "python3 scripts/yao.py world-class-claim-guard ."),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user