From 606eee8f238e3dffa26b3ce58dfe1475763e781e Mon Sep 17 00:00:00 2001 From: Sylpheed port agent Date: Sun, 30 Aug 2026 02:46:26 +0000 Subject: [PATCH] port: check the five MODDING rules, and label the generated files in the asset tree MODDING.md calls modding a constraint on the exporter TODAY and nothing verified it -- the same shape as the black hold, skipped[], stop_bed and --focus. All five rules pass, so check-modding is a guard rather than a fix, and it is proved able to fail: a stripped .cmd header, a bogus.bmp, and one orphaned PNG each exit 1. It found one thing: the .cmd encode-cache sidecars sat in the modder-facing tree with nothing saying what they were. They now carry a header. The header is excluded from the cache key so rewording it does not re-encode four minutes of video, and the sidecar is refreshed whenever its text differs rather than only on re-encode -- otherwise a header change could never reach an existing export. Also partly answers my own question to the Decoder: there is no general capture-path floor, because the port matches live-title-press-a at 0.00093% full-frame and 0.000% across the band. The 0.301% is specific to that pair. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01N7FiFFFwbvG2uxdcEh8HyF --- crates/sylpheed-export/src/video.rs | 40 ++++++++++++- docs/port/DECISIONS.md | 59 ++++++++++++++++++ tools/port/check-modding | 92 +++++++++++++++++++++++++++++ 3 files changed, 189 insertions(+), 2 deletions(-) create mode 100755 tools/port/check-modding diff --git a/crates/sylpheed-export/src/video.rs b/crates/sylpheed-export/src/video.rs index 44ca9e95..17eeeac3 100644 --- a/crates/sylpheed-export/src/video.rs +++ b/crates/sylpheed-export/src/video.rs @@ -157,10 +157,35 @@ pub fn transcode(disc: &Path, out: &Path, m: &Movie) -> Result String { + s.lines() + .filter(|l| !l.starts_with('#')) + .collect::>() + .join("\n") + }; let fresh = ogv.exists() - && std::fs::read_to_string(&stamp).map(|s| s == want).unwrap_or(false); + && std::fs::read_to_string(&stamp) + .map(|s| cache_key(&s) == cache_key(&want)) + .unwrap_or(false); if !fresh { // Encode to a temp name and rename on success. A reader that catches // this mid-write sees no file at all rather than a valid-looking one @@ -181,6 +206,17 @@ pub fn transcode(disc: &Path, out: &Path, m: &Movie) -> Result