davinci-resolve-mcp 5.0.0 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,48 @@
2
2
 
3
3
  Release history for the DaVinci Resolve MCP Server. The latest release is summarized in the root README; older entries live here to keep the README focused.
4
4
 
5
+ ## What's New in v5.0.2 — A caller path that starts with "-" is no longer handed to a program as an option
6
+
7
+ Closes the gap the v5.0.0 notes left open under **Not changed**, reported with a reachability check in #350.
8
+
9
+ ### Security
10
+
11
+ - **Option-like paths are refused before a program is spawned (#350).** A caller path that is the bare operand of ffprobe, ffmpeg or whisper and starts with `-` was read as an option: ffprobe given a file named `-report` writes a log into its working folder before it notices there is no input. The Python server now refuses it with `OPTION_LIKE_PATH_REFUSED`, the same code the advanced server's `assertNotOption` returns. An absolute path, or one prefixed with `./`, still works. Guarded sites:
12
+ - the proxy compatibility check, on its own or in `link_proxy` (`_probe_media_file`), and the render and quick-export readbacks (`_ffprobe_media_summary`)
13
+ - `media_pool_item extract_frames`, for its `output_dir`
14
+ - media analysis's ffprobe pass, and the whisper CLI's input path
15
+ - `mix_plan`'s stem probes and its premix `output_path`
16
+ - `assess_grade` / `grade_loop`'s colour-transfer probe, which reports the transfer as unknown instead of spawning
17
+
18
+ The four sites named in v5.0.0 were joined by four more, found by sweeping every spawn under `src/` for a caller path in a positional slot.
19
+
20
+ ### Fixed
21
+
22
+ - **`edit_engine sound_density_audit` with `duration_seconds`.** The duration limit was inserted between `-i` and the media path, so `-t` became ffmpeg's input and the caller's path a bare output filename. Every call that set `duration_seconds` failed. The limit now goes before `-i`.
23
+
24
+ ### Not changed
25
+
26
+ - Covered by unit tests with mutation checks: each guard, reverted, fails its own test. Nothing was run against a live ffprobe, ffmpeg, whisper or Resolve.
27
+
28
+ ## What's New in v5.0.1 — Three more Resolve calls reported as broken in #336 are withdrawn
29
+
30
+ A ledger correction. No tool behavior changed.
31
+
32
+ ### Fixed
33
+
34
+ - **`TimelineItem.SetPosition` and `Timeline.MoveItems` are no longer recorded as broken (#336).** The reporter re-ran them on Studio 21.2.0.6 (Windows), on a timeline whose clips sit inside its own range. Both returned True and the clip moved. The entry keeps the earlier 21.1.2.10 reading (False for 0, 100, and -50) and says that no reported input on that build was at or after the timeline's start frame, so that build's answer to one is not known.
35
+ - **`TimelineItem.AddMarker` at relative frame 0 is no longer recorded as a silent failure (#336).** On 21.2.0.6 the marker was written and read back from `TimelineItem.GetMarkers()`. The earlier run read `Timeline.GetMarkers()`. The entry records both readbacks.
36
+ - **`TimelineItem.SetLeftOffset` is no longer recorded as destructive (#336).** It moves the clip's start and changes its source range, and it returned True for a start below the timeline's `StartFrame`. The runaway extension in the first report came from a clip outside the timeline's range and did not reproduce.
37
+ - **`MediaPool.AddToPhotoAlbum` stands**, with the 21.2.0.6 reading added: `None`, and the album stays empty.
38
+
39
+ ### Documentation
40
+
41
+ - `docs/reference/api-limitations.md` is regenerated. The Blackmagic report goes from 66 to 63 bugs.
42
+
43
+ ### Not changed
44
+
45
+ - Every reading in these entries is the reporter's. Nothing was re-measured against a live Resolve for this release. Withdrawn entries stay in `lookup_api_truth`, marked `WITHDRAWN`, so the correction is findable.
46
+
5
47
  ## What's New in v5.0.0 — A tool call can no longer run a command or choose the program the server spawns
6
48
 
7
49
  **A breaking security release.** It fixes two reports made through GitHub's private vulnerability reporting: [GHSA-x2fm-g3cm-6x5w](https://github.com/samuelgursky/davinci-resolve-mcp/security/advisories/GHSA-x2fm-g3cm-6x5w), reported by Artur Chlebicki (@Artur12555), and [GHSA-h2fm-rcfg-jch9](https://github.com/samuelgursky/davinci-resolve-mcp/security/advisories/GHSA-h2fm-rcfg-jch9), reported by @3099404236. Thank you both.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [简体中文](README.zh-CN.md)
4
4
 
5
- [![Version](https://img.shields.io/badge/version-5.0.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-5.0.2-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
6
6
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
7
7
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
8
8
  [![Tools](https://img.shields.io/badge/MCP%20Tools-37%20(390%20full)-blue.svg)](#server-modes)
package/README.zh-CN.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](README.md) | 简体中文
4
4
 
5
- [![Version](https://img.shields.io/badge/version-5.0.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-5.0.2-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
6
6
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
7
7
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
8
8
  [![Tools](https://img.shields.io/badge/MCP%20Tools-37%20(390%20full)-blue.svg)](#服务器模式)
@@ -12,7 +12,7 @@
12
12
  [![Python](https://img.shields.io/badge/python-3.10+-green.svg)](https://www.python.org/downloads/)
13
13
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
14
14
 
15
- > 本翻译对应 v5.0.0 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
15
+ > 本翻译对应 v5.0.2 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
16
16
 
17
17
  一个 Model Context Protocol (MCP) 服务器,让 AI 助手通过官方脚本 API 控制 DaVinci Resolve Studio(达芬奇)。它提供完整的 API 覆盖,外加带护栏的工作流助手,涵盖剪辑、媒体池整理、渲染设置、审阅标记、调色、Fusion、Fairlight、项目生命周期任务、扩展开发,以及不碰源媒体的媒体分析。
18
18
 
@@ -12,7 +12,7 @@ that none exists).
12
12
 
13
13
  **Verified on:** DaVinci Resolve Studio 21.0.2
14
14
 
15
- **Totals:** 43 missing capabilities, 66 bugs / unreliable behaviors.
15
+ **Totals:** 43 missing capabilities, 63 bugs / unreliable behaviors.
16
16
 
17
17
  The authoritative source is the runtime-queryable `api_truth` ledger
18
18
  (`resolve_control api_truth "<query>"`); this document is generated from
@@ -586,38 +586,11 @@ values, or automation-hostile modal prompts.
586
586
 
587
587
  - **Object:** `MediaPool`
588
588
  - **Signature:** `(clips) -> [MediaPoolItem]`
589
- - **Behavior:** On Studio 21.1.2.10 (Windows), re-measured by the reporter, AddToPhotoAlbum returned None and the album stayed at 0 photos across three argument forms. CreatePhotoAlbumFromPhotos returned an album with 2 photos in the same session and the same project. On Studio 19.1.3.7 (2026-11-01, dir() of the open project's MediaPool), AddToPhotoAlbum, CreateEmptyPhotoAlbum, CreatePhotoAlbumFromPhotos, and GetCurrentPhotoAlbum are absent.
590
- - **Workaround / current handling:** On 21.1.2, count the album's photos before and after and treat an unchanged count as failure. On 19.1.3.7 the methods are not there; do not call them.
589
+ - **Behavior:** On Studio 21.1.2.10 (Windows), re-measured by the reporter, AddToPhotoAlbum returned None and the album stayed at 0 photos across three argument forms. CreatePhotoAlbumFromPhotos returned an album with 2 photos in the same session and the same project. On Studio 21.2.0.6 (Windows) the reporter measured the same result: None, the album at 0 photos, and CreatePhotoAlbumFromPhotos placing one photo in the same session and project. On Studio 19.1.3.7 (2026-11-01, dir() of the open project's MediaPool), AddToPhotoAlbum, CreateEmptyPhotoAlbum, CreatePhotoAlbumFromPhotos, and GetCurrentPhotoAlbum are absent.
590
+ - **Workaround / current handling:** On 21.1.2 and 21.2.0, count the album's photos before and after and treat an unchanged count as failure. On 19.1.3.7 the methods are not there; do not call them.
591
591
  - **Reference:** [issue #336](https://github.com/samuelgursky/davinci-resolve-mcp/issues/336)
592
592
  - **Tags:** silent-failure, media-pool, missing-method
593
593
 
594
- ### TimelineItem.SetPosition / Timeline.MoveItems
595
-
596
- - **Object:** `TimelineItem / Timeline`
597
- - **Signature:** `SetPosition(...) -> bool; MoveItems(...) -> bool`
598
- - **Behavior:** On Studio 21.1.2.10 (Windows), re-measured by the reporter, TimelineItem.SetPosition returned False for 0, 100, and -50, and the clip start was unchanged. Timeline.MoveItems was not callable. The first report had both methods returning False across ints, floats, a no-op start, both moveLinkedItems values, and with or without subframePrecision, while Timeline.SetCurrentTimecode succeeded in that session. This server does not call either method. Not re-measured here.
599
- - **Workaround / current handling:** Do not treat False from SetPosition as a bad argument. On 21.1.2.10 it returned False for every input tried, and MoveItems was not callable. Move the clip in the Edit page.
600
- - **Reference:** [issue #336](https://github.com/samuelgursky/davinci-resolve-mcp/issues/336)
601
- - **Tags:** unreliable-return, timeline, edit
602
-
603
- ### TimelineItem.SetLeftOffset
604
-
605
- - **Object:** `TimelineItem`
606
- - **Signature:** `(offset, ...) -> bool`
607
- - **Behavior:** On Studio 21.1.2.10 (Windows), SetLeftOffset(5.0, False, True) on a clip at frame 400 with duration 120 returned True, moved the start to about -86000, and grew the duration to about 86515. Setting the offset back to 0 left the clip at about -86000. The call extends the clip from source media. It does not nudge the edit point, and the edit does not come back. The clip was at frame 400 on a timeline whose StartFrame was 86400, so it sat outside the timeline's declared range; the reporter did not re-run it, because the first call was destructive, and the entry stands as that readback. A live gap probe on an older build recorded SetLeftOffset as absent. This server only reads GetLeftOffset. Not re-measured here.
608
- - **Workaround / current handling:** Do not call SetLeftOffset to trim a handle. There is no API undo. Any future wrapper has to say that the call extends from source media and require an explicit confirm before it runs.
609
- - **Reference:** [issue #336](https://github.com/samuelgursky/davinci-resolve-mcp/issues/336)
610
- - **Tags:** silent-failure, timeline, edit, destructive
611
-
612
- ### TimelineItem.AddMarker at relative frame 0
613
-
614
- - **Object:** `TimelineItem`
615
- - **Signature:** `(frameId, color, name, note, duration, customData) -> bool`
616
- - **Behavior:** On Studio 21.1.2.10 (Windows), re-measured by the reporter with StartFrame 86400: Timeline.AddMarker(0) and Timeline.AddMarker(200) both returned True and the marker was present. TimelineItem.AddMarker(0) on the clip sitting at that StartFrame returned True and wrote nothing (GetMarkers count unchanged, the marker name absent). Same family as issue #34. The first filing recorded Timeline.AddMarker(0) returning False; that was the wrong object. This server already reports success false when AddMarker returns false. Not re-measured here.
617
- - **Workaround / current handling:** Read the marker back with GetMarkers. True from TimelineItem.AddMarker at relative frame 0 is not evidence the marker exists. Timeline.AddMarker at relative 0 did write the marker on this build.
618
- - **Reference:** [issue #336](https://github.com/samuelgursky/davinci-resolve-mcp/issues/336)
619
- - **Tags:** silent-failure, timeline, marker
620
-
621
594
  ### hasattr() / getattr() on Resolve API objects (attribute fabrication)
622
595
 
623
596
  - **Object:** `(all Resolve scripting objects)`
package/install.py CHANGED
@@ -37,7 +37,7 @@ from src.utils.update_check import (
37
37
 
38
38
  # ─── Version ──────────────────────────────────────────────────────────────────
39
39
 
40
- VERSION = "5.0.0"
40
+ VERSION = "5.0.2"
41
41
  # Only hard floor: mcp[cli] requires Python 3.10+. There is no upper bound —
42
42
  # Resolve's scripting bridge loads into newer interpreters on recent builds
43
43
  # (Python 3.14 verified against Resolve Studio 20.3.2). Older Resolve builds
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "davinci-resolve-mcp",
3
- "version": "5.0.0",
3
+ "version": "5.0.2",
4
4
  "description": "NPM bootstrapper for the DaVinci Resolve MCP Server.",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Gursky <samgursky@gmail.com>",
@@ -93,7 +93,7 @@ if not logging.getLogger().handlers:
93
93
  handlers=[logging.StreamHandler()],
94
94
  )
95
95
 
96
- VERSION = "5.0.0"
96
+ VERSION = "5.0.2"
97
97
  logger = logging.getLogger("davinci-resolve-mcp")
98
98
  logger.info(f"Starting DaVinci Resolve MCP Server v{VERSION}")
99
99
  logger.info(f"Detected platform: {get_platform()}")
package/src/server.py CHANGED
@@ -11,7 +11,7 @@ Usage:
11
11
  python src/server.py --full # Start the 377-tool granular server instead
12
12
  """
13
13
 
14
- VERSION = "5.0.0"
14
+ VERSION = "5.0.2"
15
15
 
16
16
  import base64
17
17
  import os
@@ -83,7 +83,7 @@ from src.utils.page_lock import (
83
83
  restoring_page as _restoring_page,
84
84
  page_lock as _page_lock,
85
85
  )
86
- from src.utils.proc import safe_run, windows_pid_alive
86
+ from src.utils.proc import OPTION_LIKE_PATH_REFUSED, option_like_path_error, safe_run, windows_pid_alive
87
87
  from src.utils.readback import verify_by_readback, verification_stats as _verification_stats
88
88
  from src.utils import operation_result as _operation_result
89
89
  from src.utils import operation_log as _operation_log
@@ -10382,6 +10382,11 @@ def _extract_clip_frames(clip, p: Dict[str, Any]) -> Dict[str, Any]:
10382
10382
  if not shutil.which("ffmpeg"):
10383
10383
  return _err("ffmpeg not found on PATH")
10384
10384
  out_dir = p.get("output_dir") or tempfile.mkdtemp(prefix="mcp_frames_")
10385
+ # Each frame path is ffmpeg's bare output operand, so a directory starting
10386
+ # with "-" would make it an option (#350).
10387
+ refused = option_like_path_error(out_dir, "output_dir")
10388
+ if refused:
10389
+ return _err(refused, code=OPTION_LIKE_PATH_REFUSED, category="invalid_input", retryable=False)
10385
10390
  try:
10386
10391
  os.makedirs(out_dir, exist_ok=True)
10387
10392
  except OSError as exc:
@@ -15343,6 +15348,9 @@ def _ffprobe_media_summary(path: str) -> Optional[Dict[str, Any]]:
15343
15348
  ffprobe = shutil.which("ffprobe")
15344
15349
  if not ffprobe:
15345
15350
  return None
15351
+ refused = option_like_path_error(path)
15352
+ if refused:
15353
+ return {"error": refused, "code": OPTION_LIKE_PATH_REFUSED}
15346
15354
  try:
15347
15355
  proc = subprocess.run(
15348
15356
  [ffprobe, "-v", "error", "-show_entries",
@@ -15383,6 +15391,9 @@ def _probe_media_file(path: str):
15383
15391
  "error": "ffprobe is not installed or not on PATH",
15384
15392
  "path": path,
15385
15393
  }
15394
+ refused = option_like_path_error(path)
15395
+ if refused:
15396
+ return {"success": False, "code": OPTION_LIKE_PATH_REFUSED, "error": refused, "path": path}
15386
15397
  try:
15387
15398
  proc = subprocess.run(
15388
15399
  [
@@ -1830,18 +1830,21 @@ API_TRUTH: List[Dict[str, Any]] = [
1830
1830
  "AddToPhotoAlbum returned None and the album stayed at 0 "
1831
1831
  "photos across three argument forms. CreatePhotoAlbumFromPhotos "
1832
1832
  "returned an album with 2 photos in the same session and the "
1833
- "same project. On Studio 19.1.3.7 "
1833
+ "same project. On Studio 21.2.0.6 (Windows) the reporter "
1834
+ "measured the same result: None, the album at 0 photos, and "
1835
+ "CreatePhotoAlbumFromPhotos placing one photo in the same "
1836
+ "session and project. On Studio 19.1.3.7 "
1834
1837
  "(2026-11-01, dir() of the open project's MediaPool), "
1835
1838
  "AddToPhotoAlbum, CreateEmptyPhotoAlbum, "
1836
1839
  "CreatePhotoAlbumFromPhotos, and GetCurrentPhotoAlbum are "
1837
1840
  "absent.",
1838
- "recommended": "On 21.1.2, count the album's photos before and after "
1839
- "and treat an unchanged count as failure. On 19.1.3.7 "
1840
- "the methods are not there; do not call them.",
1841
+ "recommended": "On 21.1.2 and 21.2.0, count the album's photos before "
1842
+ "and after and treat an unchanged count as failure. On "
1843
+ "19.1.3.7 the methods are not there; do not call them.",
1841
1844
  "tags": ["silent-failure", "media-pool", "missing-method"],
1842
1845
  "submit": "bug",
1843
1846
  "issue": 336,
1844
- "verified_on": "dir() on Studio 19.1.3.7; the None result is the reporter's re-measurement on 21.1.2.10 and was not re-measured here",
1847
+ "verified_on": "dir() on Studio 19.1.3.7; the None result is the reporter's measurement on 21.1.2.10 and 21.2.0.6 (Windows) and was not re-measured here",
1845
1848
  },
1846
1849
  {
1847
1850
  "symbol": "Timeline.ExportFrame",
@@ -1868,72 +1871,87 @@ API_TRUTH: List[Dict[str, Any]] = [
1868
1871
  "symbol": "TimelineItem.SetPosition / Timeline.MoveItems",
1869
1872
  "object": "TimelineItem / Timeline",
1870
1873
  "signature": "SetPosition(...) -> bool; MoveItems(...) -> bool",
1871
- "reality": "On Studio 21.1.2.10 (Windows), re-measured by the reporter, "
1872
- "TimelineItem.SetPosition returned False for 0, 100, and "
1873
- "-50, and the clip start was unchanged. Timeline.MoveItems "
1874
- "was not callable. The first report had both methods "
1875
- "returning False across ints, floats, a no-op start, both "
1876
- "moveLinkedItems values, and with or without "
1877
- "subframePrecision, while Timeline.SetCurrentTimecode "
1878
- "succeeded in that session. This server does not call "
1879
- "either method. Not re-measured here.",
1880
- "recommended": "Do not treat False from SetPosition as a bad argument. "
1881
- "On 21.1.2.10 it returned False for every input tried, "
1882
- "and MoveItems was not callable. Move the clip in the "
1883
- "Edit page.",
1884
- "tags": ["unreliable-return", "timeline", "edit"],
1885
- "submit": "bug",
1874
+ "reality": "WITHDRAWN. Re-measured by the reporter on Studio 21.2.0.6 "
1875
+ "(Windows) on a timeline at StartFrame 86400 and EndFrame "
1876
+ "86640, with two clips read back at 86400 and 86600: "
1877
+ "TimelineItem.SetPosition returned True and the clip moved "
1878
+ "from 86400 to 86800, and Timeline.MoveItems returned True "
1879
+ "and moved it to 87000. GetPosition() and GetStart() agreed "
1880
+ "both times. The earlier reading was on Studio 21.1.2.10: "
1881
+ "SetPosition returned False for 0, 100, and -50, and "
1882
+ "MoveItems was not callable. The first report on that build "
1883
+ "was measured on a timeline whose clips sat before "
1884
+ "StartFrame 86400, so StartFrame and EndFrame were both "
1885
+ "86400. No reported input on 21.1.2.10 was at or after "
1886
+ "frame 86400, so that build's answer to one is not known. "
1887
+ "This server does not call either method. Not re-measured "
1888
+ "here.",
1889
+ "recommended": "Pass a target at or after GetStartFrame() and read "
1890
+ "GetStart() back. False for a frame below StartFrame is "
1891
+ "not evidence the method is broken. See the recordFrame "
1892
+ "entry for the placement that built the first timeline.",
1893
+ "tags": ["timeline", "edit"],
1886
1894
  "issue": 336,
1887
- "verified_on": "Reported on DaVinci Resolve Studio 21.1.2.10 (Windows); not re-measured here",
1895
+ "verified_on": "Withdrawn on the reporter's re-measurement, Studio 21.2.0.6 (Windows); the 21.1.2.10 result was not repeated on a consistent timeline, and nothing was re-measured here",
1888
1896
  },
1889
1897
  {
1890
1898
  "symbol": "TimelineItem.SetLeftOffset",
1891
1899
  "object": "TimelineItem",
1892
1900
  "signature": "(offset, ...) -> bool",
1893
- "reality": "On Studio 21.1.2.10 (Windows), SetLeftOffset(5.0, False, "
1894
- "True) on a clip at frame 400 with duration 120 returned "
1895
- "True, moved the start to about -86000, and grew the "
1896
- "duration to about 86515. Setting the offset back to 0 "
1897
- "left the clip at about -86000. The call extends the clip "
1898
- "from source media. It does not nudge the edit point, and "
1899
- "the edit does not come back. The clip was at frame 400 on "
1900
- "a timeline whose StartFrame was 86400, so it sat outside "
1901
- "the timeline's declared range; the reporter did not re-run "
1902
- "it, because the first call was destructive, and the entry "
1903
- "stands as that readback. A live gap probe on an older "
1904
- "build recorded SetLeftOffset as absent. This server only "
1905
- "reads GetLeftOffset. Not re-measured here.",
1906
- "recommended": "Do not call SetLeftOffset to trim a handle. There is "
1907
- "no API undo. Any future wrapper has to say that the "
1908
- "call extends from source media and require an explicit "
1909
- "confirm before it runs.",
1910
- "tags": ["silent-failure", "timeline", "edit", "destructive"],
1911
- "submit": "bug",
1901
+ "reality": "SetLeftOffset moves the clip's start on the timeline and "
1902
+ "changes its source range. It is not a handle nudge that "
1903
+ "leaves the edit point in place. Measured by the reporter "
1904
+ "on Studio 21.2.0.6 (Windows), on a timeline at StartFrame "
1905
+ "86400: a clip at 86400 with source range 10-50 went to "
1906
+ "start 86395 and source start 5 on SetLeftOffset(5.0), and "
1907
+ "to start 86390 and source start 0 on SetLeftOffset(0.0). "
1908
+ "Both returned True. SetLeftOffset(-5.0) returned False. "
1909
+ "Both accepted calls left the clip's start below the "
1910
+ "timeline's StartFrame. The first report, on Studio "
1911
+ "21.1.2.10, had SetLeftOffset(5.0, False, True) moving a "
1912
+ "clip from frame 400 to about -86000 and growing it to "
1913
+ "about 86515 frames, with offset 0 not restoring it. That "
1914
+ "clip sat outside the timeline's declared range (frame 400, "
1915
+ "StartFrame 86400), and the result did not reproduce on a "
1916
+ "consistent timeline, so the call is not recorded as "
1917
+ "destructive. A live gap probe on an older build recorded "
1918
+ "SetLeftOffset as absent. This server only reads "
1919
+ "GetLeftOffset. Not re-measured here.",
1920
+ "recommended": "Expect SetLeftOffset to move the clip's start as well "
1921
+ "as its source in point, and read GetStart() and "
1922
+ "GetLeftOffset() back. Check the new start against "
1923
+ "GetStartFrame(): the call returned True for a start "
1924
+ "below it. See the recordFrame entry for what a clip "
1925
+ "outside the timeline's range does to later calls.",
1926
+ "tags": ["timeline", "edit", "trim"],
1912
1927
  "issue": 336,
1913
- "verified_on": "Reported on DaVinci Resolve Studio 21.1.2.10 (Windows); not re-measured here",
1928
+ "verified_on": "Narrowed on the reporter's re-measurement, Studio 21.2.0.6 (Windows); not re-measured here",
1914
1929
  },
1915
1930
  {
1916
1931
  "symbol": "TimelineItem.AddMarker at relative frame 0",
1917
1932
  "object": "TimelineItem",
1918
1933
  "signature": "(frameId, color, name, note, duration, customData) -> bool",
1919
- "reality": "On Studio 21.1.2.10 (Windows), re-measured by the reporter "
1920
- "with StartFrame 86400: Timeline.AddMarker(0) and "
1921
- "Timeline.AddMarker(200) both returned True and the marker "
1922
- "was present. TimelineItem.AddMarker(0) on the clip sitting "
1923
- "at that StartFrame returned True and wrote nothing "
1924
- "(GetMarkers count unchanged, the marker name absent). Same "
1925
- "family as issue #34. The first filing recorded "
1926
- "Timeline.AddMarker(0) returning False; that was the wrong "
1927
- "object. This server already reports success false when "
1928
- "AddMarker returns false. Not re-measured here.",
1929
- "recommended": "Read the marker back with GetMarkers. True from "
1930
- "TimelineItem.AddMarker at relative frame 0 is not "
1931
- "evidence the marker exists. Timeline.AddMarker at "
1932
- "relative 0 did write the marker on this build.",
1933
- "tags": ["silent-failure", "timeline", "marker"],
1934
- "submit": "bug",
1934
+ "reality": "WITHDRAWN. Re-measured by the reporter on Studio 21.2.0.6 "
1935
+ "(Windows), on a timeline at StartFrame 86400 and EndFrame "
1936
+ "86640: TimelineItem.AddMarker(0) on the clip sitting at "
1937
+ "StartFrame returned True, and TimelineItem.GetMarkers() "
1938
+ "showed the marker at key 0. A second marker at frame 5 "
1939
+ "landed as well. The earlier reading, on Studio 21.1.2.10, "
1940
+ "had the same call returning True with the marker absent; "
1941
+ "that readback was Timeline.GetMarkers(), and the 21.2.0.6 "
1942
+ "readback was TimelineItem.GetMarkers(). On 21.1.2.10 "
1943
+ "Timeline.AddMarker(0) and Timeline.AddMarker(200) both "
1944
+ "returned True and the marker was present. The first filing "
1945
+ "recorded Timeline.AddMarker(0) returning False; that was "
1946
+ "the wrong object. This server already reports success "
1947
+ "false when AddMarker returns false. Not re-measured here.",
1948
+ "recommended": "Read a clip marker back with TimelineItem.GetMarkers(), "
1949
+ "and a timeline marker with Timeline.GetMarkers(). On "
1950
+ "21.2.0.6 a clip marker at relative frame 0 was written "
1951
+ "and read back.",
1952
+ "tags": ["timeline", "marker"],
1935
1953
  "issue": 336,
1936
- "verified_on": "Reported on DaVinci Resolve Studio 21.1.2.10 (Windows); not re-measured here",
1954
+ "verified_on": "Withdrawn on the reporter's re-measurement, Studio 21.2.0.6 (Windows); not re-measured here",
1937
1955
  },
1938
1956
  {
1939
1957
  "symbol": "Media Pool folder rename",
@@ -53,6 +53,7 @@ except ImportError: # pragma: no cover - exercised on minimal installs
53
53
  _np = None
54
54
 
55
55
  from src.utils import colorimetry as _cm
56
+ from src.utils.proc import option_like_path_error
56
57
 
57
58
  #: Every public entry point calls `_require()` before touching numpy, so the
58
59
  #: internals below treat `_np` as present. Declared machine-readably rather
@@ -184,6 +185,10 @@ def _decode_frame(
184
185
  def _probe_color_transfer(path: str) -> Optional[str]:
185
186
  if not shutil.which("ffprobe"):
186
187
  return None
188
+ if option_like_path_error(path):
189
+ # Not spawned: ffprobe would read it as an option (#350). The transfer
190
+ # is then unknown, the same answer as ffprobe being absent.
191
+ return None
187
192
  args = [
188
193
  "ffprobe", "-v", "error", "-select_streams", "v:0",
189
194
  "-show_entries", "stream=color_transfer", "-of", "default=nw=1:nk=1", path,
@@ -31,6 +31,7 @@ from pathlib import Path
31
31
  from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple
32
32
 
33
33
  from src.utils import analysis_caps as _analysis_caps
34
+ from src.utils.proc import OPTION_LIKE_PATH_REFUSED, option_like_path_error
34
35
 
35
36
  # Caps preference reader — server.py registers a provider that reads the
36
37
  # media-analysis prefs file. Until then, the default preset is used.
@@ -2690,6 +2691,9 @@ def _parse_float(value: Any) -> Optional[float]:
2690
2691
 
2691
2692
 
2692
2693
  def _ffprobe(path: str) -> Dict[str, Any]:
2694
+ refused = option_like_path_error(path)
2695
+ if refused:
2696
+ return {"success": False, "code": OPTION_LIKE_PATH_REFUSED, "error": refused}
2693
2697
  code, stdout, stderr = _run_command([
2694
2698
  "ffprobe",
2695
2699
  "-v",
@@ -4277,6 +4281,11 @@ def _transcribe_with_whisper_cli(path: str, artifacts: Dict[str, Any], transcrip
4277
4281
  whisper = shutil.which("whisper")
4278
4282
  if not whisper:
4279
4283
  return {"success": False, "status": "skipped", "backend": "whisper_cli", "reason": "whisper CLI not found"}
4284
+ refused = option_like_path_error(path)
4285
+ if refused:
4286
+ # The path is whisper's bare first operand, so argparse would read it
4287
+ # as an option (#350).
4288
+ return {"success": False, "backend": "whisper_cli", "code": OPTION_LIKE_PATH_REFUSED, "error": refused}
4280
4289
  work_dir = os.path.join(os.path.dirname(artifacts.get("transcript_json") or artifacts["analysis_json"]), "transcript-work")
4281
4290
  os.makedirs(work_dir, exist_ok=True)
4282
4291
  # Default to capturing per-word timestamps so editor / word-snap features
@@ -57,6 +57,7 @@ import tempfile
57
57
  from typing import Any, Dict, List, Optional, Sequence, Tuple
58
58
 
59
59
  from . import delivery_targets, loudness_parse
60
+ from .proc import option_like_path_error
60
61
 
61
62
  try:
62
63
  import numpy as _np
@@ -179,6 +180,9 @@ def probe_duration(path: str) -> float:
179
180
  """Duration in seconds via ffprobe, or 0.0 when it cannot be read."""
180
181
  if not shutil.which("ffprobe"):
181
182
  raise MixPlanError("ffprobe is required to read stem durations")
183
+ refused = option_like_path_error(path, "stem path")
184
+ if refused:
185
+ raise MixPlanError(refused)
182
186
  code, stdout, _ = _run(
183
187
  ["ffprobe", "-v", "error", "-show_entries", "format=duration",
184
188
  "-of", "default=nw=1:nk=1", path]
@@ -382,6 +386,9 @@ def duck_envelope(
382
386
 
383
387
 
384
388
  def _write_wav(path: str, mix: "Any") -> str:
389
+ refused = option_like_path_error(path, "output_path")
390
+ if refused:
391
+ raise MixPlanError(refused)
385
392
  directory = os.path.dirname(os.path.abspath(path))
386
393
  if directory:
387
394
  os.makedirs(directory, exist_ok=True)
package/src/utils/proc.py CHANGED
@@ -8,10 +8,34 @@ than re-applied at every call site.
8
8
 
9
9
  ``windows_pid_alive`` lives here too: the Windows replacement for the
10
10
  ``os.kill(pid, 0)`` liveness probe, which on Windows terminates the process.
11
+
12
+ ``option_like_path_error`` is the Python twin of ``assertNotOption`` in
13
+ ``resolve-advanced/server/spawn-guard.mjs``. A caller path that lands in a
14
+ positional argv slot and starts with ``-`` is read by the child as an option:
15
+ ffprobe given ``-report`` writes a log into its working directory (#350).
16
+ Check it wherever a caller path is the bare operand of a spawned program.
11
17
  """
12
18
  import subprocess
13
19
  from typing import Any, Optional
14
20
 
21
+ #: Error code shared with the advanced server's ``assertNotOption``.
22
+ OPTION_LIKE_PATH_REFUSED = "OPTION_LIKE_PATH_REFUSED"
23
+
24
+
25
+ def option_like_path_error(value: Any, label: str = "path") -> Optional[str]:
26
+ """Why ``value`` cannot be a positional argv operand, or None when it can.
27
+
28
+ A string starting with ``-`` is refused, not rewritten to ``./-...``, so a
29
+ path gets the same answer from this server and the advanced one. An
30
+ absolute path or a ``./`` prefix passes.
31
+ """
32
+ if isinstance(value, str) and value.startswith("-"):
33
+ return (
34
+ f"{label} '{value}' starts with '-', so the program would read it as "
35
+ "an option. Pass it as an absolute path or prefix it with ./"
36
+ )
37
+ return None
38
+
15
39
 
16
40
  def safe_run(*args: Any, **kwargs: Any) -> "subprocess.CompletedProcess":
17
41
  """subprocess.run with stdin defaulted to DEVNULL (override by passing stdin).
@@ -219,7 +219,10 @@ def measure_track_levels(
219
219
  cmd = ["ffmpeg", "-v", "error", "-i", path, "-vn", "-ac", "1",
220
220
  "-ar", str(rate), "-f", "f32le", "-"]
221
221
  if duration_seconds:
222
- cmd[4:4] = ["-t", str(duration_seconds)]
222
+ # Before "-i", so it limits the input read. Index 4 is the path:
223
+ # inserting there left "-i -t <dur> <path>", which made "-t" the
224
+ # input and the caller's path a bare output filename (#350).
225
+ cmd[3:3] = ["-t", str(duration_seconds)]
223
226
  try:
224
227
  proc = subprocess.run(cmd, stdin=subprocess.DEVNULL, capture_output=True, timeout=120)
225
228
  except (subprocess.SubprocessError, OSError) as exc: