Remove suffix-based stage2 escalation by default
This commit is contained in:
+6
-6
@@ -86,7 +86,7 @@ def test_scan_command_leaves_stage2_pending_by_default(tmp_path, monkeypatch) ->
|
||||
status="completed",
|
||||
command=("ffprobe", str(path)),
|
||||
exit_code=0,
|
||||
stdout_text='{"format":{"format_name":"mov,mp4,m4a,3gp,3g2,mj2","duration":"20.0"},"streams":[{"codec_type":"video"}]}',
|
||||
stdout_text='{"format":{"format_name":"mov,mp4,m4a,3gp,3g2,mj2","duration":"N/A"},"streams":[{"codec_type":"video"}]}',
|
||||
stderr_text="",
|
||||
elapsed_ms=1,
|
||||
)
|
||||
@@ -120,7 +120,7 @@ def test_verify_stage2_command_runs_pending_stage2_files(tmp_path, monkeypatch)
|
||||
status="completed",
|
||||
command=("ffprobe", str(path)),
|
||||
exit_code=0,
|
||||
stdout_text='{"format":{"format_name":"mov,mp4,m4a,3gp,3g2,mj2","duration":"20.0"},"streams":[{"codec_type":"video"}]}',
|
||||
stdout_text='{"format":{"format_name":"mov,mp4,m4a,3gp,3g2,mj2","duration":"N/A"},"streams":[{"codec_type":"video"}]}',
|
||||
stderr_text="",
|
||||
elapsed_ms=1,
|
||||
)
|
||||
@@ -178,7 +178,7 @@ def test_scan_command_reports_discovery_and_stage1_progress(tmp_path, monkeypatc
|
||||
status="completed",
|
||||
command=("ffprobe", str(path)),
|
||||
exit_code=0,
|
||||
stdout_text='{"format":{"format_name":"mov,mp4,m4a,3gp,3g2,mj2","duration":"20.0"},"streams":[{"codec_type":"video"}]}',
|
||||
stdout_text='{"format":{"format_name":"mov,mp4,m4a,3gp,3g2,mj2","duration":"N/A"},"streams":[{"codec_type":"video"}]}',
|
||||
stderr_text="",
|
||||
elapsed_ms=1,
|
||||
)
|
||||
@@ -218,7 +218,7 @@ def test_verify_stage2_command_reports_heartbeat_while_waiting(tmp_path, monkeyp
|
||||
status="completed",
|
||||
command=("ffprobe", str(path)),
|
||||
exit_code=0,
|
||||
stdout_text='{"format":{"format_name":"mov,mp4,m4a,3gp,3g2,mj2","duration":"20.0"},"streams":[{"codec_type":"video"}]}',
|
||||
stdout_text='{"format":{"format_name":"mov,mp4,m4a,3gp,3g2,mj2","duration":"N/A"},"streams":[{"codec_type":"video"}]}',
|
||||
stderr_text="",
|
||||
elapsed_ms=1,
|
||||
)
|
||||
@@ -334,7 +334,7 @@ def test_scan_resume_does_not_reuse_previous_stage2_results(tmp_path, monkeypatc
|
||||
status="completed",
|
||||
command=("ffprobe", str(path)),
|
||||
exit_code=0,
|
||||
stdout_text='{"format":{"format_name":"mov,mp4,m4a,3gp,3g2,mj2","duration":"20.0"},"streams":[{"codec_type":"video"}]}',
|
||||
stdout_text='{"format":{"format_name":"mov,mp4,m4a,3gp,3g2,mj2","duration":"N/A"},"streams":[{"codec_type":"video"}]}',
|
||||
stderr_text="",
|
||||
elapsed_ms=1,
|
||||
)
|
||||
@@ -390,7 +390,7 @@ def test_scan_resume_does_not_reuse_previous_stage2_results(tmp_path, monkeypatc
|
||||
status="completed",
|
||||
command=("ffprobe", str(path)),
|
||||
exit_code=0,
|
||||
stdout_text='{"format":{"format_name":"mov,mp4,m4a,3gp,3g2,mj2","duration":"20.0"},"streams":[{"codec_type":"video"}]}',
|
||||
stdout_text='{"format":{"format_name":"mov,mp4,m4a,3gp,3g2,mj2","duration":"N/A"},"streams":[{"codec_type":"video"}]}',
|
||||
stderr_text="",
|
||||
elapsed_ms=1,
|
||||
)
|
||||
|
||||
@@ -32,7 +32,7 @@ def test_scan_reuses_previous_results_without_rerunning_probes(
|
||||
],
|
||||
)
|
||||
assert first_result.exit_code == 0
|
||||
assert "pending_stage2=1" in first_result.stdout
|
||||
assert "passed_stage1=1" in first_result.stdout
|
||||
|
||||
def fail_ffprobe(*args, **kwargs):
|
||||
raise AssertionError("run_ffprobe should not be called during resume")
|
||||
@@ -50,7 +50,7 @@ def test_scan_reuses_previous_results_without_rerunning_probes(
|
||||
)
|
||||
|
||||
assert second_result.exit_code == 0
|
||||
assert "pending_stage2=1" in second_result.stdout
|
||||
assert "passed_stage1=1" in second_result.stdout
|
||||
|
||||
|
||||
def _generate_test_video(path: Path, *, duration: int) -> None:
|
||||
|
||||
@@ -32,6 +32,8 @@ def test_verify_stage2_detects_truncated_mkv(tmp_path: Path) -> None:
|
||||
[
|
||||
"scan",
|
||||
str(root),
|
||||
"--profile",
|
||||
"deep-verify",
|
||||
"--db",
|
||||
str(db_path),
|
||||
],
|
||||
|
||||
@@ -9,7 +9,7 @@ def test_tg_hdd_profile_uses_conservative_defaults() -> None:
|
||||
assert profile.stage1_workers == 1
|
||||
assert profile.stage2_workers == 1
|
||||
assert profile.sample_duration == 3
|
||||
assert profile.high_risk_extensions == ("mp4", "mov", "m4v", "mkv", "webm")
|
||||
assert profile.high_risk_extensions == ()
|
||||
|
||||
|
||||
def test_default_extensions_cover_broad_common_video_formats() -> None:
|
||||
|
||||
Reference in New Issue
Block a user