Skip to content

Open source CapCut alternative.

TypeScript

test(app): make korean-clip-overlay eval faithful, add single-fixture filter

David Le96aac8e2eb5b
diff --git a/apps/Donkey/Tests/DonkeyRuntimeTests/Fixtures/HarnessEval/korean-clip-overlay/scenario.json b/apps/Donkey/Tests/DonkeyRuntimeTests/Fixtures/HarnessEval/korean-clip-overlay/scenario.json
index 488c2a9a..6ea7d474 100644
--- a/apps/Donkey/Tests/DonkeyRuntimeTests/Fixtures/HarnessEval/korean-clip-overlay/scenario.json
+++ b/apps/Donkey/Tests/DonkeyRuntimeTests/Fixtures/HarnessEval/korean-clip-overlay/scenario.json
@@ -2,15 +2,17 @@
"frontmostApp": "Safari",
"maxSteps": 16,
"responses": [
- { "tool": "llm.generate", "summary": "Wrote subs.srt (Korean subtitles with timestamps).", "produces": ["subs.srt"] },
- { "tool": "shell_exec", "contains": ["yt-dlp"], "summary": "[download] 100% — clip.mp4 written (00:01:00, 1920x1080).", "produces": ["clip.mp4"] },
+ { "tool": "shell_exec", "contains": ["yt-dlp"], "summary": "[download] 100% of 12.50MiB\n~/Downloads/clip.mp4", "produces": ["~/Downloads/clip.mp4"] },
{ "tool": "shell_exec", "contains": ["ffprobe"], "summary": "duration=60.000000\nformat_name=mov,mp4,m4a,3gp,3g2,mj2" },
- { "tool": "shell_exec", "contains": ["ffmpeg", "subtitles"], "summary": "out.mp4 written with burned-in Korean subtitles.", "produces": ["out.mp4"] },
+ { "tool": "llm.generate", "summary": "Transcribed and translated to Korean → ~/Downloads/subs.srt", "produces": ["~/Downloads/subs.srt"] },
+ { "tool": "files.write", "summary": "Wrote ~/Downloads/subs.srt", "produces": ["~/Downloads/subs.srt"] },
+ { "tool": "shell_exec", "contains": ["ffmpeg", "subtitles"], "summary": "Burned Korean subtitles → ~/Downloads/out.mp4", "produces": ["~/Downloads/out.mp4"] },
{ "tool": "shell_exec", "contains": ["ffmpeg"], "summary": "ffmpeg: wrote output." }
],
"expect": {
"turnKind": "act",
"skills": ["media"],
- "shellAll": [["yt-dlp", "download-sections"]]
+ "shellAll": [["yt-dlp", "download-sections"], ["ffmpeg", "subtitles"]],
+ "completed": true
}
}
diff --git a/apps/Donkey/Tests/DonkeyRuntimeTests/HarnessPromptEval/HarnessEvalFixture.swift b/apps/Donkey/Tests/DonkeyRuntimeTests/HarnessPromptEval/HarnessEvalFixture.swift
index 7dca418e..dad4b908 100644
--- a/apps/Donkey/Tests/DonkeyRuntimeTests/HarnessPromptEval/HarnessEvalFixture.swift
+++ b/apps/Donkey/Tests/DonkeyRuntimeTests/HarnessPromptEval/HarnessEvalFixture.swift
@@ -123,7 +123,15 @@ struct HarnessEvalFixture: Sendable, CustomStringConvertible {
at: root,
includingPropertiesForKeys: [.isDirectoryKey]
)) ?? []
- return dirs.compactMap(load).sorted { $0.name < $1.name }
+ var fixtures = dirs.compactMap(load).sorted { $0.name < $1.name }
+ // Optional single-fixture focus: `DONKEY_EVAL_ONLY=korean-clip-overlay` runs just the fixtures whose
+ // name contains that substring, so one scenario can be exercised without the whole suite hitting the
+ // real model. Empty/unset runs everything.
+ if let only = ProcessInfo.processInfo.environment["DONKEY_EVAL_ONLY"]?
+ .trimmingCharacters(in: .whitespacesAndNewlines), !only.isEmpty {
+ fixtures = fixtures.filter { $0.name.localizedCaseInsensitiveContains(only) }
+ }
+ return fixtures
}
private static func load(_ dir: URL) -> HarnessEvalFixture? {