You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Strengthen the test suite: 298 -> 395 tests, and fix three bugs it found
Reviewed the whole suite for coverage gaps, redundancy, brittleness, and
maintainability. The suite was already in good shape -- fast, deterministic,
no external dependencies -- so this keeps those properties (still ~3s) and
targets the concentrated weaknesses.
Coverage gaps closed:
- ClipExporter.ExportAsync had zero tests. Added an optional `runFfmpeg`
delegate so its failure, cancellation, and script-cleanup paths run
without spawning ffmpeg.
- PackageManager had no test file at all; ExtractFFmpegBin now has one.
- Nine of thirteen converters were untested, including every null and
wrong-type branch.
- VideoPlayerController's transport commands (Play/Toggle/Next/Previous/
GoToClip) were never called by any test.
- MainWindowViewModel's scan empty/error states and the keyboard transport
shortcuts were unreachable; deleting the clip that is actually playing
deadlocked on Dispatcher.Invoke, so RunOnUiThread got a `uiInvoker` seam.
- Mp4DurationReader's box-parsing branches (truncated moov, size 0 and 1
forms, undersized box, moov without mvhd).
- New CultureInvarianceTests pins the four load-bearing InvariantCulture
arguments. Dropping one silently returns zero clips under ar-SA or
mis-dates every clip by 543 years under th-TH, and no existing test
could see it.
Fixture and reliability work:
- TestClipFiles wrote 60s chunks spaced 60s apart, which made probed
duration and nominal spacing indistinguishable in every timeline
calculation. It now takes per-chunk durations, so chunk-offset
arithmetic is actually observable.
- FakeClipMediaSourceBuilder exposed raw Lists that tests read while
Build() appended off-thread; the bookkeeping is now private behind its
lock and handed out as snapshots.
- FfconcatMediaSourceBuilderTests no longer leaks a playlist file per test
into %TEMP%, and CamStorageTests no longer recursively scans the build
output directory.
Removed or merged eight tests that duplicated a sibling's code path or
asserted framework behavior, and fixed several that passed for the wrong
reason -- notably two ClipPlaylist tests whose central assertions held
before the act ran.
Three production fixes, each pinned by a test verified to fail without it:
- FfconcatMediaSourceBuilder registered a header-only playlist for a camera
whose first chunk was unreadable, so a corrupt side camera surfaced
"Failed to open" instead of the actionable "no footage" message.
- ExtractFFmpegBin had no zip-slip containment check, and it extracts next
to the app's own binaries.
- NowPlayingConverter treated DependencyProperty.UnsetValue as a real
value, so two unresolved bindings compared equal and could paint the
now-playing badge on a row that is not playing.
CI hardening: build and test in Release (three #if DEBUG blocks mean Debug
green said nothing about shipped binaries), a --blame-hang inactivity guard
so a deadlock regression fails in minutes instead of burning the runner, a
trx artifact uploaded on failure, and a `dotnet format` gate -- which caught
formatting drift in this very PR.
Copy file name to clipboardExpand all lines: AGENTS.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,5 +34,6 @@ These instructions apply to Codex and other coding agents working in this repo.
34
34
## Testing/Validation
35
35
- Always run `dotnet format`.
36
36
- Tests live in `SentryDeck.Tests` and use xUnit/Shouldly.
37
+
- Name tests `Subject_Scenario_Expectation` on a `public sealed class` with instance methods.
37
38
- Add tests for new view-model and domain logic — view-models are plain objects that can be constructed directly in tests (see `MainWindowViewModelTests`).
38
39
- If you change UI behavior, mention how to verify it (e.g., which view to open, what to click).
0 commit comments