Consolidate agent harness course into 19 lessons

This commit is contained in:
Haoran
2026-08-04 02:25:40 +08:00
parent 2ad77cee19
commit b36dbcd84f
168 changed files with 6544 additions and 10400 deletions

View File

@@ -36,7 +36,7 @@ def run_lesson(script: Path, *args: str) -> str:
def test_workflow_runtime_resumes_from_journal(tmp_path: Path) -> None:
script = tmp_path / "code.py"
shutil.copy2(ROOT / "s20_workflow_runtime" / "code.py", script)
shutil.copy2(ROOT / "s18_workflow_runtime" / "code.py", script)
first = run_lesson(script)
resumed = run_lesson(script, "resume")
@@ -49,7 +49,7 @@ def test_workflow_runtime_resumes_from_journal(tmp_path: Path) -> None:
def test_workflow_runtime_rejects_unsafe_artifact_names() -> None:
workflow = load_lesson(
"workflow_name_test", ROOT / "s20_workflow_runtime" / "code.py"
"workflow_name_test", ROOT / "s18_workflow_runtime" / "code.py"
)
for name in ("../escape", "../../escape", "nested/name"):
@@ -61,7 +61,7 @@ def test_workflow_runtime_enforces_budget_and_shared_agent_cap(
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
) -> None:
workflow = load_lesson(
"workflow_limit_test", ROOT / "s20_workflow_runtime" / "code.py"
"workflow_limit_test", ROOT / "s18_workflow_runtime" / "code.py"
)
budget = workflow.Budget(total=1)
with pytest.raises(workflow.WorkflowInputError):
@@ -105,7 +105,7 @@ def test_workflow_runtime_enforces_budget_and_shared_agent_cap(
def test_workflow_runtime_rejects_corrupt_resume_journal(tmp_path: Path) -> None:
workflow = load_lesson(
"workflow_journal_test", ROOT / "s20_workflow_runtime" / "code.py"
"workflow_journal_test", ROOT / "s18_workflow_runtime" / "code.py"
)
run_id = "wf_corrupt_0001"
(tmp_path / f"{run_id}.journal.jsonl").write_text("{not-json}\n")