Skip to content

Reverse-engineer any video, shot by shot: filmed, AI-generated or coded, and how to remake it. Breakdowns in the open VIDEO.md format. 逆向一切视频,逐个镜头看是拍的、AI 生成的还是代码做的,再告诉你怎么复刻;拆解结果按 VIDEO.md 格式输出。

复核任务包和摘要更省 token:每镜只看一张联系表,答案模板只给实拍镜头留打光字段,重复的待确认说明编号只写一次;breakdown.json 去缩进;补充游戏画面、动态漫、素材库空镜的判断说明

june18895c574750
diff --git a/rea_video/aspects/__init__.py b/rea_video/aspects/__init__.py
index 8a0beb8..d194d06 100644
--- a/rea_video/aspects/__init__.py
+++ b/rea_video/aspects/__init__.py
@@ -140,9 +140,15 @@ def check(gt: dict, b: dict) -> dict[str, bool]:
return out
-def shot_text(r: dict) -> str:
+def shot_text(r: dict, brief: bool = False) -> str:
+ """brief=True: shot size, camera, lighting setup only (the per-shot line of `rea-video summary`;
+ key direction / ratio / softness are in the whole-video lines and in report.md)."""
asp = r.get("aspects") or {}
fr, cam, li = ((asp.get(k) or {}).get("result") or {} for k in ("framing", "camera", "lighting"))
+ if brief:
+ support = cam.get("support_zh") or ""
+ return semi().join(p for p in (fr.get("shot_size"), fr.get("camera_angle"), support.split("(")[0].split(" (")[0],
+ li.get("setup_name")) if p)
parts = [fr.get("shot_size"), fr.get("camera_angle"), cam.get("support_zh"),
li.get("setup_name"), li.get("key_direction") and T("主光{k}", "key light {k}", k=li["key_direction"]),
li.get("ratio") and T("光比{r}", "lighting ratio {r}", r=li["ratio"]), li.get("quality")]
diff --git a/rea_video/cli.py b/rea_video/cli.py
index 2e4358f..deda90d 100644
--- a/rea_video/cli.py
+++ b/rea_video/cli.py
@@ -76,10 +76,12 @@ def cmd_review(args) -> int:
b = read_json(out / "breakdown.json")
set_lang(b.get("lang", "zh"))
tasks, answers = build_tasks(b, str(out))
- (out / "review_tasks.json").write_text(json.dumps(tasks, ensure_ascii=False, indent=2), encoding="utf-8")
+ from .util import dumps_rows
+
+ (out / "review_tasks.json").write_text(dumps_rows(tasks), encoding="utf-8")
ans_path = out / "review_answers.json"
if args.force or not ans_path.is_file():
- ans_path.write_text(json.dumps(answers, ensure_ascii=False, indent=2), encoding="utf-8")
+ ans_path.write_text(dumps_rows(answers), encoding="utf-8")
high = [s for s in tasks["shots"] if s["priority"] == "high"]
print(f"{len(tasks['shots'])} 个镜头待看图复核,其中 {len(high)} 个优先:" + ", ".join(f"{s['id']}({'; '.join(s['why'])})" for s in high))
print(f"说明和图片路径:{out / 'review_tasks.json'}")
@@ -104,6 +106,8 @@ def cmd_apply_review(args) -> int:
b = finalize(b, out)
for p in log["problems"]:
print(f"跳过 {p}")
+ if log.get("unanswered"):
+ print(f"没作答、已跳过 {len(log['unanswered'])} 个镜头")
changed = [(r["id"], log["before"][r["id"]], r["base"]["label"]) for r in b["shots"]
if r["id"] in log["before"] and log["before"][r["id"]] != r["base"]["label"]]
print(f"已并入 {len(log['applied'])}/{len(b['shots'])} 个镜头;改判 {len(changed)} 个" +
@@ -269,6 +273,19 @@ def cmd_summary(args) -> int:
from .memory import hint_for, patterns
pats = patterns()
+ low_n = sum(r["base"]["confidence"] < 0.6 for r in b["shots"])
+ mark_low = low_n <= len(b["shots"]) / 2 # when most shots are low, one line says so instead of a tag on every row
+ if not mark_low:
+ sure = [str(r["index"]) for r in b["shots"] if r["base"]["confidence"] >= 0.6]
+ lines.append(T("低置信: {n}/{m} 镜置信度 <0.6,都要复核", "Low confidence: {n}/{m} shots below 0.6, review them all", n=low_n, m=len(b["shots"]))
+ + (T("(只有 #{s} 不用)", " (all but #{s})", s=",".join(sure)) if sure else ""))
+ notes: list[str] = [] # the same "待确认" sentence repeats across shots: number it, print each once below the table
+
+ def note_ref(text: str) -> str:
+ if text not in notes:
+ notes.append(text)
+ return T("待确认{i}", "open question {i}", i="①②③④⑤⑥⑦⑧⑨⑩"[notes.index(text)] if notes.index(text) < 10 else f"({notes.index(text) + 1})")
+
for r in b["shots"]:
base = r["base"]
alt = sorted(base["probs"].items(), key=lambda kv: -kv[1])[1]
@@ -278,15 +295,17 @@ def cmd_summary(args) -> int:
second = T("(用户纠正)", "(user correction)") if base["decided_by"] == "user" else T("(次选 {l} {p:.2f})", "(runner-up {l} {p:.2f})", l=alt[0], p=alt[1])
lines.append(f"#{r['index']:>2} {r['start']:7.2f}-{r['end']:7.2f} {base['label']:<14} {base['confidence']:.2f} {second} "
f"| {T('素材', 'material')}:{mat} | {T('叠加', 'overlays')}:{','.join(sorted({l['kind'] for l in r.get('layers', [])})) or '-'} | {r['features'].get('camera')}"
- + (T(" ← 低置信,需要复核", " ← low confidence, review it") if base["confidence"] < 0.6 else "")
- + (f" ← {base['uncertain']}" if base.get("uncertain") else "")
+ + (T(" ← 低置信,需要复核", " ← low confidence, review it") if mark_low and base["confidence"] < 0.6 else "")
+ + (f" ← {note_ref(base['uncertain'])}" if base.get("uncertain") else "")
+ (T(" ← 有分歧:{d}", " ← disputed: {d}", d=base["disputed"]) if base.get("disputed") else "")
+ (T(" ← 用户纠正过素材来源", " ← material origin corrected by the user") if (r.get("material") or {}).get("user_corrected") else "")
+ (f" ← {past}" if past else "")
- + (f" | {shot_text(r)}" if r["base"]["label"] in ("live_action", "avatar") and shot_text(r) else "")
+ + (f" | {shot_text(r, brief=True)}" if r["base"]["label"] in ("live_action", "avatar") and shot_text(r, brief=True) else "")
+ (T(" | 动效 {n} 个,元素截图 {f}", " | {n} motion events, element crops {f}", n=len(r["motion"].get("events", [])),
f=r["motion"]["elements_sheet"]) if r["base"]["label"] in ("code_render", "screen_capture")
and (r.get("motion") or {}).get("elements_sheet") else ""))
+ if notes:
+ lines += [f"{note_ref(n)}: {n}" for n in notes]
if s.get("aspects"):
lines += [""] + s["aspects"]
from .entities import cast
diff --git a/rea_video/pipeline.py b/rea_video/pipeline.py
index 0310944..c7b8141 100644
--- a/rea_video/pipeline.py
+++ b/rea_video/pipeline.py
@@ -770,7 +770,7 @@ def finalize(breakdown: dict, out: Path, engine: str | None = None) -> dict:
breakdown["production_plan"] = production_plan(breakdown, out, engine=engine)
summary["production"] = breakdown["production_plan"]["summary"]
breakdown["summary"] = summary
- write_json(out / "breakdown.json", breakdown)
+ write_json(out / "breakdown.json", breakdown, compact=True)
from .report import write_reports
write_reports(breakdown, out)
diff --git a/rea_video/review.py b/rea_video/review.py
index b1d9407..79ab270 100644
--- a/rea_video/review.py
+++ b/rea_video/review.py
@@ -12,6 +12,7 @@ from .classify import LABEL_ZH, LABELS, top
from . import aspects
from .vlm import SHOT_PROMPT, shot_hints
+SHOOT_LIKE = ("live_action", "avatar", "stop_motion", "film_footage") # shots where "how was it shot / lit" applies
AGENT_WEIGHT = 0.85 # agent answers are softened toward uniform before fusion
IMAGE_SOURCES = ("ai_image", "photo", "graphic", "screenshot", "unknown")
EDIT_KINDS = ("face_swap", "lip_sync", "restyle", "outfit_swap", "bg_replace", "object_edit", "beautify")
@@ -27,12 +28,13 @@ INSTRUCTIONS = f"""你是这次的 VLM:逐个镜头看图,判断「底层画
把你的判断并入结论(会重写 breakdown.json、report.md、report.html)。
怎么看:
-1. 先看 storyboard.jpg 建立整体印象;每个镜头看 images 里的 sheet(首/中/尾联系表),需要时运行 zoom_cmd 抽帧细看。
+1. 先看 storyboard.jpg 建立整体印象;每个镜头看 images 里的 sheet(首/中/尾联系表,一张就够,不用另开首尾帧)。
+ 要细看时运行顶层的 zoom_cmd,把 {{start}} {{end}} {{id}} 换成该镜头的值。
2. priority=high 的镜头(低置信、次选接近、转码后实拍/AI 待确认)一定要看;其余镜头也尽量都答。
3. 只依据画面证据,独立判断(这里不给 VLM 的答案,它会在融合时单独计入)。tool 一栏是确定性取证的结果,可能有误,但帧率类证据(24→30 重复帧)和 AIGC 标识可靠,
和画面印象冲突时不要轻易推翻(见 SKILL.md「平台转码视频」)。
4. 看不出就把概率分散开,例如 ai_video 0.55 / live_action 0.45,并在 evidence 写清缺什么证据。
-5. 没看过的镜头不要填(保持 label_probs 全 0),apply-review 会跳过它。
+5. 没看过的镜头不要填(label_probs 保持 {{}}),apply-review 会跳过它。
{LABEL_GUIDE}
@@ -50,6 +52,7 @@ video_prompt(复刻该镜头的中文视频提示词:写清动作过程和
实拍/写实镜头再填 aspects(怎么拍、怎么打光;纯图形/界面画面不填),像素测不出的部分靠你看:
{ASPECT_GUIDE}
+答案模板只给可能是实拍的镜头预留了 aspects;别的镜头你判成实拍时,照顶层 shot_aspects_template 的结构加上。
工具已经测了景别、主体光比、主光左右/上下、软硬、色温、背景虚化(见每镜 aspects),你主要补:机位角度、
拍摄方式(自拍/支架)、主光是什么光源、眼神光、轮廓光/背景灯、画面里可见的光源;和测量冲突时写明依据。
最后在答案顶层的 aspects 里写整片:机位/场景、推测设备、整体布光、剪辑手法、视频形式。
@@ -107,17 +110,19 @@ def build_tasks(breakdown: dict, out_dir: str) -> tuple[dict, dict]:
past = hint_for(dl, pats)
if past:
prio, why = "high", why + [past]
+ shoot_like = any(l in SHOOT_LIKE for l, _ in ranked[:2])
shots.append({
"id": rec["id"], "index": rec["index"], "start": rec["start"], "end": rec["end"], "duration": rec["duration"],
"priority": prio, "why": why,
"tool": {"label": dl, "label_zh": LABEL_ZH[dl], "confidence": round(dp, 3),
"second": [alt[0][0], round(alt[0][1], 3)] if alt else None,
"evidence": rec["deterministic"]["evidence"][:6]},
- "hints": shot_hints(rec["features"], rec["deterministic"]["facts"], dl, dp),
- "aspects": {k: v["result"] for k, v in (rec.get("aspects") or {}).items() if v.get("result")},
- "images": {"sheet": rec["assets"]["sheet"], "first": rec["assets"]["first_frame"], "last": rec["assets"]["last_frame"],
- **({"strip": rec["assets"]["strip"]} if rec["assets"].get("strip") else {})},
- "zoom_cmd": _tiles_cmd(video, rec["start"], rec["end"], 0.2, f"{out_dir}/check_{rec['id']}.jpg"),
+ # the tool's top label is already in "tool"; drop it from the raw hints
+ "hints": shot_hints(rec["features"], rec["deterministic"]["facts"], dl, dp).split("; 确定性初判=")[0],
+ **({"aspects": {k: v["result"] for k, v in (rec.get("aspects") or {}).items() if v.get("result")}} if shoot_like else {}),
+ # the sheet already holds first / middle / last; separate first / last frames would triple the image tokens
+ "images": {"sheet": rec["assets"]["sheet"], **({"strip": rec["assets"]["strip"]} if rec["assets"].get("strip") else {})},
+ "_shoot_like": shoot_like,
})
pack = breakdown.get("packaging") or {}
pk_tasks, pk_answers = None, None
@@ -132,17 +137,21 @@ def build_tasks(breakdown: dict, out_dir: str) -> tuple[dict, dict]:
for c in txt[:80]]}
pk_answers = {"stickers": [{"id": st["id"], "is_overlay": None, "what": ""} for st in sts],
"text": [{"id": c["id"], "kind": ""} for c in txt[:80]], "missed": []}
+ shoot = {s["id"]: s.pop("_shoot_like") for s in shots}
tasks = {"instructions": INSTRUCTIONS, "video": video, "storyboard": "storyboard.jpg",
+ "zoom_cmd": _tiles_cmd(video, 0, 0, 0.2, f"{out_dir}/check_ID.jpg")
+ .replace("--start 0.00 --end 0.00", "--start {start} --end {end}").replace("check_ID.jpg", "check_{id}.jpg"),
+ "shot_aspects_template": aspects.review_template(),
"video_context": {k: ctx.get(k) for k in ("transcoded", "platform", "native30", "film_hint_share") if k in ctx},
"aigc": (breakdown.get("provenance") or {}).get("aigc"),
"shots": shots}
if pk_tasks:
tasks["packaging"] = pk_tasks
answers = {"by": "", "shots": [{"id": s["id"], "time": f"{s['start']:.2f}-{s['end']:.2f}",
- "label_probs": {k: 0 for k in LABELS}, "image_source": "unknown",
+ "label_probs": {}, "image_source": "unknown",
"evidence": [], "description": "", "embedded_assets": [], "ai_edits": [],
"replication": {"image_prompt": "", "video_prompt": "", "video_prompt_en": ""},
- "aspects": aspects.review_template()} for s in shots],
+ **({"aspects": aspects.review_template()} if shoot[s["id"]] else {})} for s in shots],
"aspects": aspects.review_template(video=True),
"cast": {"style": "", "characters": [{"id": "A", "name": "", "kind": "", "look": "", "role": "", "voice": "", "shots": []}],
"scenes": [{"id": "S1", "where": "", "when": "", "look": "", "shots": []}], "props": [{"name": "", "note": "", "shots": []}]}}
@@ -208,9 +217,12 @@ def apply_answers(breakdown: dict, answers: dict, by: str | None = None) -> dict
"""Store answers on the shots (rec["review"]) and return a change log. Call finalize() afterwards."""
by = by or answers.get("by") or "agent"
recs = {r["id"]: r for r in breakdown["shots"]}
- applied, problems, changes = [], [], []
+ applied, problems, changes, unanswered = [], [], [], []
for ans in answers.get("shots") or []:
sid = ans.get("id")
+ if sid in recs and not any((ans.get("label_probs") or {}).values()):
+ unanswered.append(sid) # left blank on purpose: listed once, not as a problem per shot
+ continue
if sid not in recs:
problems.append(f"{sid}: 没有这个镜头")
continue
@@ -244,4 +256,4 @@ def apply_answers(breakdown: dict, answers: dict, by: str | None = None) -> dict
breakdown["review_cast"] = cast
breakdown.setdefault("analysis", {})["review"] = {"by": by, "shots": len(applied), "of": len(breakdown["shots"]),
"time": time.strftime("%Y-%m-%d %H:%M"), "problems": problems}
- return {"applied": applied, "problems": problems, "before": dict(changes)}
+ return {"applied": applied, "problems": problems, "unanswered": unanswered, "before": dict(changes)}
diff --git a/rea_video/util.py b/rea_video/util.py
index d6cb6d8..b9d2c8a 100644
--- a/rea_video/util.py
+++ b/rea_video/util.py
@@ -17,13 +17,38 @@ def setup_logging(verbose: bool = False) -> None:
logging.basicConfig(level=level, format="%(asctime)s %(levelname)s %(message)s", datefmt="%H:%M:%S", stream=sys.stderr)
-def write_json(path: Path, data: Any) -> Path:
+def write_json(path: Path, data: Any, compact: bool = False) -> Path:
+ """compact=True: no indentation (about half the size; for large machine-read files like breakdown.json)."""
path = Path(path)
path.parent.mkdir(parents=True, exist_ok=True)
- path.write_text(json.dumps(data, ensure_ascii=False, indent=2, default=_json_default) + "\n", encoding="utf-8")
+ text = (json.dumps(data, ensure_ascii=False, separators=(",", ":"), default=_json_default) if compact
+ else json.dumps(data, ensure_ascii=False, indent=2, default=_json_default))
+ path.write_text(text + "\n", encoding="utf-8")
return path
+def dumps_rows(data: dict) -> str:
+ """JSON with one top-level key per line and every list item on its own line.
+
+ For files an agent reads or edits (review tasks / answers): one shot per line keeps them
+ grep-able and editable by id without the token cost of full indentation."""
+ def one(v):
+ return json.dumps(v, ensure_ascii=False, separators=(",", ":"), default=_json_default)
+
+ lines = []
+ for k, v in data.items():
+ if isinstance(v, list) and v:
+ body = ",\n".join(" " + one(x) for x in v)
+ lines.append(f"{one(k)}:[\n{body}\n]")
+ elif isinstance(v, dict) and any(isinstance(x, list) and x for x in v.values()):
+ lines.append(f"{one(k)}:{{\n" + ",\n".join(
+ f" {one(kk)}:[\n" + ",\n".join(" " + one(x) for x in vv) + "\n ]" if isinstance(vv, list) and vv else f" {one(kk)}:{one(vv)}"
+ for kk, vv in v.items()) + "\n}")
+ else:
+ lines.append(f"{one(k)}:{one(v)}")
+ return "{\n" + ",\n".join(lines) + "\n}\n"
+
+
def read_json(path: Path) -> Any:
return json.loads(Path(path).read_text(encoding="utf-8"))
diff --git a/skills/rea-video/SKILL.md b/skills/rea-video/SKILL.md
index ca55cf7..8b23b85 100644
--- a/skills/rea-video/SKILL.md
+++ b/skills/rea-video/SKILL.md
@@ -37,6 +37,8 @@ rea-video --env-file <你的 .env> decompose ref.mp4 -o out/ref --vlm --lang <zh
rea-video summary out/ref/breakdown.json
```
+**省 token**:结果以 `rea-video summary` 为准,不要整份读 `breakdown.json`(几十万字)或 `report.md`(附录占一半)。要某一节时先 `grep -n '^##' out/ref/report.md` 找行号,只读那一节;复核时每镜看 `shots/shot_XXX.jpg` 联系表就够(已含首 / 中 / 尾帧),`_first` / `_last` 是复刻时给生成模型参照用的,不用另开。
+
### 看图复核并入(能看图的 agent 必做,开了 VLM 也建议做低置信镜头)
```bash
@@ -47,7 +49,7 @@ rea-video apply-review out/ref --by <你的名字> # 并入:重写 breakdown.
rea-video summary out/ref/breakdown.json # 用并入后的结果写回复
```
-没看过的镜头保持 label_probs 全 0,会被跳过。你的答案会和确定性结果融合(不是直接覆盖),所以帧率、AIGC 标识这类强证据仍然起作用;如果并入后的结论和你的看法不同,在回复里写明理由。
+没看过的镜头 label_probs 留空 `{}`,会被跳过。你的答案会和确定性结果融合(不是直接覆盖),所以帧率、AIGC 标识这类强证据仍然起作用;如果并入后的结论和你的看法不同,在回复里写明理由。
融合规则、看不了图时怎么办、原片 / 转码视频的特殊规则,见 `references/review.md`。能看图时**一定要做看图复核**,开了 VLM 也要做,并且独立判断,不要照抄 VLM。
@@ -77,7 +79,7 @@ rea-video summary out/ref/breakdown.json # 用并入后的结果写回复
## 2. 交付给用户
-按 `references/output-template.md` 回复:先一句话结论,再内容与角色(这条视频讲什么、主要角色和场景),然后复刻方案(按生成单元 / 拍摄场次组织)、分镜表、剪辑包装、声音、真实素材清单、不确定点,最后给 `report.html` 路径。不要把 breakdown.json 整段贴进对话。
+按 `references/output-template.md` 回复:先一句话结论,再内容与角色(这条视频讲什么、主要角色和场景),然后复刻方案(按生成单元 / 拍摄场次组织)、分镜表、剪辑包装、声音、真实素材清单、不确定点,最后给 `report.html` 路径。不要把 breakdown.json 贴进对话。
**报告和回复都用用户的语言。**语言的判断顺序:用户明确指定的语言(「用英文出报告」「report in Chinese」)> 用户提问所用的语言 > `rea-video memory` 里的 `lang` 偏好 > 中文。
- 工具支持 `--lang zh` 和 `--lang en`:`decompose` 时就传对,报告文件(`report.html` / `report.md`)、`summary` 输出、VLM 的画面描述和提示词都会是该语言;忘了传可以在 `apply-review out/ref --lang en` 时补上(会重新生成结论和报告文字;VLM 已写好的描述和提示词保持原语言)。看图复核时,`review_answers.json` 里的 evidence / description / prompt 也用这个语言写。
diff --git a/skills/rea-video/references/materials.md b/skills/rea-video/references/materials.md
index 1d61355..3b46988 100644
--- a/skills/rea-video/references/materials.md
+++ b/skills/rea-video/references/materials.md
@@ -23,6 +23,12 @@
- 暗色主题网页截图:不是浅色面板,检测不到,要看画面里有没有浏览器或界面框。
- 实拍或 AI 画面里叠加的小 Logo、商品图:确定性层不在照片底图上做嵌入检测(容易误报),依赖 VLM。
+## 素材库空镜
+
+城市航拍、延时、风景、商务人物、手部特写这类和视频主体无关的实拍空镜,常是从素材网站买的,不是作者自己拍的。工具会把它们标成「实拍视频素材」。看图时在 `description` 写明「疑似素材库空镜」,交付时和作者自拍的素材分开列:复刻时到素材网站找同类即可,不用向用户要原片。
+
+影视片段(`film_footage`)同理:素材来自片方,交付时写「需要找原片对应片段,商用要授权」,不要写成用户自己的素材。
+
## 交付时的写法
逐条列出:镜头号、时间、素材类型、画面位置、内容描述,以及"复刻时需要你提供:……"。
diff --git a/skills/rea-video/references/taxonomy.md b/skills/rea-video/references/taxonomy.md
index 16793dd..6fc9dcd 100644
--- a/skills/rea-video/references/taxonomy.md
+++ b/skills/rea-video/references/taxonomy.md
@@ -115,6 +115,15 @@
- 解说类视频里如果插了作者自己的口播或 AI 画面,按镜头分别标。
- 工具只开像素时会把影视片段判成「AI 视频」或「实拍」并标出「待确认」,复核时要改判。
+**游戏画面 vs 3D 渲染 vs 录屏**
+- 游戏实况、游戏解说、游戏混剪:底层归 `screen_capture`(录的是屏幕上实时渲染的游戏),不是 `cg_3d`。看血条、小地图、准星、技能图标、伤害数字、聊天框这类 HUD。复刻是录游戏,`description` 写明游戏名(认得出时)、视角和 HUD 位置。
+- 游戏 CG 宣传片、过场动画:没有 HUD、镜头调度像电影,归 `cg_3d`。
+- 工具和 VLM 都可能把带 HUD 的游戏画面判成 3D 或录屏界面,复核时以 HUD 为准。
+
+**动态漫 / 漫剧 vs 2D 动画 vs AI 视频**
+- 静态漫画分格只做推拉摇移 → `still_motion`;分格上叠了眨眼、头发飘、嘴动这类局部动画 → `anim_2d`;线条在帧间游移、细节形变 → `ai_video`。
+- 漫剧常是 AI 图 + 局部动效,`image_source` 填 `ai_image` 还是手绘,看线条和手指等细节。
+
**静帧:AI 图 vs 真实照片 vs 渲染卡片**
- 渲染卡片(平涂、少色)→ 归为代码渲染。
- AI 图和真实照片在确定性层无法区分,交给 VLM;判断不了就写"图片素材(真实/AI 待确认)"。
diff --git a/tests/test_review.py b/tests/test_review.py
index a787c52..fa00dd1 100644
--- a/tests/test_review.py
+++ b/tests/test_review.py
@@ -14,7 +14,13 @@ def test_review_roundtrip_overrides_and_reports(media, tmp_path, capsys):
tasks = json.loads((out / "review_tasks.json").read_text(encoding="utf-8"))
assert tasks["shots"] and "label_probs" in tasks["instructions"]
assert (out / tasks["shots"][0]["images"]["sheet"]).is_file()
+ # lean task file: the sheet already holds first/last frames, zoom command is one template, rows are one line each
+ assert set(tasks["shots"][0]["images"]) <= {"sheet", "strip"}
+ assert "{start}" in tasks["zoom_cmd"] and "zoom_cmd" not in tasks["shots"][0]
+ assert all(line.startswith(" {\"id\"") for line in (out / "review_tasks.json").read_text(encoding="utf-8").splitlines()
+ if '"id":"shot_' in line and line.startswith(" "))
ans = json.loads((out / "review_answers.json").read_text(encoding="utf-8"))
+ assert all(a["label_probs"] == {} for a in ans["shots"])
first = ans["shots"][0]
ranked = sorted(b["shots"][0]["deterministic"]["probs"].items(), key=lambda kv: -kv[1])
second = ranked[1][0] # a lone reader may pick the tools' runner-up (but not a label they rule out)
@@ -34,7 +40,9 @@ def test_review_roundtrip_overrides_and_reports(media, tmp_path, capsys):
assert "tester 看图复核 1/" in b2["summary"]["vlm"]
md = (out / "report.md").read_text(encoding="utf-8")
assert "agent 看图融合" in md and "手持拍摄厨房台面" in md
- # unanswered shots (all-zero probs) are skipped, not applied
+ # unanswered shots (empty probs) are skipped silently: one count line, not one line per shot
+ assert ("没作答、已跳过" in printed) == (len(b2["shots"]) > 1) and "shot_002: label_probs" not in printed
+ # unanswered shots are not applied
assert all("review" not in r for r in b2["shots"][1:])
# a lone reader cannot push a code-render shot to live action: it is outside the tools' top two
if "live_action" not in (ranked[0][0], second):