Skip to content
m4bwav edited this page Oct 1, 2026 · 1 revision

How the two packages are built, tested and released. The maintainer's working notes are in the repository: AGENTS.md for the rules, and ai-docs/ (start with ai-docs/HANDOFF.md) for the plan, decisions and logs.

Layout

Path What it is
src/TrailerClipperLib/ the library (package TrailerClipper): TrailerClipper, TrailerClipperManager (per-file work), MediaEngine.cs (the FFMpegCore calls behind an internal interface), FFmpegLocator, ClipperCommandLineInterpreter, TrailerClipperOptions, and help.txt
src/TrailerClipper.Tool/ the tclipper tool: Program.cs and FFmpegInstaller.cs
tests/TrailerClipperLib.Tests/ NUnit tests: the golden replay, unit tests with a fake engine, the review's tests, and the 1.1.0 public API list
tests/Golden/ the recording of the published 1.1.0 (1.1.0.json), the capture program that made it, and its WAV and MP3 fixtures; never edited

Build and test

You need the .NET SDK named in global.json (10.0.401 at the time of writing) and ffmpeg with ffprobe for the tests that clip real files.

dotnet restore --locked-mode
dotnet format --verify-no-changes
dotnet build -c Release
dotnet test -c Release
dotnet pack -c Release -o artifacts

dotnet test runs net10.0 everywhere and net48 on Windows (net48 exercises the netstandard2.0 build). On 2026-09-30 a copy of master at 18522a4 passed 193 of 193 tests on each framework on Windows 11 with ffmpeg 9.0.1, in about 6 seconds each.

Lock files are committed; after changing a package reference, run dotnet restore and commit them. src/TrailerClipperLib/help.txt keeps 1.1.0's bytes (a byte order mark and CRLF line endings) and is marked -text in .gitattributes; every other file is LF.

The compatibility promise

2.x gives 1.1.0's answers for every call in tests/Golden/1.1.0.json, except the differences the CHANGELOG names (E1 to E11). GoldenTests.cs replays the recording against the current code and holds the allowed differences as a table; a change that alters another answer fails the build. When it fails, fix src/; never re-record. The capture program runs on .NET Framework 4.8, where 1.1.0's clipper works (Versions and upgrading).

CI

ci.yml runs on every push to master and every pull request, on Ubuntu 24.04, Windows and macOS. It does a locked restore, the format check, a Release build with analyzers as errors, and a NuGet audit that fails on any advisory. Then it runs the tests (net10.0, plus net48 on Windows) and packs both packages. On Linux it checks that the library package holds exactly its README and the two builds' DLL and XML files. On every system it installs the packed tool and clips a file with it. ffmpeg comes from BtbN's 9.0 builds (checked against their checksums) on Linux, Homebrew on macOS and Chocolatey on Windows. Actions are pinned to commit SHAs, and Dependabot proposes updates weekly.

Releasing

  1. Update CHANGELOG.md with a dated heading, and set the same <Version> in both project files.
  2. Merge, and wait for ci to pass on master.
  3. Tag v<version> on that commit and push the tag.
  4. release.yml checks the tag against both versions, builds, tests, packs, attests, and waits for the maintainer's approval in the nuget environment, then pushes both packages to nuget.org through Trusted Publishing (no stored API key) and creates the GitHub release.
  5. Run verify-published.yml with the version: it installs both packages from nuget.org on Linux, macOS and Windows and checks them.

2.0.0 went this way on 2026-09-27, after a rehearsal as 2.0.0-beta.1.

This wiki

The wiki is a separate git repository (TrailerClipperLib.wiki.git). Its examples come from a program that installs the published packages and prints every output the pages show; the program, its saved outputs and the steps to update the wiki for a new release are in the repository's ai-docs/notes/ (the notes dated 2026-09-30).

Clone this wiki locally